A path planning method for curved surface scanning of a robotic arm based on least squares conformal algorithm
The three-dimensional surface is projected onto a two-dimensional plane for path planning through the least squares conformal algorithm. Combined with the scanning equipment constraints, the problems of low efficiency and poor coverage in path planning for large-surface scanning are solved, and efficient and continuous robotic arm scanning is achieved.
Patent Information
- Application Number
- CN202510260251.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-03-06
AI Technical Summary
Existing technologies are inefficient in large-surface scanning path planning, manual path planning is complex, and existing automated methods are unable to optimize the motion trajectory of the robotic arm, resulting in limited scanning quality and efficiency, especially poor scanning coverage and continuity on complex curved surfaces.
A least squares conformal algorithm is used to project the 3D surface onto a 2D plane for path planning. Combined with the angle and distance constraints of the scanning device, an efficient, comprehensive, and adaptable scanning path that can be executed by the robotic arm is generated.
It achieves efficient and continuous surface scanning, reduces scanning data noise and loss, improves scanning quality, avoids multiple data conversions, and provides an efficient robot arm path planning method.
Smart Images

Figure CN119839868B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automated digital measurement, and in particular to a method for planning a curved surface scanning path of a robotic arm based on a least squares conformal algorithm. Background Art
[0002] With the development of digital measurement technology and its applications, 3D scanning technology, characterized by its ability to rapidly acquire three-dimensional surface information, has become widely used in aerospace, automotive, and shipbuilding industries. Acquiring three-dimensional positional information on product surfaces through 3D scanning technology transforms product inspection from traditional qualitative analog measurements to quantitative digital measurements. This technology has been widely used in various inspection processes, including appearance inspection, dimensional measurement, and reverse modeling. Handheld 3D scanners, due to their portability and ease of operation, are commonly used to obtain product inspection data. To address the low efficiency and labor intensity of manual handheld scanning, an increasing number of automated devices are being used for 3D product scanning and inspection tasks. Industrial robots (robotic arms) are particularly popular due to their flexibility, controllability, and operability.
[0003] The main scanning path planning method currently is to manually plan path points or manually teach a robotic arm to scan the product. However, for large curved surfaces, manual path planning is inefficient and the teaching process is complicated. The generated path often cannot optimize the motion trajectory of the robotic arm, resulting in limited scanning quality and efficiency. Although existing automated scanning path planning methods can reduce manual participation to a certain extent, most of them rely on regularized or a priori defined scanning methods, such as regular path generation methods based on simple plane projection, cylindrical projection, etc. These methods have poor scanning coverage and continuity for complex surfaces. In addition, existing methods often ignore the parameter constraints of the scanning equipment (such as the limitations of the scanning angle and scanning distance) and the local geometric characteristics of the surface (such as the impact of curvature changes on the scanning path), making it difficult to obtain high-quality scanning data. Therefore, there is an urgent need for a method that can address the above-mentioned deficiencies in the existing technology. Summary of the Invention
[0004] To address the shortcomings of existing methods for large-surface scanning path planning, this paper proposes a robotic arm curved surface scanning path planning method based on a least-squares conformal algorithm. By incorporating the geometric properties of the surface, the three-dimensional surface is projected onto a two-dimensional plane, and an optimized scanning path is planned in two-dimensional space. The path points are then inversely mapped back to three-dimensional space, while also considering the angle and distance constraints of the scanning device. This generates an efficient, comprehensive, and adaptable scanning path that can be executed by the robotic arm.
[0005] In order to achieve the above technical objectives, the present invention provides the following technical solutions:
[0006] A method for planning a curved scanning path for a robotic arm based on a least squares conformal algorithm specifically comprises the following steps:
[0007] S1. Convert the design digital model of the surface to be scanned into a triangular mesh model to obtain the vertex set of the triangular mesh model of the surface to be scanned. V and vertex triangle set T , and calculate the normal vector and curvature of the vertex;
[0008] S2. Clustering the continuously scannable triangular mesh vertices according to the curvature and normal vector calculated in step S1 to obtain multiple different continuously scannable area point sets;
[0009] S3, projecting the vertices of the triangular network model from three dimensions to a two-dimensional plane using a least squares conformal algorithm;
[0010] S4, determining corresponding points of each point set in the continuously scannable area on the two-dimensional plane, and then calculating a two-dimensional scanning path point array based on the corresponding points on the two-dimensional plane;
[0011] S5. Connect adjacent scanning areas end to end according to the nearest neighbor relationship to obtain a complete two-dimensional scanning path point array for the entire surface to be scanned;
[0012] S6, inversely mapping the complete two-dimensional scanning path points obtained in step S5 back to three-dimensional space, and offsetting the path points according to the path point normal and the scanner parameters to obtain a complete three-dimensional scanning path point array;
[0013] S7. Convert the complete three-dimensional scanning path point array into an executable scanning path point array of the robotic arm, and complete the robotic arm scanning path planning of the surface to be scanned.
[0014] Furthermore, step S1 specifically includes:
[0015] S11. Import the design digital model of the surface to be scanned into the modeling software to extract the surface features and discretize it into a triangular mesh to obtain the vertex set of the triangular mesh model of the surface to be scanned. and vertex triangle set ; Each triangle in ;in, is a vertex set The index of the vertex in ;
[0016] S12. For each vertex , select its neighborhood radius The neighboring points within the local plane are calculated using a method based on local plane fitting. ;
[0017] S13. For each vertex , select its neighborhood radius The curvature of the neighboring points within is calculated using a method based on local surface fitting. .
[0018] Furthermore, step S2 specifically includes:
[0019] S21, the vertex set The points in the are sorted in ascending order according to the curvature, and the vertex set is selected. The point with the smallest mean curvature As the starting point of clustering, let its curvature be , and its normal vector is ;
[0020] S22, traversal Neighborhood radius , calculate its neighboring points k neighboring points Normal vector with dot Normal vector The angle between ,like Smaller than the set viewing cone angle , then and Group them into one category and and Marked as clustered;
[0021] S23, when Judged as After clustering into one category, calculate Curvature with dot curvature The difference ,like Less than the set curvature change threshold , then Put in cluster starting sequence middle;
[0022] S24, traversal completed After the neighboring points of Reselect the point with the smallest curvature as the starting point of the new cluster, and repeat steps S22-S23 for the points that are not marked as clustered until the sequence Empty; points that are judged to be clustered into the same category as the new cluster starting point are also considered to be group together; And all the cluster points are put into the same point set, that is, a point set of a continuously scannable area is obtained. ;
[0023] S25, set the vertex The points that are not marked as clustered in , for the set Repeat steps S21-S24 until the vertex set All points in the cluster are marked as clustered, and multiple different point sets of continuously scannable areas are obtained.
[0024] Furthermore, step S3 specifically includes:
[0025] S31, traverse the vertex triangle set , find all the edges that belong to only one triangle, take out the vertices of these edges, and get the surface boundary point set ;
[0026] S32, projecting the boundary line points onto the unit circle in the two-dimensional plane; for a boundary line point , and its projected coordinates are ,in, , , Boundary point exist The index in is the total number of boundary line points;
[0027] S33. Define a triangle gradient matrix for describing the relationship between vertex coordinate changes and two-dimensional gradients , for any vertex triangle , its triangular gradient matrix is:
[0028] ;
[0029] in, is the area of the triangle, , 、 、 Triangle The three vertices of and axis coordinates;
[0030] S34. Constructing a non-conformal energy function for a triangle , for triangle , assuming that the two-dimensional coordinates of its three vertices are , , , its energy function for:
[0031] ;
[0032] in, , ;
[0033] S35. Accumulate the non-conformal energy of all triangles to obtain the global energy function ;
[0034] S36. Expand the global energy function and express it as a linear system ;
[0035] in, , is a The sparse coefficient matrix of , which is related to the triangular gradient matrix, The dimension introduced by using the coordinates of all boundary points as constraints is vector of
[0036] S37, use the sparse matrix solution method to solve x, so that the global energy function As the minimum value, solve the two-dimensional coordinates of each vertex , That is, the vertex in three-dimensional space Mapped to a point in two-dimensional space.
[0037] Furthermore, step S4 specifically includes:
[0038] S41, for any continuously scannable area point set , after step S3, we get The corresponding points of all points in two-dimensional space constitute a two-dimensional continuous scanning area point set ;
[0039] S42, using the convex hull algorithm to obtain the two-dimensional continuously scannable area point set Find the two points with the greatest distance between them and , and find out and Line segment between two points ;
[0040] S43, for the two-dimensional continuously scannable area point set Medium and Project the points outside the Go up and find The two points farthest apart in a direction and , find the straight line segment passing through these two points ;
[0041] S44, Scan width according to scanner settings Straight line segment Divide the straight line into equal parts Divide into segment, in which Indicates rounding up. For straight line segments length;
[0042] S45, extract the straight line segment The equal nodes ;
[0043] S46, crossing a straight line segment The equal division node Parallel line segments ,by As the starting line segment, The parallel line segments are connected in sequence, and the point set is obtained Two-dimensional scanning path ;
[0044] S47, along the two-dimensional scanning path Sampling is performed with a fixed sampling step size s, with a point set The point closest to the sampling point is the two-dimensional scanning path point, and the point set is obtained Two-dimensional scanning path point array ;
[0045] S48. Repeat steps S41 to S47 for other continuously scannable area point sets to obtain a two-dimensional scanning path point array for each continuously scannable area.
[0046] Furthermore, step S5 specifically includes:
[0047] S51. Find the two-dimensional scanning path point array with the most two-dimensional scanning path points as well as The last waypoint in ,calculate Find the distance from the first path point in the remaining two-dimensional scanning path point array The path point with the smallest distance , and its corresponding two-dimensional scanning path point array ;
[0048] S52, will The path points in the original order are added to At the end, a new two-dimensional scanning path point array is obtained , and and Mark as merged;
[0049] S53. According to step S52, find the distance of the first path point in the remaining unmerged array. The array closest to the last path point is merged and updated ;
[0050] S54, repeat step S53 until all arrays are marked as merged, and obtain the complete two-dimensional scanning path point array of the surface to be scanned .
[0051] Furthermore, step S6 specifically includes:
[0052] S61. Find the complete two-dimensional path point array of the surface to be scanned according to the index correspondence The path points in the image correspond to the vertices of the triangular mesh model of the surface in three-dimensional space, and a complete three-dimensional path point array of the surface to be scanned is obtained. ;
[0053] S62. For a three-dimensional path point array A waypoint in , move the point along its normal Optimal scanning distance for offset scanners , get the offset path point ;
[0054] S63. For a three-dimensional path point array All path points in step S62 are executed to obtain a complete three-dimensional scanning path point array of the surface to be scanned. .
[0055] Furthermore, step S7 specifically includes:
[0056] S71. For a complete 3D scanning path point array Offset path points in , its normal vector As the Z axis of the scanner tool coordinate system, that is: ;
[0057] S72, according to the scanner tool coordinate system The X axis of the tool coordinate system is determined by the X axis of the coordinate system of the surface to be scanned. First, a reference vector of the X axis of the coordinate system of the surface to be scanned is selected. , calculate the temporary vector ,Will Normalize to get the X-axis of the tool coordinate system;
[0058] S73, determining the Y axis of the tool coordinate system according to the X axis and the Z axis of the tool coordinate system;
[0059] S74, the three axis vectors of the tool coordinate system form a rotation matrix ;
[0060] S75. According to the rotation matrix Calculate the scanner's offset path point RPY static angle at and ;
[0061] S76, will Coordinates and in The RPY static angle of the scanner at and Combined into a robotic arm Executable points at ;
[0062] S77, complete three-dimensional scanning path point array Execute steps S71 to S76 for all the offset path points in the to-be-scanned surface to obtain an array of executable scanning path points for the robotic arm. , complete the robotic arm scanning path planning of the surface to be scanned.
[0063] Based on the above technical solution, the present invention has the following beneficial effects:
[0064] 1. The present invention uses the scanner's cone angle as a constraint to segment and cluster the mesh vertices of the surface to be scanned, ensuring that the scanner can continuously scan the same scanning area without sudden posture changes, thereby reducing the noise and missing degree of the final scanning data.
[0065] 2. The present invention adopts a plane parameterization method based on least squares approximation and quasi-conformal mapping to construct a mapping relationship between a three-dimensional mesh surface and a plane parameter domain. While ensuring that the flattened meshes do not overlap, the area of the original mesh is maintained to the greatest extent possible, and the path planning of the mesh surface is transformed into path planning within the plane domain, which greatly reduces the difficulty of path planning for the three-dimensional space mesh surface.
[0066] 3. Convert the scan path points into a data format that can be directly executed by the robotic arm, avoiding multiple data conversions during the planning and execution process.
[0067] 4. The present invention provides an efficient robot arm path planning method for curved surface three-dimensional scanning while ensuring the quality reliability of curved surface three-dimensional scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0069] Figure 1 This is a flow chart of a robotic arm surface scanning path planning method based on a least squares conformal algorithm proposed in the present invention. DETAILED DESCRIPTION
[0070] To make the above-mentioned objectives, features, and advantages of the present invention more clearly understood, the present invention is further described below in detail with reference to the accompanying drawings and specific embodiments. This will enable a full understanding of how this application uses technical means to solve technical problems and achieve technical effects, and to implement the invention accordingly.
[0071] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiment methods can be accomplished by instructing the relevant hardware through a program. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] Please refer to Figure 1 This embodiment proposes a method for planning a curved scanning path for a robotic arm based on a least squares conformal algorithm. The method includes the following steps:
[0073] S1. Convert the design digital model of the surface to be scanned into a triangular mesh model to obtain the vertex set of the triangular mesh model of the surface to be scanned. V and vertex triangle set T , and calculate the normal vector and curvature of the vertex;
[0074] As a preferred embodiment, step S1 specifically includes:
[0075] S11. Import the design digital model of the surface to be scanned into the modeling software to extract the surface features and discretize it into a triangular mesh to obtain the vertex set of the triangular mesh model of the surface to be scanned. and vertex triangle set ; Each triangle in ;in, is a vertex set The index of the vertex in ;
[0076] S12. For each vertex , select its neighborhood radius The neighboring points within the local plane are calculated using a method based on local plane fitting. ;
[0077] S13. For each vertex , select its neighborhood radius The curvature of the neighboring points within is calculated using a method based on local surface fitting. .
[0078] S2. Cluster the scannable points according to the curvature and normal vector calculated in step S1 to obtain multiple continuously scannable area point sets;
[0079] As a preferred embodiment, step S2 specifically includes:
[0080] S21, the vertex set The points in the are sorted in ascending order according to the curvature, and the vertex set is selected. The point with the smallest mean curvature As the starting point of clustering, let its curvature be , and its normal vector is ;
[0081] S22, traversal Neighborhood radius , calculate its neighboring points k neighboring points Normal vector with dot Normal vector The angle between ,like Smaller than the set viewing cone angle , then and Group them into one category and and Marked as clustered; It should be noted that the setting of the cone angle in this step is to consider the angle constraint of the scanning device;
[0082] S23, when Judged as After clustering into one category, calculate Curvature with dot curvature The difference ,like Less than the set curvature change threshold , then Put in cluster starting sequence middle;
[0083] S24, traversal completed After the neighboring points of Reselect the point with the smallest curvature as the starting point of the new cluster, and repeat steps S22-S23 for the points that are not marked as clustered until the sequence Empty; points that are judged to be clustered into the same category as the new cluster starting point are also considered to be group together; And all the cluster points are put into the same point set, that is, a point set of a continuously scannable area is obtained. ;
[0084] S25, set the vertex The points that are not marked as clustered in , for the set Repeat steps S21-S24 until the vertex set All points in the cluster are marked as clustered, and multiple different point sets of continuously scannable areas are obtained.
[0085] S3, projecting the vertices of the triangular network model from three dimensions to a two-dimensional plane using a least squares conformal algorithm;
[0086] As a preferred embodiment, step S3 specifically includes:
[0087] S31, traverse the vertex triangle set , find all the edges that belong to only one triangle, take out the vertices of these edges, and get the surface boundary point set ;
[0088] S32, projecting the boundary line points onto the unit circle in the two-dimensional plane; for a boundary line point , and its projected coordinates are ,in, , , Boundary point exist The index in is the total number of boundary line points;
[0089] S33. Define a triangle gradient matrix for describing the relationship between vertex coordinate changes and two-dimensional gradients , for any vertex triangle , its triangular gradient matrix is:
[0090] ;
[0091] in, is the area of the triangle, , 、 、 Triangle The three vertices of and axis coordinates;
[0092] S34. Constructing a non-conformal energy function for a triangle , for triangle , assuming that the two-dimensional coordinates of its three vertices are , , , its energy function for:
[0093] ;
[0094] in, , ;
[0095] S35. Accumulate the non-conformal energy of all triangles to obtain the global energy function ;
[0096] In this embodiment, in order to optimize the global conformality, the global energy function is minimized ,Right now:
[0097] ;
[0098] in , are matrices composed of the coordinate components of all vertices of the triangle mesh in the two-dimensional coordinate system;
[0099] S36. Expand the global energy function and express it as a linear system ;
[0100] in, , is a The sparse coefficient matrix of is related to the triangular gradient matrix, assuming: is a matrix Middle OK The elements of the column are 、 Points indexed Connection is an edge in the triangular mesh model, 、 Yes The coordinates in the two-dimensional coordinate system are The expression is as follows:
[0101] ;
[0102] in express Is an included edge A triangle; if is not an edge in the triangular mesh model, then ; Representation matrix Elements Find partial differentials; and Points and The coordinates of the X and Y axes in three-dimensional space;
[0103] The dimension introduced by using the coordinates of all boundary points as constraints is vector, assuming for No. r elements, The expression is as follows:
[0104] ;
[0105] S37, use the sparse matrix solution method to solve x, so that the global energy function As the minimum value, solve the two-dimensional coordinates of each vertex , That is, the vertex in three-dimensional space Mapped to a point in two-dimensional space.
[0106] S4, determining corresponding points of each point set in the continuously scannable area on the two-dimensional plane, and then calculating a two-dimensional scanning path point array based on the corresponding points on the two-dimensional plane;
[0107] As a preferred embodiment, step S4 specifically includes:
[0108] S41, for any continuously scannable area point set , after step S3, we get The corresponding points of all points in two-dimensional space constitute a two-dimensional continuous scanning area point set ;
[0109] S42, using the convex hull algorithm to obtain the two-dimensional continuously scannable area point set Find the two points with the greatest distance between them and , and find out and Line segment between two points ;
[0110] S43, for the two-dimensional continuously scannable area point set Medium and Project the points outside the Go up and find The two points farthest apart in a direction and , find the straight line segment passing through these two points ;
[0111] S44, Scan width according to scanner settings Straight line segment Divide the straight line into equal parts Divide into segment, in which Indicates rounding up. For straight line segments length;
[0112] S45, extract the straight line segment The equal nodes ;
[0113] S46, crossing a straight line segment The equal division node Parallel line segments ,by As the starting line segment, The parallel line segments are connected in sequence, and the point set is obtained Two-dimensional scanning path ;
[0114] S47, along the two-dimensional scanning path Sampling is performed with a fixed sampling step size s, with a point set The point closest to the sampling point is the two-dimensional scanning path point, and the point set is obtained Two-dimensional scanning path point array ;
[0115] S48. Repeat steps S41 to S47 for other continuously scannable area point sets to obtain a two-dimensional scanning path point array for each continuously scannable area.
[0116] S5. Connect adjacent scanning areas end to end according to the nearest neighbor relationship to obtain a complete two-dimensional scanning path point array for the entire surface to be scanned;
[0117] As a preferred embodiment, step S5 specifically includes:
[0118] S51. Find the two-dimensional scanning path point array with the most two-dimensional scanning path points as well as The last waypoint in ,calculate Find the distance from the first path point in the remaining two-dimensional scanning path point array The path point with the smallest distance , and its corresponding two-dimensional scanning path point array ;
[0119] S52, will The path points in the original order are added to At the end, a new two-dimensional scanning path point array is obtained , and and Mark as merged;
[0120] S53. According to step S52, find the distance of the first path point in the remaining unmerged array. The array closest to the last path point is merged and updated ;
[0121] S54, repeat step S53 until all arrays are marked as merged, and obtain the complete two-dimensional scanning path point array of the surface to be scanned .
[0122] S6, inversely mapping the complete two-dimensional scanning path points obtained in step S5 back to three-dimensional space, and offsetting the path points according to the path point normal and the scanner parameters to obtain a complete three-dimensional scanning path point array;
[0123] As a preferred embodiment, step S6 specifically includes:
[0124] S61. Find the complete two-dimensional path point array of the surface to be scanned according to the index correspondence The path points in the image correspond to the vertices of the triangular mesh model of the surface in three-dimensional space, and a complete three-dimensional path point array of the surface to be scanned is obtained. ;
[0125] S62. For a three-dimensional path point array A waypoint in , move the point along its normal Optimal scanning distance for offset scanners , get the offset path point ;
[0126] It should be noted that, in this embodiment, It can be regarded as the depth of field of the scanner. The offset is to allow the surface to be scanned to be scanned within the depth of field of the scanner. That is, the distance constraint of the scanning device is taken into account in this step. Only after the offset processing can the three-dimensional scanning path points desired by the present invention be obtained.
[0127] S63. For a three-dimensional path point array All path points in step S62 are executed to obtain a complete three-dimensional scanning path point array of the surface to be scanned. .
[0128] S7, converting the complete three-dimensional scanning path point array into an executable scanning path point array of the robotic arm, completing the robotic arm scanning path planning of the surface to be scanned;
[0129] As a preferred embodiment, step S7 specifically includes:
[0130] S71. For a complete 3D scanning path point array Offset path points in , its normal vector As the Z axis of the scanner tool coordinate system, that is: ;
[0131] S72, according to the scanner tool coordinate system The X axis of the tool coordinate system is determined by the X axis of the coordinate system of the surface to be scanned. First, a reference vector of the X axis of the coordinate system of the surface to be scanned is selected. , calculate the temporary vector ,Will Normalize to get the X-axis of the tool coordinate system;
[0132] S73, determining the Y axis of the tool coordinate system according to the X axis and the Z axis of the tool coordinate system;
[0133] S74, the three axis vectors of the tool coordinate system form a rotation matrix ;
[0134] S75. According to the rotation matrix Calculate the scanner's offset path point RPY static angle at and ;
[0135] S76, will Coordinates and in The RPY static angle of the scanner at and Combined into a robotic arm Executable points at ;
[0136] S77, complete three-dimensional scanning path point array Execute steps S71 to S76 for all the offset path points in the to-be-scanned surface to obtain an array of executable scanning path points for the robotic arm. , complete the robotic arm scanning path planning of the surface to be scanned.
[0137] In summary, the method proposed in the present invention solves the problems of low efficiency of manual path planning, complex teaching process, inability to optimize the motion trajectory of the robotic arm, and poor scanning coverage and continuity of complex surfaces by other methods in the prior art, and realizes the generation of efficient, comprehensive and adaptable surface scanning paths that can be executed by robotic arms.
[0138] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above-described embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A method for planning a curved scanning path for a robotic arm based on a least squares conformal algorithm, characterized in that: The specific steps include: S1. Convert the designed digital model of the surface to be scanned into a triangular mesh model, obtain the vertex set V and vertex triangle set T of the triangular mesh model of the surface to be scanned, and calculate the normal vector and curvature of the vertex; S2. Clustering the continuously scannable triangular mesh vertices according to the curvature and normal vector calculated in step S1 to obtain multiple different continuously scannable area point sets; specifically, the clustering includes: S21. Sort the points in V in ascending order according to the curvature, and select the point p with the smallest curvature in the vertex set V. j As the starting point of clustering, its curvature is c j , and its normal vector is n j ; S22, traverse p j The neighboring points within the neighborhood radius R, calculate its kth neighboring point p jk Normal vector n jk With point p j Normal vector n j The angle θ between jk , if θ jk If the viewing cone angle θ is smaller than the set one, then p jk With p j Cluster them into one category and group p j With p jk Marked as clustered; S23, when p jk Judged as p j After clustering into one category, calculate p jk The curvature c jk With point p j Curvature c j The difference Δc jk , if |Δc jk | is less than the set curvature change threshold ε, then p jk Put it into the cluster starting sequence S; S24, traverse p j After the neighboring points of the cluster starting point are found, the point with the smallest curvature is reselected in the cluster starting point sequence S as the new cluster starting point, and steps S22-S23 are repeated for the points that are not marked as clustered until the sequence S is empty; the points that are judged to be clustered into the same category as the new cluster starting point are also considered to be clustered together with p j Group them into one category; j And all the cluster points are put into the same point set, that is, a point set of a continuously scannable area is obtained. S25. The points in the vertex set V that are not marked as clustered are grouped into a set V'. Steps S21-S24 are repeated for the set V' until all the points in the vertex set V are marked as clustered, thereby obtaining multiple different point sets in the continuously scannable area. S3, projecting the vertices of the triangular network model from three dimensions to a two-dimensional plane using a least squares conformal algorithm; S4, determining corresponding points of each point set in the continuously scannable area on the two-dimensional plane, and then calculating a two-dimensional scanning path point array based on the corresponding points on the two-dimensional plane; S5. Connect adjacent scanning areas end to end according to the nearest neighbor relationship to obtain a complete two-dimensional scanning path point array for the entire surface to be scanned; S6, inversely mapping the complete two-dimensional scanning path points obtained in step S5 back to three-dimensional space, and offsetting the path points according to the path point normal and the scanner parameters to obtain a complete three-dimensional scanning path point array; S7. Convert the complete three-dimensional scanning path point array into an executable scanning path point array of the robotic arm, and complete the robotic arm scanning path planning of the surface to be scanned.
2. The method for planning a curved surface scanning path of a robotic arm according to claim 1, wherein: Step S1 specifically includes: S11, import the design digital model of the surface to be scanned into the modeling software to extract the surface features, and discretize it into a triangular mesh to obtain the vertex set V = {p1, p2, ..., p M } and vertex triangle set T={t1,t2,…,t N }; Each triangle in T is denoted as t i ={i1,i2,i3}; where i1,i2,i3 are the indices of the vertices in V, i.e. S12. For each vertex p i , select the neighboring points within its neighborhood radius r1, and calculate its normal vector n using the method based on local plane fitting i ; S13. For each vertex p i , select the neighboring points within the neighborhood radius r2, and calculate the curvature c using the method based on local surface fitting i .
3. The method for planning a curved surface scanning path of a robotic arm according to claim 2, wherein: Step S3 specifically includes: S31, traverse the vertex triangle set T, find all the edges that belong to only one triangle, take out the vertices of these edges, and get the surface boundary point set B={b1,b2,…,b L }; S32, projecting the boundary line points onto the unit circle in the two-dimensional plane; for a boundary line point b l , its projected coordinates are in, l is the boundary line point b l The index in B, L is the total number of boundary line points; S33, define a triangle gradient matrix M for describing the relationship between vertex coordinate changes and two-dimensional gradients t , for any vertex triangle t i ={i1,i2,i3}, its triangular gradient matrix is: in, is the area of the triangle, The triangle t i The coordinates of the three vertices of the X and Y axes in three-dimensional space; S34. Constructing a non-conformal energy function for a triangle For triangle t i , assuming that the two-dimensional coordinates of its three vertices are Its energy function for: in, S35. Accumulate the non-conformal energy of all triangles to obtain the global energy function S36. Expand the global energy function and express it as a linear system Ax=b; Where x=[u1,v1,u2,v2,…,u m ,v m ] T , A is a 2m×2m sparse coefficient matrix related to the triangle gradient matrix, b is a vector of dimension 2m introduced with the coordinates of all boundary line points as constraints; S37, use the sparse matrix solution method to solve x, make the global energy function E to the minimum value, and solve the two-dimensional coordinates p' of each vertex i (u i ,v i ), p' i That is, the vertex p in three-dimensional space i Mapped to a point in two-dimensional space.
4. The method for planning a curved surface scanning path of a robotic arm according to claim 1, wherein: Step S4 specifically includes: S41, for any continuously scannable area point set After step S3, we get The corresponding points of all points in two-dimensional space constitute a two-dimensional continuous scanning area point set S42, using the convex hull algorithm to obtain the two-dimensional continuously scannable area point set Find the two points p' that are farthest apart a and p' b , and find out the value of p' a and p' b The straight line segment l between two points ab ; S43, for the two-dimensional continuously scannable area point set Divide by p' a and p' b Project the points outside the ab Go up and find l ab The two points p' that are farthest apart in the direction p and p' q , find the straight line segment l passing through these two points pq ; S44, according to the scanning width w set by the scanner, the straight line segment l pq Divide the straight line segment l into equal parts pq Divide into segment, in which Indicates rounding up, |l pq | is line segment l pq length; S45, take out the straight line segment l pq The equally divided node p' p ,p' p1 ,p' p2 ,…,p' p(f-2) ,p' q ; S46, through the straight line segment l pq The equal division node is l ab Parallel line segments by As the starting line segment, l ab The parallel line segments are connected in sequence, and the point set is obtained Two-dimensional scanning path S47, along the two-dimensional scanning path Sampling is performed with a fixed sampling step size s, with a point set The point closest to the sampling point is the two-dimensional scanning path point, and the point set is obtained Two-dimensional scanning path point array S48. Repeat steps S41 to S47 for other continuously scannable area point sets to obtain a two-dimensional scanning path point array for each continuously scannable area.
5. The method for planning a curved surface scanning path of a robotic arm according to claim 4, wherein: Step S5 specifically includes: S51. Find the two-dimensional scanning path point array with the most two-dimensional scanning path points as well as The last path point p' e , calculate p' e The distance from the first path point in the remaining two-dimensional scanning path point array is found to be the distance from p' e The path point p' with the minimum distance s , and its corresponding two-dimensional scanning path point array S52, will The path points in the original order are added to At the end, we get a new two-dimensional scanning path point array L uv , and and Mark as merged; S53. According to step S52, find the first path point distance L in the remaining unmerged array. uv The array closest to the last path point is merged and L is updated uv ; S54, repeat step S53 until all arrays are marked as merged, and obtain the complete two-dimensional scanning path point array L' of the surface to be scanned uv .
6. The method for planning a curved surface scanning path of a robotic arm according to claim 1, wherein: Step S6 specifically includes: S61. Find the complete two-dimensional path point array L' of the surface to be scanned according to the index correspondence. uv The path points in the image correspond to the vertices of the triangular mesh model of the surface in three-dimensional space, and the complete three-dimensional path point array L of the surface to be scanned is obtained. xyz ; S62. For the three-dimensional path point array L xyz A path point p in li , move the point along its normal n li Optimal scanning distance d of offset scanner s , get the bias path point p' li ; S63. For the three-dimensional path point array L xyz All path points in step S62 are executed to obtain a complete three-dimensional scanning path point array L' of the surface to be scanned. xyz .
7. The method for planning a curved surface scanning path of a robotic arm according to claim 6, wherein: Step S7 specifically includes: S71, for the complete three-dimensional scanning path point array L' xyz The offset path point p' in li , its normal vector n' li As the Z axis of the scanner tool coordinate system, that is: Z tcp =n' li =(n' ix ,n' iy ,n' iz )=(z x ,z y ,z z ); S72, according to the scanner tool coordinate system Z tcp The X axis of the tool coordinate system is determined by the X axis of the coordinate system of the surface to be scanned. First, a reference vector X of the coordinate system of the surface to be scanned is selected. ref =(1,0,0), calculate the temporary vector T=X ref -(X ref ·Z tcp )·Z tcp , normalize T to obtain the X axis of the tool coordinate system; S73, determining the Y axis of the tool coordinate system according to the X axis and the Z axis of the tool coordinate system; S74, forming a rotation matrix R from the three axis vectors of the tool coordinate system; S75, calculate the scanner at the offset path point p' according to the rotation matrix R li RPY static angle r at xli 、r yli and r zli ; S76, will p' li The coordinates (x li ,y li ,z li ) and in p' li The RPY static angle r of the scanner at xli 、r yli and r zli Combined into a robotic arm at p' li The executable point P' li (x li ,y li ,z li ,r xli ,r yli ,r zli ); S77, complete three-dimensional scanning path point array L' xyz Execute steps S71 to S76 for all the offset path points in the to-be-scanned surface to obtain an array of executable scanning path points for the robotic arm. Complete the robotic arm scanning path planning for the surface to be scanned.
Citation Information
Patent Citations
Triangular grid re-gridding method based on geometrical image
CN104200518A
3D printing single-point laser scanning path planning method
CN111369432A