A curved surface path automatic planning method and system for a polishing robot
By transforming 3D surface path planning into key point sampling and search on a 2D path planning domain and a triangular mesh model, 3D path planning is optimized, solving the real-time response and adaptability problems of 3D surface path planning and achieving efficient path generation.
Patent Information
- Application Number
- CN202511287644.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Existing technologies cannot quickly respond to the dynamic adjustment needs of production lines in 3D surface path planning, and online planning takes too long when the number of point clouds is large, making it difficult to respond to processing needs in real time.
The 3D surface model is divided into surface regions, fitted with a rectangular bounding box plane and mapped to a 2D path planning domain. An ordered sequence of key points is generated by sampling and sorting 2D key points, and projected onto a triangular mesh model to construct a continuous processing path. The path planning is optimized using the KD tree algorithm and graph search algorithm.
It reduces the computational load of path planning, enables real-time response, improves the accuracy and adaptability of path planning, and avoids redundant time consumption caused by the path drifting away from the workpiece surface or by sparse or dense sampling.
Smart Images

Figure CN120755896B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot automatic control technology for surface processing in manufacturing, and in particular to an automatic path planning method and system for a grinding robot. Background Technology
[0002] In the field of surface finishing in manufacturing, automating the workpiece surface grinding process has become a key demand for upgrading the manufacturing industry. The core technological bottleneck lies in how to generate the coverage path of the robot's end-effector on the three-dimensional surface of the workpiece. Coverage path planning is a core branch of robot motion planning, aiming to generate a path that traverses all reachable points within the target area while balancing coverage efficiency and obstacle avoidance. For planar area coverage path planning, existing technologies can achieve this by dividing the map into grids and setting traversal rules such as zigzag or I-shaped patterns. These technologies are mature and computationally inexpensive. However, for three-dimensional curved surface coverage path planning, since the three-dimensional model cannot cover all points through simple coordinate traversal, planar planning methods are completely unsuitable. Specific technical solutions for three-dimensional scenarios need to be designed. Currently, the mainstream three-dimensional curved surface path planning solutions in industry are offline planning and online planning. Offline planning is the traditional three-dimensional path planning method. Its core process involves constructing an idealized digital model of the workpiece using 3D modeling software, importing surface analytical functions, and calculating the coordinate sequence of the grinding path on the surface of this idealized model. The essence of this type of solution is to rely on a pre-built high-precision digital model for planning. If the workpiece model or processing requirements change, the digital model and surface functions need to be rebuilt. It cannot quickly respond to the dynamic adjustment requirements of the production line and has weak adaptability.
[0003] To alleviate the problem of offline planning's inability to quickly respond to the dynamic adjustment needs of the production line, online planning has emerged. Existing online planning uses vision cameras or 3D scanning equipment to scan the workpiece in real time, reconstructing a 3D model of the workpiece and presenting it as a point cloud or triangular mesh. It then automatically generates a sequence of processing path coordinates directly on this 3D model, theoretically enabling real-time planning while scanning and processing. However, due to the unordered nature of 3D point clouds, and because path planning in a 3D point set uses wavefront shaping algorithms, genetic algorithms, and ant colony algorithms to directly perform path planning on the point cloud, it requires traversing a large number of vertices in the point cloud to locate the path point coordinates. When the number of point clouds is large, the algorithm's time consumption increases dramatically, making it difficult to meet the processing requirements of real-time response in online planning. Summary of the Invention
[0004] To alleviate the problems of long processing time and difficulty in real-time response in traditional online planning when the number of point clouds is large, this invention proposes an automatic path planning method and system for polishing robots.
[0005] The present invention proposes an automatic path planning method for curved surfaces of a grinding robot, comprising the following steps:
[0006] S1. Construct the 3D surface model and triangular mesh model to be processed;
[0007] S2. Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain.
[0008] S3. In the two-dimensional path planning domain, sample and sort the key points of the path to generate a two-dimensional ordered key point sequence;
[0009] S4. Project the two-dimensional ordered key point sequence onto the triangular mesh model to obtain the three-dimensional ordered key point sequence;
[0010] S5. Based on the three-dimensional ordered key point sequence, construct a continuous processing path on the triangular mesh model.
[0011] Preferably, in S1, the three-dimensional surface model and triangular mesh model to be processed are constructed as follows:
[0012] Use a depth camera or laser scanner to scan the target workpiece and obtain point cloud data of the workpiece surface;
[0013] For clarification: point cloud data is a set of discrete points on the surface of a workpiece in three-dimensional space, containing geometric information about the workpiece surface; the target workpiece refers to the workpiece that the grinding robot needs to grind.
[0014] Preprocess the point cloud data of the workpiece surface;
[0015] Preprocessing of point cloud data on the workpiece surface includes noise filtering, smoothing, and point cloud density reconstruction;
[0016] The preprocessed point cloud data is used as the 3D surface model to be processed;
[0017] The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.
[0018] Preferably, in S2, the three-dimensional surface model to be processed is divided into several surface regions, as follows:
[0019] Obtain the normal vector of each point in the 3D surface model to be processed, and obtain the angle between the normals of any two adjacent points in the 3D surface model to be processed;
[0020] The normal angle refers to the angle between two normal vectors;
[0021] Based on the included normal angle between two adjacent points, a clustering algorithm is used to segment the surface region of the three-dimensional surface model to be processed, resulting in several surface regions;
[0022] Within each surface region, the normal angle between any two adjacent points is less than a preset threshold.
[0023] Preferably, in S2, a rectangular bounding box plane S with the largest area is fitted to each curved surface region, as follows:
[0024] For each surface region, obtain the points in the surface region and generate a point cloud of the surface region;
[0025] In the three-dimensional space where the point cloud of the curved region is located, the area of the rectangular bounding box on any two-dimensional plane P is: Project the point cloud of the curved region onto the two-dimensional plane P to obtain the corresponding two-dimensional projection point set; Fit a rectangle in the two-dimensional plane P that can completely cover the two-dimensional projection point set, and the adjacent sides of the rectangle are parallel to the preset orthogonal direction in the two-dimensional plane P. The area of this rectangle is the area of the rectangular bounding box of the point cloud of the curved region on the two-dimensional plane P.
[0026] Principal component analysis (PCA) is applied to the point cloud of the curved region to obtain three eigenvalues and three corresponding eigenvectors. The three eigenvalues are classified into the largest eigenvalue, the second largest eigenvalue, and the smallest eigenvalue according to their numerical values. The eigenvector corresponding to the largest eigenvalue is the largest eigenvector, the eigenvector corresponding to the second largest eigenvalue is the second largest eigenvector, and the eigenvector corresponding to the smallest eigenvalue is the smallest eigenvector.
[0027] The direction pointed to by the largest eigenvector is taken as the direction of the first principal component.
[0028] The direction pointed to by the second largest eigenvector is taken as the direction of the second principal component, and the direction of the second principal component is orthogonal to the direction of the first principal component.
[0029] The direction pointed to by the smallest eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the directions of the first principal component and the second principal component.
[0030] As an explanation, in principal component analysis, the number of eigenvalues and the number of eigenvectors corresponding to the eigenvalues are determined by the data dimension. Three-dimensional data corresponds to 3 eigenvalues, and n-dimensional data corresponds to n eigenvalues.
[0031] The plane spanned by the first principal component direction and the second principal component direction is used as the reference projection plane, with the first principal component direction as the X-axis and the second principal component direction as the Y-axis.
[0032] Obtain the centroid of the point cloud of the curved region. In the reference projection plane, establish a coordinate system with the centroid of the point cloud of the curved region as the origin and the direction of the third principal component as the Z-axis.
[0033] By using a preset coordinate transformation matrix, the original three-dimensional coordinates of all points in the point cloud of the curved region are transformed into the coordinate system. At this time, the Z coordinate value of each point in the point cloud of the curved region reflects its vertical distance relative to the reference projection plane S, while the X and Y coordinates constitute the two-dimensional projection coordinates of the point on the reference projection plane S, thereby completing the mapping from the three-dimensional point cloud to the two-dimensional planning domain.
[0034] Extract the X-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the X-axis direction within the reference projection plane;
[0035] Extract the Y-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the Y-axis direction within the reference projection plane;
[0036] by( , ), ( , ), ( , ), ( , Using four vertices, fit the bounding box with the largest area in the reference projection plane to form the bounding box plane S with the largest area.
[0037] Preferably, in S2, points in each curved surface region are mapped to S to form a two-dimensional path planning domain, as follows;
[0038] Extract the two-dimensional projection coordinates of all points in the point cloud of the curved surface region onto the bounding box plane S with the largest area, and generate a set of two-dimensional projection coordinates. The set of two-dimensional projection coordinates covers the entire bounding box with the largest area and serves as the two-dimensional path planning domain.
[0039] Preferably, in S3, key points of the path are sampled and sorted in the two-dimensional path planning domain to generate a two-dimensional ordered sequence of key points, as follows:
[0040] In the two-dimensional path planning domain, based on the largest area rectangular bounding box, the rectangular plane of the largest area rectangular bounding box is divided into a regular two-dimensional grid map according to the preset polishing path step size; a unique two-dimensional index coordinate is added to each grid cell in the two-dimensional grid map to form a spatial index framework covering the entire two-dimensional path planning domain, so that the grid map range matches the area to be processed, i.e., the largest area rectangular bounding box.
[0041] As an explanation: the preset grinding path step length is determined by the effective processing radius and processing accuracy requirements of the robot's end-effector grinding tool;
[0042] On a two-dimensional grid map, initial key points are collected at preset reference locations in each grid cell;
[0043] For clarification: The preset reference position can be the grid center;
[0044] The inverse transformation is performed according to the preset coordinate transformation matrix to map the two-dimensional index coordinates of the grid cells to the three-dimensional space of the point cloud of the curved area. The Z-axis coordinates of each initial key point are obtained by the nearest neighbor search of the KD tree algorithm, and the three-dimensional point cloud position corresponding to each initial key point is obtained.
[0045] As an explanation: the three-dimensional space in which the point cloud of the curved area is located refers to the coordinate system of the depth camera or laser scanner.
[0046] The curvature value of the surface region corresponding to each initial key point is obtained by using the 3D point cloud position corresponding to each initial key point;
[0047] The preset basic sampling density is 1 sampling point per grid cell. When the curvature value of the surface region corresponding to the initial key point is greater than the preset threshold, the sampling density is adjusted to N sampling points per grid cell, where N is a positive integer and N≥2. When the curvature value of the surface region corresponding to the initial key point is less than or equal to the preset threshold, the preset basic sampling density is used, and the initial key point is the sampling point of that grid cell.
[0048] Based on the unique two-dimensional index coordinates corresponding to each grid cell, multiple sampling points are obtained by traversing the grid cells on the two-dimensional grid map. Each sampling point carries the unique two-dimensional index coordinates corresponding to the grid cell.
[0049] The two-dimensional coordinates of each sampling point within the two-dimensional path planning domain are obtained as two-dimensional ordered key points, which are then arranged in a preset order to form a two-dimensional ordered key point sequence.
[0050] Preferably, in step S4, the two-dimensional ordered keypoint sequence is projected onto the triangular mesh model to obtain a three-dimensional ordered keypoint sequence, as follows:
[0051] The inverse transformation is performed based on the preset coordinate transformation matrix to map the two-dimensional coordinates of each sampling point in the two-dimensional ordered key point sequence within the two-dimensional path planning domain to the three-dimensional space of the curved area point cloud, thus obtaining temporary three-dimensional coordinates.
[0052] In the triangular mesh model, temporary 3D coordinates are used as search anchor points. The nearest neighbor of the temporary coordinates is searched using the KD tree algorithm. The temporary 3D coordinates are replaced with the 3D coordinates of the triangular mesh vertices or triangular facets. The 3D point cloud position corresponding to each sampling point is obtained as the 3D ordered key point and arranged in a preset order to form a 3D ordered key point sequence.
[0053] Preferably, in S5, a continuous processing path is constructed on the triangular mesh model based on the three-dimensional ordered key point sequence, as follows:
[0054] For the three-dimensional ordered key points in the three-dimensional ordered key point sequence, adjacent three-dimensional ordered key points are connected sequentially on the triangular mesh model according to the order of the three-dimensional ordered key point sequence, forming a continuous processing path;
[0055] The continuous processing path consists of vertices and edges on a triangular mesh, which can be directly adapted to the robot's motion control commands;
[0056] In the process of generating continuous processing paths using a graph search algorithm, the path only moves along the edges of the triangular mesh or inside the triangular facets.
[0057] Preferably, the method further includes: for continuous processing paths, using the triangular centroid coordinate interpolation method to correct the three-dimensional coordinates of the path points through the triangular facets where the path points are located on the continuous processing path, so as to obtain a smooth processing path.
[0058] An automatic path planning system for curved surfaces of a grinding robot, comprising:
[0059] Model building module: Constructs the 3D surface model and triangular mesh model to be processed;
[0060] Two-dimensional path planning domain generation module: Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain.
[0061] Two-dimensional ordered key point sequence generation module: On the two-dimensional path planning domain, the path key points are sampled and sorted to generate a two-dimensional ordered key point sequence;
[0062] 3D ordered key point sequence generation module: Projects the 2D ordered key point sequence onto the triangular mesh model to obtain the 3D ordered key point sequence;
[0063] Continuous processing path generation module: Constructs a continuous processing path on a triangular mesh model based on a three-dimensional ordered sequence of key points.
[0064] The automatic path planning method and system for curved surfaces of grinding robots proposed in this invention have the following beneficial technical effects:
[0065] 1. This application transforms the complex 3D surface coverage path planning problem of a workpiece into two low-complexity subproblems: key point sampling in a 2D path planning domain and 3D shortest path search on a triangular mesh model. Only a small number of sampling points are sampled in the 2D path planning domain. The sampling process relies on a spatial indexing framework to avoid global traversal of unordered point clouds. The KD-tree algorithm's nearest neighbor search is used to locate the 3D coordinates. A graph search algorithm is then used to sequentially connect adjacent ordered 3D key points to form a continuous processing path. This significantly reduces the computational load, facilitates real-time path planning response, and alleviates the problems of long processing times and difficulty in real-time response in traditional online planning when the number of point clouds is large.
[0066] 2. This application transforms the preprocessed point cloud into a triangular mesh model through Poisson reconstruction. The triangular mesh model is used to restore the surface geometry of the workpiece. When projecting the two-dimensional ordered key point sequence onto the triangular mesh model, the temporary three-dimensional coordinates obtained by inverse transformation are used as anchor points to search for the nearest triangular mesh vertex or point within a facet, ensuring that the projected point is always located on the workpiece surface. Adjacent three-dimensional ordered key points are connected sequentially through a graph search algorithm, and the path only moves along the edges of the triangular mesh or inside the triangular facets, ensuring that the path closely follows the surface from a topological perspective. At the same time, a two-dimensional path planning domain is constructed through PCA principal component analysis to alleviate projection distortion. This improves the accuracy of the mapping from two-dimensional to three-dimensional, alleviating the problems of existing path planning where the path drifts away from the workpiece surface due to a lack of surface constraints, or where the path needs to be manually adjusted due to deviations from the actual workpiece caused by relying on idealized surface functions for fitting.
[0067] 3. This application obtains the 3D point cloud positions corresponding to initial key points through inverse transformation of a preset coordinate transformation matrix and the KD tree algorithm, and then obtains the curvature value of the surface region corresponding to the initial key points. When the curvature value is greater than a preset threshold, the sampling density is increased from collecting 1 sampling point per grid cell to collecting N sampling points per grid cell, so that high curvature areas can cover details through multiple sampling points; when the curvature is small, the preset basic sampling density is maintained to avoid redundant calculations. This design dynamically matches the sampling density with the surface complexity, which, compared to fixed density sampling, alleviates the problem of missed wear in high curvature complex areas due to sparse sampling and redundant time consumption in low curvature simple areas due to dense sampling. Attached Figure Description
[0068] Figure 1 This is a flowchart of an automatic path planning method for a polishing robot surface according to the present invention;
[0069] Figure 2 This is a schematic diagram of the automatic path planning system for a polishing robot surface according to the present invention.
[0070] Figure 3 This is an illustration of how the preset order can be set to an I-shaped path when the key points are arranged in a preset order to form a two-dimensional ordered sequence. Detailed Implementation
[0071] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0072] like Figure 1 The method for automatic path planning of a polishing robot includes the following steps:
[0073] S1. Construct the 3D surface model and triangular mesh model to be processed;
[0074] S2. Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain.
[0075] S3. In the two-dimensional path planning domain, sample and sort the key points of the path to generate a two-dimensional ordered key point sequence;
[0076] S4. Project the two-dimensional ordered key point sequence onto the triangular mesh model to obtain the three-dimensional ordered key point sequence;
[0077] S5. Based on the three-dimensional ordered key point sequence, construct a continuous processing path on the triangular mesh model.
[0078] In an optional embodiment, in S1, the three-dimensional surface model and triangular mesh model to be processed are constructed as follows:
[0079] Use a depth camera or laser scanner to scan the target workpiece and obtain point cloud data of the workpiece surface;
[0080] Point cloud data is a set of discrete points on the surface of a workpiece in three-dimensional space, containing geometric information about the workpiece surface;
[0081] The target workpiece refers to the workpiece that the grinding robot needs to grind;
[0082] Preprocess the point cloud data of the workpiece surface;
[0083] Preprocessing of point cloud data on the workpiece surface includes noise filtering, smoothing, and point cloud density reconstruction;
[0084] The preprocessed point cloud data is used as the 3D surface model to be processed;
[0085] The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.
[0086] In an optional embodiment, in S2, the three-dimensional surface model to be processed is divided into several surface regions, as follows:
[0087] Obtain the normal vector of each point in the 3D surface model to be processed, and obtain the angle between the normals of any two adjacent points in the 3D surface model to be processed;
[0088] The normal angle refers to the angle between two normal vectors;
[0089] Based on the included normal angle between two adjacent points, a clustering algorithm is used to segment the surface region of the three-dimensional surface model to be processed, resulting in several surface regions;
[0090] As an explanation, a clustering algorithm is used to segment the surface region of the three-dimensional surface model to be processed. A region growing algorithm can be selected, based on the normal angle between two adjacent points, with a preset threshold as the region merging condition.
[0091] As an explanation, within each surface region, the normal angle between any two adjacent points is less than a preset threshold.
[0092] For example, suppose there are three points in the point cloud data, A, B, and C, where A and B are adjacent points, and B and C are adjacent points.
[0093] If the angle between the normals of A and B is less than a preset threshold, and the angle between the normals of B and C is less than a preset threshold, then the three points A, B, and C can be merged into a single curved surface region.
[0094] If the angle between the normals of A and B is less than a preset threshold, and the angle between the normals of B and C is greater than or equal to a preset threshold, then A and B are divided into one surface region, and C is divided into another surface region.
[0095] In an optional embodiment, the preset threshold for the normal angle is 90 degrees;
[0096] In an optional embodiment, in S2, a rectangular bounding box plane S with the largest area is fitted to each surface region, as follows:
[0097] For each surface region, obtain the points in the surface region and generate a point cloud of the surface region;
[0098] In the three-dimensional space where the point cloud of the curved region is located, the area of the rectangular bounding box on any two-dimensional plane P is: Project the point cloud of the curved region onto the two-dimensional plane P to obtain the corresponding two-dimensional projection point set; Fit a rectangle in the two-dimensional plane P that can completely cover the two-dimensional projection point set, and the adjacent sides of the rectangle are parallel to the preset orthogonal direction in the two-dimensional plane P. The area of this rectangle is the area of the rectangular bounding box of the point cloud of the curved region on the two-dimensional plane P.
[0099] In this scheme, the preset orthogonal direction will be associated with the principal component direction obtained from principal component analysis to maximize the area.
[0100] Principal component analysis (PCA) is applied to the point cloud of the curved region to obtain three eigenvalues and three corresponding eigenvectors. The three eigenvalues are classified into the largest eigenvalue, the second largest eigenvalue, and the smallest eigenvalue according to their numerical values. The eigenvector corresponding to the largest eigenvalue is the largest eigenvector, the eigenvector corresponding to the second largest eigenvalue is the second largest eigenvector, and the eigenvector corresponding to the smallest eigenvalue is the smallest eigenvector.
[0101] The direction pointed to by the largest eigenvector is taken as the direction of the first principal component.
[0102] The direction pointed to by the second largest eigenvector is taken as the direction of the second principal component, and the direction of the second principal component is orthogonal to the direction of the first principal component.
[0103] The direction pointed to by the smallest eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the directions of the first principal component and the second principal component.
[0104] As an explanation, in principal component analysis, the number of eigenvalues and the number of eigenvectors corresponding to the eigenvalues are determined by the data dimension. Three-dimensional data corresponds to 3 eigenvalues, and n-dimensional data corresponds to n eigenvalues.
[0105] The plane spanned by the first principal component direction and the second principal component direction is used as the reference projection plane, with the first principal component direction as the X-axis and the second principal component direction as the Y-axis.
[0106] Obtain the centroid of the point cloud of the curved region. In the reference projection plane, establish a coordinate system with the centroid of the point cloud of the curved region as the origin and the direction of the third principal component as the Z-axis.
[0107] By using a preset coordinate transformation matrix, the original three-dimensional coordinates of all points in the point cloud of the curved region are transformed into the coordinate system. At this time, the Z coordinate value of each point in the point cloud of the curved region reflects its vertical distance relative to the reference projection plane S, while the X and Y coordinates constitute the two-dimensional projection coordinates of the point on the reference projection plane S, thereby completing the mapping from the three-dimensional point cloud to the two-dimensional planning domain.
[0108] Extract the X-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the X-axis direction within the reference projection plane;
[0109] Extract the Y-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the Y-axis direction within the reference projection plane;
[0110] by( , ), ( , ), ( , ), ( , Using four vertices, fit the bounding box with the largest area in the reference projection plane to form the bounding box plane S with the largest area;
[0111] In an optional embodiment, in S2, points in each surface region are mapped to S to form a two-dimensional path planning domain, as follows;
[0112] Extract the two-dimensional projection coordinates of all points in the point cloud of the curved surface region onto the bounding box plane S with the largest area, generate a two-dimensional projection coordinate set, which covers the entire bounding box with the largest area, and use the two-dimensional projection coordinate set as the two-dimensional path planning domain.
[0113] The two-dimensional projection coordinate set is the two-dimensional path planning domain. Moreover, this coordinate set is particularly complete, as it can cover all areas within the largest rectangular bounding box. When used to design the robot's grinding path, it can grind the entire curved surface, thereby reducing the occurrence of areas that are not ground.
[0114] Principal component analysis ensures that the two-dimensional projected coordinate set retains the main extension features of the curved surface region to the maximum extent, alleviating the projection distortion problem. It also transforms the complex three-dimensional path planning problem into a more manageable two-dimensional planar planning problem, providing a simple and reliable geometric basis for the subsequent sampling and sorting of key points of the path.
[0115] In an optional embodiment, in S3, path key points are sampled and sorted in the two-dimensional path planning domain to generate a two-dimensional ordered key point sequence, as follows:
[0116] In the two-dimensional path planning domain, based on the largest area rectangular bounding box, the rectangular plane of the largest area rectangular bounding box is divided into a regular two-dimensional grid map according to the preset polishing path step size; a unique two-dimensional index coordinate is added to each grid cell in the two-dimensional grid map to form a spatial index framework covering the entire two-dimensional path planning domain, so that the grid map range matches the area to be processed, i.e., the largest area rectangular bounding box.
[0117] As an explanation: the preset grinding path step length is determined by the effective processing radius and processing accuracy requirements of the robot's end-effector grinding tool;
[0118] On a two-dimensional grid map, initial key points are collected at preset reference locations in each grid cell;
[0119] For clarification: The preset reference position can be the grid center;
[0120] The inverse transformation is performed according to the preset coordinate transformation matrix to map the two-dimensional index coordinates of the grid cells to the three-dimensional space of the point cloud of the curved area. The Z-axis coordinates of each initial key point are obtained by the nearest neighbor search of the KD tree algorithm, and the three-dimensional point cloud position corresponding to each initial key point is obtained.
[0121] As an explanation: the three-dimensional space in which the point cloud of the curved area is located refers to the coordinate system of the depth camera or laser scanner.
[0122] The curvature value of the surface region corresponding to each initial key point is obtained by using the 3D point cloud position corresponding to each initial key point;
[0123] The preset basic sampling density is 1 sampling point per grid cell. When the curvature value of the surface region corresponding to the initial key point is greater than the preset threshold, the sampling density is adjusted to N sampling points per grid cell, where N is a positive integer and N≥2. When the curvature value of the surface region corresponding to the initial key point is less than or equal to the preset threshold, the preset basic sampling density is used, and the initial key point is the sampling point of that grid cell.
[0124] This application obtains the 3D point cloud positions corresponding to initial key points through inverse transformation of a preset coordinate transformation matrix and a KD-tree algorithm, and then obtains the curvature value of the surface region corresponding to the initial key points. When the curvature value is greater than a preset threshold, the sampling density is increased from collecting 1 sampling point per grid cell to collecting N sampling points per grid cell, so that high curvature regions can cover details through multiple sampling points. When the curvature is small, the preset basic sampling density is maintained to avoid redundant calculations. This design dynamically matches the sampling density with the surface complexity, which, compared to fixed-density sampling, alleviates the problem of missed wear in high-curvature complex regions due to sparse sampling and redundant time consumption in low-curvature simple regions due to dense sampling.
[0125] Based on the unique two-dimensional index coordinates corresponding to each grid cell, multiple sampling points are obtained by traversing the grid cells on the two-dimensional grid map. Each sampling point carries the unique two-dimensional index coordinates corresponding to the grid cell.
[0126] The two-dimensional coordinates of each sampling point within the two-dimensional path planning domain are obtained as two-dimensional ordered key points, which are then arranged in a preset order to form a two-dimensional ordered key point sequence.
[0127] As an explanation, key points are arranged in a preset order to form a two-dimensional ordered sequence. The preset order can be set to an "I" shaped path, such as... Figure 3 As shown;
[0128] In an optional embodiment, in S4, the two-dimensional ordered keypoint sequence is projected onto the triangular mesh model to obtain a three-dimensional ordered keypoint sequence, as follows:
[0129] The inverse transformation is performed based on the preset coordinate transformation matrix to map the two-dimensional coordinates of each sampling point in the two-dimensional ordered key point sequence within the two-dimensional path planning domain to the three-dimensional space of the curved area point cloud, thus obtaining temporary three-dimensional coordinates.
[0130] In the triangular mesh model, temporary 3D coordinates are used as search anchor points. The nearest neighbor search of the temporary coordinates is performed by the KD tree algorithm to find the nearest triangular mesh vertex or triangular facet point. The temporary 3D coordinates are replaced by the 3D coordinates of the triangular mesh vertex or triangular facet point to obtain the 3D point cloud position corresponding to each sampling point as the 3D ordered key point. The 3D ordered key point sequence is formed according to the preset order.
[0131] In an optional embodiment, in S5, a continuous processing path is constructed on the triangular mesh model based on the three-dimensional ordered key point sequence, as follows:
[0132] For the three-dimensional ordered key points in the three-dimensional ordered key point sequence, adjacent three-dimensional ordered key points are connected sequentially on the triangular mesh model according to the order of the three-dimensional ordered key point sequence, forming a continuous processing path;
[0133] The continuous processing path consists of vertices and edges on a triangular mesh, which can be directly adapted to the robot's motion control commands;
[0134] In the process of generating continuous processing paths using graph search algorithms, the path only moves along the edges of triangular meshes or inside triangular faces.
[0135] This application transforms the complex 3D surface coverage path planning problem of a workpiece into two low-complexity subproblems: key point sampling in a 2D path planning domain and 3D shortest path search on a triangular mesh model. Only a small number of sampling points are sampled in the 2D path planning domain. The sampling process relies on a spatial indexing framework to avoid global traversal of unordered point clouds. The KD-tree algorithm's nearest neighbor search is used to locate the 3D coordinates, and a graph search algorithm sequentially connects adjacent ordered 3D key points to form a continuous processing path. This significantly reduces the computational load, facilitates real-time path planning response, and alleviates the problems of long processing times and difficulty in real-time response in traditional online planning.
[0136] Graph search algorithms include the A* search algorithm. When using the A* search algorithm, on a triangular mesh model, the vertices of the triangular facets are used as the search nodes of the A* search algorithm, and the edges connecting adjacent vertices in the triangular mesh are used as the edges of the A* search algorithm. The weight of the edge is the Euclidean distance between the vertices of the two triangular facets.
[0137] As an explanation, the triangular mesh model is made up of multiple triangular facets. Each triangular facet has 3 vertices and 3 edges. Adjacent triangular facets share an edge, and the line segment connecting the vertices is the edge of the triangle. The triangular mesh is made up of multiple triangular facets by sharing vertices or sharing edges. The triangular mesh serves as the surface of the workpiece to restore the complete surface shape of the workpiece.
[0138] This application transforms preprocessed point clouds into triangular mesh models using Poisson reconstruction. These triangular mesh models are used to reconstruct the geometry of the workpiece surface. When projecting a sequence of ordered 2D key points onto the triangular mesh model, the temporary 3D coordinates obtained from the inverse transformation are used as anchor points to search for the nearest vertices or points within the triangular mesh, ensuring that the projected points always lie on the workpiece surface. A graph search algorithm sequentially connects adjacent ordered 3D key points, with the path moving only along the edges of the triangular mesh or within the triangular facets. This ensures the path closely adheres to the surface from a topological perspective. Simultaneously, PCA principal component analysis is used to construct a 2D path planning domain, mitigating projection distortion. This improves the accuracy of the 2D-to-3D mapping and alleviates the problems of existing path planning methods, which suffer from a lack of surface constraints leading to paths drifting away from the workpiece surface or relying on idealized surface functions that deviate from the actual workpiece, requiring manual path adjustments.
[0139] In an optional embodiment, the method further includes: for a continuous machining path, using the triangular centroid coordinate interpolation method to correct the three-dimensional coordinates of the path points through the triangular facets where the path points are located on the continuous machining path, to obtain a smooth machining path;
[0140] like Figure 2 The automatic path planning system for a polishing robot, as shown, includes:
[0141] Model building module: Constructs the 3D surface model and triangular mesh model to be processed;
[0142] Two-dimensional path planning domain generation module: Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain.
[0143] Two-dimensional ordered key point sequence generation module: On the two-dimensional path planning domain, the path key points are sampled and sorted to generate a two-dimensional ordered key point sequence;
[0144] 3D ordered key point sequence generation module: Projects the 2D ordered key point sequence onto the triangular mesh model to obtain the 3D ordered key point sequence;
[0145] Continuous processing path generation module: Constructs a continuous processing path on a triangular mesh model based on a three-dimensional ordered sequence of key points.
[0146] For clarification, "acquisition" in this application refers to obtaining the required content or data using existing technical means.
[0147] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0148] In the embodiments provided by this invention, it should be understood that the disclosed system or method can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.
[0149] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0150] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.
[0151] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention.
[0152] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An automatic path planning method for curved surfaces in a grinding robot, characterized in that, Includes the following steps: S1. Construct the 3D surface model and triangular mesh model to be processed; S2. Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain. S3. In the two-dimensional path planning domain, sample and sort the key points of the path to generate a two-dimensional ordered key point sequence; S4. Project the two-dimensional ordered key point sequence onto the triangular mesh model to obtain the three-dimensional ordered key point sequence; S5. Construct a continuous processing path on the triangular mesh model based on the three-dimensional ordered key point sequence; In S3, key points of the path are sampled and sorted in the two-dimensional path planning domain to generate a two-dimensional ordered sequence of key points, as follows: In the two-dimensional path planning domain, based on the largest area rectangular bounding box, the rectangular plane of the largest area rectangular bounding box is divided into a regular two-dimensional grid map according to the preset polishing path step size. Add unique two-dimensional index coordinates to each grid cell in the two-dimensional grid map to form a spatial index framework covering the entire two-dimensional path planning domain; On a two-dimensional grid map, initial key points are collected at preset reference locations in each grid cell; The inverse transformation is performed according to the preset coordinate transformation matrix to map the two-dimensional index coordinates of the grid cells to the three-dimensional space of the point cloud of the curved area. The Z-axis coordinates of each initial key point are obtained by the nearest neighbor search of the KD tree algorithm, and the three-dimensional point cloud position corresponding to each initial key point is obtained. The curvature value of the surface region corresponding to each initial key point is obtained by using the 3D point cloud position corresponding to each initial key point; The preset basic sampling density is 1 sampling point per grid cell. When the curvature value of the surface region corresponding to the initial key point is greater than the preset threshold, the sampling density is adjusted to N sampling points per grid cell, where N is a positive integer and N≥2. When the curvature value of the surface region corresponding to the initial key point is less than or equal to the preset threshold, the preset basic sampling density is used, and the initial key point is the sampling point of that grid cell. Based on the unique two-dimensional index coordinates corresponding to each grid cell, multiple sampling points are obtained by traversing the grid cells on the two-dimensional grid map. Each sampling point carries the unique two-dimensional index coordinates corresponding to the grid cell. The two-dimensional coordinates of each sampling point within the two-dimensional path planning domain are obtained as two-dimensional ordered key points, which are then arranged in a preset order to form a two-dimensional ordered key point sequence.
2. The automatic path planning method for curved surfaces of a grinding robot according to claim 1, characterized in that, In S1, the 3D surface model and triangular mesh model to be processed are constructed as follows: Use a depth camera or laser scanner to scan the target workpiece and obtain point cloud data of the workpiece surface; Preprocess the point cloud data of the workpiece surface; The preprocessed point cloud data is used as the 3D surface model to be processed; The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.
3. The automatic path planning method for curved surfaces of a grinding robot according to claim 1, characterized in that, In S2, the 3D surface model to be processed is divided into several surface regions, as follows: Obtain the normal vector of each point in the 3D surface model to be processed, and obtain the angle between the normals of any two adjacent points in the 3D surface model to be processed; Based on the included normal angle between two adjacent points, a clustering algorithm is used to segment the surface region of the three-dimensional surface model to be processed, resulting in several surface regions; Within each surface region, the normal angle between any two adjacent points is less than a preset threshold.
4. The automatic path planning method for a polishing robot surface according to claim 1 or 3, characterized in that, In S2, a rectangular bounding box plane S with the largest area is fitted to each surface region, as follows: For each surface region, obtain the points in the surface region and generate a point cloud of the surface region; In the three-dimensional space where the point cloud of the curved region is located, the area of the rectangular bounding box on any two-dimensional plane P is: Project the point cloud of the curved region onto the two-dimensional plane P to obtain the corresponding two-dimensional projection point set; Fit a rectangle in the two-dimensional plane P that can completely cover the two-dimensional projection point set, and the adjacent sides of the rectangle are parallel to the preset orthogonal direction in the two-dimensional plane P. The area of this rectangle is the area of the rectangular bounding box of the point cloud of the curved region on the two-dimensional plane P. Principal component analysis (PCA) is applied to the point cloud of the curved region to obtain three eigenvalues and three corresponding eigenvectors. The three eigenvalues are classified into the largest eigenvalue, the second largest eigenvalue, and the smallest eigenvalue according to their numerical values. The eigenvector corresponding to the largest eigenvalue is the largest eigenvector, the eigenvector corresponding to the second largest eigenvalue is the second largest eigenvector, and the eigenvector corresponding to the smallest eigenvalue is the smallest eigenvector. The direction pointed to by the largest eigenvector is taken as the direction of the first principal component. The direction pointed to by the second largest eigenvector is taken as the direction of the second principal component, and the direction of the second principal component is orthogonal to the direction of the first principal component. The direction pointed to by the smallest eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the directions of the first principal component and the second principal component. The plane spanned by the first principal component direction and the second principal component direction is used as the reference projection plane, with the first principal component direction as the X-axis and the second principal component direction as the Y-axis. Obtain the centroid of the point cloud of the curved region. In the reference projection plane, establish a coordinate system with the centroid of the point cloud of the curved region as the origin and the direction of the third principal component as the Z-axis. The original three-dimensional coordinates of all points in the point cloud of the curved surface region are transformed into the coordinate system using a preset coordinate transformation matrix. Extract the X-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the X-axis direction within the reference projection plane; Extract the Y-axis coordinates of all points in the point cloud of the curved surface region and take the maximum value. and minimum value , and The difference is the length of the bounding box in the Y-axis direction within the reference projection plane; by( , ), ( , ), ( , ), ( , Using four vertices, fit the bounding box with the largest area in the reference projection plane to form the bounding box plane S with the largest area.
5. The automatic path planning method for curved surfaces of a grinding robot according to claim 4, characterized in that, In S2, points in each surface region are mapped to S to form a two-dimensional path planning domain, as follows; Extract the two-dimensional projection coordinates of all points in the point cloud of the curved surface region onto the bounding box plane S with the largest area, and generate a set of two-dimensional projection coordinates. The set of two-dimensional projection coordinates covers the entire bounding box with the largest area and serves as the two-dimensional path planning domain.
6. The automatic path planning method for curved surfaces of a grinding robot according to claim 5, characterized in that, In S4, the two-dimensional ordered keypoint sequence is projected onto the triangular mesh model to obtain the three-dimensional ordered keypoint sequence, as follows: The inverse transformation is performed based on the preset coordinate transformation matrix to map the two-dimensional coordinates of each sampling point in the two-dimensional ordered key point sequence within the two-dimensional path planning domain to the three-dimensional space of the curved area point cloud, thus obtaining temporary three-dimensional coordinates. In the triangular mesh model, temporary 3D coordinates are used as search anchor points. The nearest neighbor of the temporary 3D coordinates is searched using the KD tree algorithm. The temporary 3D coordinates are replaced with the 3D coordinates of the triangular mesh vertices or triangular facets. The 3D point cloud position corresponding to each sampling point is obtained as the 3D ordered key point and arranged in a preset order to form a 3D ordered key point sequence.
7. The automatic path planning method for curved surfaces of a grinding robot according to claim 6, characterized in that, In S5, a continuous processing path is constructed on the triangular mesh model based on the three-dimensional ordered key point sequence, as follows: For the three-dimensional ordered key points in the three-dimensional ordered key point sequence, adjacent three-dimensional ordered key points are connected sequentially on the triangular mesh model according to the order of the three-dimensional ordered key point sequence, forming a continuous processing path; In the process of generating continuous processing paths using a graph search algorithm, the path only moves along the edges of the triangular mesh or inside the triangular facets.
8. The automatic path planning method for curved surfaces of a grinding robot according to claim 1, characterized in that, Also includes: For continuous machining paths, the three-dimensional coordinates of the path points are corrected by using the triangular centroid coordinate interpolation method based on the triangular facets where the path points are located, thus obtaining a smooth machining path.
9. An automatic path planning system for a grinding robot, used in accordance with the automatic path planning method for a grinding robot according to any one of claims 1 to 8, characterized in that, include: Model building module: Constructs the 3D surface model and triangular mesh model to be processed; Two-dimensional path planning domain generation module: Divide the three-dimensional surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area for each surface region, and map the points in each surface region to S to form a two-dimensional path planning domain. Two-dimensional ordered key point sequence generation module: On the two-dimensional path planning domain, the path key points are sampled and sorted to generate a two-dimensional ordered key point sequence; 3D ordered key point sequence generation module: Projects the 2D ordered key point sequence onto the triangular mesh model to obtain the 3D ordered key point sequence; Continuous processing path generation module: Constructs a continuous processing path on a triangular mesh model based on a three-dimensional ordered sequence of key points.
Citation Information
Patent Citations
Water turbine top cover in-place robot polishing and shaping machining method based on 3D vision
CN118204841A
Robot path planning method for mixed-flow water turbine runner blade defect inspection
CN119347777A