Method and system for automatically planning curved surface path of grinding robot

By converting three-dimensional surface path planning into a two-dimensional path planning domain and using the KD tree algorithm and graph search algorithm to generate a three-dimensional ordered key point sequence, the problem of time-consuming three-dimensional surface path planning is solved, and real-time response and path accuracy are achieved.

CN120755896AActive Publication Date: 2025-10-10TUSU AUTOMATION TECH (SHANGHAI) CO LTD

Patent Information

Application Number
CN202511287644.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-10-10
Estimated Expiration
2045-09-10

AI Technical Summary

Technical Problem

Existing technologies have the problems of being time-consuming and difficult to respond in real time in three-dimensional surface path planning. Especially when the number of point clouds is large, traditional online planning cannot quickly adapt to the dynamic adjustment needs of the production line.

Method used

The three-dimensional surface path planning is converted into a two-dimensional path planning domain, and a three-dimensional ordered key point sequence is generated through sampling and projection technology. The KD tree algorithm and graph search algorithm are used to generate a continuous processing path, and the path planning is performed in combination with the triangular mesh model.

Benefits of technology

The amount of calculation is greatly reduced, real-time response is achieved, the accuracy and adaptability of path planning are improved, and the problem of the path drifting off the workpiece surface is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120755896A_ABST
    Figure CN120755896A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic planning method and system for a curved surface path of a grinding robot, and the method comprises the following steps: S1, constructing a to-be-machined three-dimensional curved surface model and a triangular mesh model, and relates to the technical field of automatic control of robots for surface machining in the manufacturing industry. According to the method, a complex three-dimensional surface coverage path planning problem of a workpiece is converted into two low-complexity sub-problems of key point sampling of a two-dimensional path planning domain and three-dimensional shortest path searching on a triangular mesh model, a small number of sampling points are sampled only on the two-dimensional path planning domain, and the sampling process depends on a spatial index framework; according to the method, global traversal of disordered point clouds is avoided, three-dimensional coordinates are positioned through nearest neighbor search of a KD tree algorithm, adjacent three-dimensional ordered key points are sequentially connected through a graph search algorithm, and a continuous machining path is formed, so that the operand is greatly reduced, real-time response of path planning is facilitated, and the problems that traditional online planning is long in time consumption and difficult in real-time response are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot automatic control for surface processing in the manufacturing industry, and in particular to a method and system for automatically planning a curved surface path of a polishing robot. Background Art

[0002] In the field of surface processing in the manufacturing industry, automating the surface polishing process has become a key requirement for manufacturing upgrades. The core technical bottleneck lies in generating the footprint path for the robot end-of-line tool on the workpiece's three-dimensional surface. Footprint path planning is a core branch of robotic motion planning. Its goal is to generate a path that traverses all reachable points within the target area while balancing coverage efficiency and obstacle avoidance. For planar surface coverage, existing technologies can achieve this by dividing the map into grids and setting traversal rules such as zigzag or I-shaped paths. This technology is mature and has low computational complexity. However, for three-dimensional curved surface coverage, planar planning methods are completely unsuitable because a simple coordinate traversal of the three-dimensional model cannot cover all points. Therefore, a tailored technical solution for three-dimensional scenarios is required. Currently, the mainstream three-dimensional surface path planning solutions in the industry fall into two categories: offline planning and online planning. Offline planning is the traditional 3D 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 polishing path on this idealized model surface. The essence of this type of solution is to rely on pre-built high-precision digital models for planning. If the workpiece model or processing requirements change, the digital model and surface function need to be rebuilt. It cannot quickly respond to the dynamic adjustment needs of the production line and has poor adaptability.

[0003] To alleviate the problem of offline planning's inability to quickly respond to the dynamic adjustments required by the production line, online planning has emerged. Existing online planning uses visual cameras or 3D scanning devices to scan the workpiece in real time, reconstructing a 3D model of the workpiece as a point cloud or triangular mesh. It then automatically generates a sequence of machining path coordinates directly from this 3D model, theoretically enabling real-time planning while scanning and machining. However, due to the disordered nature of 3D point clouds, path planning for concentrated 3D points uses wavefront shaping algorithms, genetic algorithms, and ant colony algorithms to perform path planning directly on the point cloud. This requires traversing a large number of vertices in the point cloud to locate the coordinates of the path points. When the number of point clouds is large, the algorithm consumes a significant amount of time, making it difficult to meet the real-time processing requirements of online planning. Summary of the Invention

[0004] In order to alleviate the problems of traditional online planning in the background technology that it is time-consuming and difficult to respond in real time when the number of point clouds is large, the present invention proposes a method and system for automatic planning of the surface path of a polishing robot.

[0005] The present invention proposes a method for automatically planning a curved path for a polishing robot, comprising the following steps: S1, constructing a three-dimensional surface model and a triangular mesh model to be processed; S2. Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; S3. Sampling and sorting path key points in the two-dimensional path planning domain to generate a two-dimensional ordered key point sequence; S4, projecting the two-dimensional ordered key point sequence onto the triangular mesh model to obtain a three-dimensional ordered key point sequence; S5. Construct a continuous processing path on the triangular mesh model according to the three-dimensional ordered key point sequence.

[0006] Preferably, in S1, a three-dimensional surface model and a 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; For explanation: point cloud data is a set of discrete points on the workpiece surface in three-dimensional space, which contains the geometric information of the workpiece surface; the target workpiece refers to the workpiece that the grinding robot needs to grind; Preprocess the point cloud data of the workpiece surface; Preprocessing of the workpiece surface point cloud data includes noise filtering, smoothing and point cloud density reconstruction; The pre-processed point cloud data is used as the three-dimensional surface model to be processed; The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.

[0007] Preferably, in S2, the three-dimensional surface model to be processed is divided into several surface areas as follows: Obtaining the normal vector of each point in the three-dimensional surface model to be processed, and obtaining the normal angle between any two adjacent points in the three-dimensional surface model to be processed; The normal angle refers to the angle between two normal vectors; According to the normal angle between two adjacent points, a clustering algorithm is used to segment the surface area of ​​the three-dimensional surface model to be processed to obtain several surface areas; In each surface area, the normal angle between any two adjacent points is less than a preset threshold.

[0008] Preferably, in S2, a rectangular bounding box plane S with the largest area is fitted for each curved surface area, as follows: For each surface area, obtain the points in the surface area and generate a point cloud of the surface area; In the three-dimensional space where the surface area point cloud is located, the area of ​​the rectangular bounding box on any two-dimensional plane P is: project the surface area point cloud 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 directions in the two-dimensional plane P. The area of ​​this rectangle is the area of ​​the rectangular bounding box of the surface area point cloud on the two-dimensional plane P; The principal component analysis algorithm is used on the point cloud of the surface area to obtain three eigenvalues ​​and three eigenvectors corresponding to the three eigenvalues; the three eigenvalues ​​are divided 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 by the maximum eigenvector is taken as the direction of the first principal component; The direction of 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 of the minimum eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the direction of the first principal component and the direction of the second principal component; As an illustration, in principal component analysis, the number of eigenvalues ​​and eigenvectors corresponding to eigenvalues ​​is determined by the data dimension: three-dimensional data corresponds to 3 eigenvalues, and n-dimensional data corresponds to n eigenvalues. 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; Get the centroid of the point cloud of the surface area, and establish a coordinate system in the reference projection plane with the centroid of the point cloud of the surface area as the coordinate origin and the direction of the third principal component as the Z axis; The original 3D coordinates of all points in the surface area point cloud are converted to the coordinate system through a preset coordinate transformation matrix. At this time, the Z coordinate value of each point in the surface area point cloud reflects its vertical distance relative to the reference projection surface S, while the X and Y coordinates constitute the 2D projection coordinates of the point on the reference projection surface S, thus completing the mapping of the 3D point cloud to the 2D planning domain. Extract the X-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the X-axis direction in the reference projection plane; Extract the Y-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the Y-axis direction in the reference projection plane; by( , )、( , )、( , )、( , ) are the four vertices, and a rectangular bounding box with the largest area is fitted in the reference projection plane to form a rectangular bounding box plane S with the largest area.

[0009] Preferably, in S2, the points in each surface region are mapped to S to form a two-dimensional path planning domain as follows; The two-dimensional projection coordinates of all points in the point cloud of the surface area on the plane S of the rectangular bounding box with the largest area are extracted to generate a two-dimensional projection coordinate set. The two-dimensional projection coordinate set covers the entire domain of the rectangular bounding box with the largest area, and the two-dimensional projection coordinate set is used as the two-dimensional path planning domain.

[0010] Preferably, 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: In the two-dimensional path planning domain, taking the rectangular bounding box of the largest area as the benchmark, the rectangular plane of the rectangular bounding box of the largest area is divided into a regular two-dimensional grid map according to the preset grinding 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, that is, the rectangular bounding box of the largest area; As an explanation: the preset grinding path step length is determined by the effective machining radius and machining accuracy requirements of the robot end grinding tool; On a two-dimensional grid map, initial key points are collected at the preset reference position of each grid cell; As an illustration: the preset reference position may be the center of the grid; Perform an inverse transformation based on the preset coordinate transformation matrix to map the 2D index coordinates of the grid unit to the 3D space of the surface area point cloud. Obtain the Z-axis coordinate of each initial key point through the nearest neighbor search of the KD tree algorithm to obtain the 3D point cloud position corresponding to each initial key point. As an explanation: the three-dimensional space where the point cloud of the surface area is located refers to the coordinate system of the depth camera or laser scanner; Obtain the curvature value of the surface area corresponding to each initial key point through the three-dimensional point cloud position corresponding to each initial key point; The preset basic sampling density is 1 grid unit collecting 1 sampling point. When the curvature value of the initial key point corresponding to the curved surface region is greater than a preset threshold, the sampling density is adjusted to 1 grid unit collecting N sampling points, N is a positive integer and N≥2. When the curvature value of the initial key point corresponding to the curved surface region is less than or equal to the preset threshold, the preset basic sampling density is adopted. At this time, the initial key point is the sampling point of the grid unit; According to the unique two-dimensional index coordinates corresponding to each grid unit, the grid units on the two-dimensional grid map are traversed to obtain a plurality of sampling points, each sampling point carrying the unique two-dimensional index coordinates corresponding to the grid unit; The two-dimensional coordinates of each sampling point in the two-dimensional path planning domain are obtained as two-dimensional ordered key points, and the two-dimensional ordered key points are arranged in a preset order to form a two-dimensional ordered key point sequence.

[0011] Preferably, in S4, the two-dimensional ordered key point sequence is projected onto the triangular mesh model to obtain a three-dimensional ordered key point sequence, as follows: According to the preset coordinate transformation matrix, the two-dimensional coordinates of each sampling point in the two-dimensional ordered key point sequence in the two-dimensional path planning domain are inversely transformed to the three-dimensional space where the point cloud of the curved surface region is located, to obtain temporary three-dimensional coordinates; In the triangular mesh model, the temporary three-dimensional coordinates are used as search anchor points, and the nearest triangular mesh vertex or triangular face internal point to the temporary coordinates is searched through the nearest neighbor search of the KD tree algorithm. The three-dimensional coordinates of the triangular mesh vertex or triangular face internal point are used to replace the temporary three-dimensional coordinates, to obtain the three-dimensional point cloud position corresponding to each sampling point as a three-dimensional ordered key point, and the three-dimensional ordered key points are arranged in a preset order to form a three-dimensional ordered key point sequence.

[0012] Preferably, in S5, according to the three-dimensional ordered key point sequence, a continuous machining path is constructed on the triangular mesh model, as follows: The three-dimensional ordered key points in the three-dimensional ordered key point sequence are sequentially connected through a graph search algorithm according to the order of the three-dimensional ordered key point sequence, to form a continuous machining path on the triangular mesh model; The continuous machining path is composed of vertices and edges on the triangular mesh, and can be directly adapted to the motion control instructions of the robot; In the process of generating the continuous machining path by using the graph search algorithm, the path only moves along the edges of the triangular mesh or inside the triangular faces.

[0013] Preferably, the system further comprises: for the continuous machining path, the three-dimensional coordinates of the path points are corrected by using a triangular barycentric coordinate interpolation method through the triangular faces where the path points are located, to obtain a smooth machining path.

[0014] A polishing robot curved surface path automatic planning system, comprising: Model building module: builds the three-dimensional surface model and triangular mesh model to be processed; 2D path planning domain generation module: Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; Two-dimensional ordered key point sequence generation module: In the two-dimensional path planning domain, 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 a 3D ordered key point sequence; Continuous machining path generation module: Constructs a continuous machining path on the triangular mesh model based on a three-dimensional ordered key point sequence.

[0015] The present invention provides a method and system for automatically planning a curved path for a polishing robot, which has the following beneficial technical effects: 1. This application transforms the complex three-dimensional surface coverage path planning problem of the workpiece into two low-complexity sub-problems: key point sampling in the two-dimensional path planning domain and three-dimensional shortest path search on the triangular mesh model. Only a small number of sampling points are sampled in the two-dimensional path planning domain. The sampling process relies on the spatial index framework to avoid global traversal of the unordered point cloud. The nearest neighbor search of the KD tree algorithm is used to locate the three-dimensional coordinates. The adjacent three-dimensional ordered key points are sequentially connected through the graph search algorithm to form a continuous processing path, thereby greatly reducing the amount of calculation, facilitating the real-time response of path planning, and alleviating the problems of traditional online planning being time-consuming and difficult to respond in real time when the number of point clouds is large.

[0016] 2. This application converts 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 a two-dimensional ordered sequence of key points 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 facet internal point, so that the projection point is always on the workpiece surface; adjacent three-dimensional ordered key points are connected in sequence through a graph search algorithm, and the path only moves along the edge of the triangular mesh or the inside of the triangular facet, so that the path is close to the surface from a topological structure. At the same time, a two-dimensional path planning domain is constructed through PCA principal component analysis to alleviate projection distortion; thereby improving the accuracy of the mapping from two-dimensional to three-dimensional, and alleviating the problem that the existing path planning causes the path to drift away from the workpiece surface due to the lack of surface constraints, or due to the reliance on idealized surface function fitting and the deviation from the actual workpiece, and the path needs to be manually adjusted.

[0017] 3. This application uses a preset inverse coordinate transformation matrix and a KD tree algorithm to obtain the three-dimensional point cloud position corresponding to the initial key point, and then obtains the curvature value of the surface area corresponding to the initial key point. When the curvature value is greater than a preset threshold, the sampling density is increased from collecting one sampling point per grid cell to collecting N sampling points per grid cell, so that areas with high curvature values ​​are covered with 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 complexity of the surface. Compared with fixed-density sampling, it alleviates the problems of missed sampling in complex areas with high curvature due to sparse sampling and redundant and time-consuming sampling in simple areas with low curvature due to dense sampling. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a flow chart of a method for automatically planning a curved path for a polishing robot according to the present invention; Figure 2 This is a functional block diagram of an automatic planning system for a polishing robot curved path according to the present invention; Figure 3 When the two-dimensional ordered key point sequence is formed according to a preset sequence according to the present invention, the preset sequence can be set as an illustration of an I-shaped path. DETAILED DESCRIPTION

[0019] The following describes embodiments of the present invention in detail. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar symbols throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended only to explain the present invention, and are not to be construed as limiting the present invention.

[0020] like Figure 1 The method for automatically planning a curved path for a polishing robot shown includes the following steps: S1, constructing a three-dimensional surface model and a triangular mesh model to be processed; S2. Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; S3. Sampling and sorting path key points in the two-dimensional path planning domain to generate a two-dimensional ordered key point sequence; S4, projecting the two-dimensional ordered key point sequence onto the triangular mesh model to obtain a three-dimensional ordered key point sequence; S5. Construct a continuous processing path on the triangular mesh model according to the three-dimensional ordered key point sequence.

[0021] In an optional embodiment, in S1, a three-dimensional surface model and a 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; Point cloud data is a set of discrete points on the workpiece surface in three-dimensional space, which contains the geometric information of the workpiece surface; The target workpiece refers to the workpiece that the grinding robot needs to grind; Preprocess the point cloud data of the workpiece surface; Preprocessing of the workpiece surface point cloud data includes noise filtering, smoothing and point cloud density reconstruction; The pre-processed point cloud data is used as the three-dimensional surface model to be processed; The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.

[0022] In an optional embodiment, in S2, the three-dimensional surface model to be processed is divided into a plurality of surface areas as follows: Obtaining the normal vector of each point in the three-dimensional surface model to be processed, and obtaining the normal angle between any two adjacent points in the three-dimensional surface model to be processed; The normal angle refers to the angle between two normal vectors; According to the normal angle between two adjacent points, a clustering algorithm is used to segment the surface area of ​​the three-dimensional surface model to be processed to obtain several surface areas; As an illustration, a clustering algorithm is used to segment the surface area of ​​the three-dimensional surface model to be processed, and a region growing algorithm is optionally used, based on the normal angle between two adjacent points, with a preset threshold as the region merging condition; As an illustration, within each surface region, the normal angle between any two adjacent points is less than a preset threshold; For example, suppose there are three points A, B, and C in the point cloud data, where A and B are adjacent points to each other, and B and C are adjacent points to each other; If the normal angle between A and B is less than a preset threshold, and the normal angle between B and C is less than a preset threshold, then the three points A, B, and C can be merged into one surface area; If the normal angle between A and B is less than the preset threshold, and the normal angle between B and C is greater than or equal to the preset threshold, then A and B are divided into one surface area, and C is divided into another surface area; In an optional embodiment, the preset threshold value of the normal angle is 90 degrees; In an optional embodiment, in S2, a rectangular bounding box plane S with a maximum area is fitted for each curved surface area as follows: For each surface area, obtain the points in the surface area and generate a point cloud of the surface area; In the three-dimensional space where the surface area point cloud is located, the area of ​​the rectangular bounding box on any two-dimensional plane P is: project the surface area point cloud 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 directions in the two-dimensional plane P. The area of ​​this rectangle is the area of ​​the rectangular bounding box of the surface area point cloud on the two-dimensional plane P; In this solution, the preset orthogonal directions will be subsequently associated with the principal component directions obtained by principal component analysis to achieve area maximization; The principal component analysis algorithm is used on the point cloud of the surface area to obtain three eigenvalues ​​and three eigenvectors corresponding to the three eigenvalues; the three eigenvalues ​​are divided 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 by the maximum eigenvector is taken as the direction of the first principal component; The direction of 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 of the minimum eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the direction of the first principal component and the direction of the second principal component; As an illustration, in principal component analysis, the number of eigenvalues ​​and eigenvectors corresponding to eigenvalues ​​is determined by the data dimension: three-dimensional data corresponds to 3 eigenvalues, and n-dimensional data corresponds to n eigenvalues. 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; Get the centroid of the point cloud of the surface area, and establish a coordinate system in the reference projection plane with the centroid of the point cloud of the surface area as the coordinate origin and the direction of the third principal component as the Z axis; The original 3D coordinates of all points in the surface area point cloud are converted to the coordinate system through a preset coordinate transformation matrix. At this time, the Z coordinate value of each point in the surface area point cloud reflects its vertical distance relative to the reference projection surface S, while the X and Y coordinates constitute the 2D projection coordinates of the point on the reference projection surface S, thus completing the mapping of the 3D point cloud to the 2D planning domain. Extract the X-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the X-axis direction in the reference projection plane; Extract the Y-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the Y-axis direction in the reference projection plane; by( , )、( , )、( , )、( , ) are four vertices, and a rectangular bounding box with the largest area is fitted in the reference projection plane to form a rectangular bounding box plane with the largest area S; In an optional embodiment, in S2, the 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 surface area point cloud on the plane S of the rectangular bounding box with the largest area, and generate a two-dimensional projection coordinate set. The two-dimensional projection coordinate set covers the entire domain of the rectangular bounding box with the largest area, and the two-dimensional projection coordinate set is used as the two-dimensional path planning domain; The two-dimensional projection coordinate set is the two-dimensional path planning domain. This coordinate set is particularly complete, covering all areas within the largest rectangular bounding box. It can be used to design the robot grinding path to grind the entire surface, thus reducing the occurrence of areas not being ground. Principal component analysis ensures that the two-dimensional projection coordinate set retains the main extension characteristics of the surface area to the greatest extent, alleviates the projection distortion problem, and transforms the complex three-dimensional path planning problem into a more tractable two-dimensional plane planning problem, providing a concise and reliable geometric foundation for subsequent sampling and sorting of path key points. 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: In the two-dimensional path planning domain, taking the rectangular bounding box of the largest area as the benchmark, the rectangular plane of the rectangular bounding box of the largest area is divided into a regular two-dimensional grid map according to the preset grinding 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, that is, the rectangular bounding box of the largest area; As an explanation: the preset grinding path step length is determined by the effective machining radius and machining accuracy requirements of the robot end grinding tool; On a two-dimensional grid map, initial key points are collected at the preset reference position of each grid cell; As an illustration: the preset reference position may be the center of the grid; Perform an inverse transformation based on the preset coordinate transformation matrix to map the 2D index coordinates of the grid unit to the 3D space of the surface area point cloud. Obtain the Z-axis coordinate of each initial key point through the nearest neighbor search of the KD tree algorithm to obtain the 3D point cloud position corresponding to each initial key point. As an explanation: the three-dimensional space where the point cloud of the surface area is located refers to the coordinate system of the depth camera or laser scanner; Obtain the curvature value of the surface area corresponding to each initial key point through the three-dimensional point cloud position corresponding to each initial key point; The preset basic sampling density is 1 sampling point per grid unit. When the curvature value of the surface area corresponding to the initial key point is greater than the preset threshold, the sampling density is adjusted to N sampling points per grid unit, where N is a positive integer and N ≥ 2. When the curvature value of the surface area 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 the grid unit. This application uses a preset coordinate transformation matrix inverse transformation and a KD tree algorithm to obtain the three-dimensional point cloud position corresponding to the initial key point, and then obtain the curvature value of the surface area corresponding to the initial key point. When the curvature value is greater than a preset threshold, the sampling density is increased from collecting one sampling point per grid unit to collecting N sampling points per grid unit, so that areas with high curvature values ​​are covered with 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 complexity of the surface. Compared with fixed-density sampling, it alleviates the problems of missed sampling in complex areas with high curvature due to sparse sampling and redundant and time-consuming sampling in simple areas with low curvature due to dense sampling.

[0023] According to the unique two-dimensional index coordinates corresponding to each grid cell, traverse the grid cells on the two-dimensional grid map to obtain multiple sampling points, each sampling point carries the unique two-dimensional index coordinates corresponding to the grid cell; The two-dimensional coordinates of each sampling point in the two-dimensional path planning domain are obtained as two-dimensional ordered key points, and are arranged in a preset order to form a two-dimensional ordered key point sequence.

[0024] As an illustration, a two-dimensional ordered sequence of key points is formed according to a preset order, and the preset order can be set as an I-shaped path, such as Figure 3 As shown; In an optional embodiment, in S4, the two-dimensional ordered key point sequence is projected onto the triangular mesh model to obtain a three-dimensional ordered key point sequence as follows: Perform an inverse transformation 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 in the two-dimensional path planning domain to the three-dimensional space where the point cloud of the surface area is located, and obtain temporary three-dimensional coordinates; In the triangular mesh model, a temporary 3D coordinate is used as the search anchor point. The nearest neighbor search of the temporary coordinate is performed using the KD tree algorithm to find the nearest triangular mesh vertex or triangle facet inner point. The temporary 3D coordinate is replaced by the 3D coordinate of the triangular mesh vertex or triangle facet inner point. The 3D point cloud position corresponding to each sampling point is obtained as a 3D ordered key point, which is arranged in a preset order to form a 3D ordered key point sequence. In an optional embodiment, in S5, a continuous processing path is constructed on the triangular mesh model according to 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 sequentially connected in the order of the three-dimensional ordered key point sequence on the triangular mesh model through a graph search algorithm to form a continuous processing path; The continuous machining path is composed of vertices and edges on the triangular mesh, which can be directly adapted to the robot's motion control instructions; In the process of generating continuous machining paths using graph search algorithms, the paths only move along the edges of the triangle mesh or inside the triangle patches; This application transforms the complex three-dimensional surface coverage path planning problem of the workpiece into two low-complexity sub-problems: key point sampling in the two-dimensional path planning domain and three-dimensional shortest path search on the triangular mesh model. Only a small number of sampling points are sampled in the two-dimensional path planning domain. The sampling process relies on the spatial index framework to avoid global traversal of the unordered point cloud. The nearest neighbor search of the KD tree algorithm is used to locate the three-dimensional coordinates. The adjacent three-dimensional ordered key points are connected in sequence through the graph search algorithm to form a continuous processing path, thereby greatly reducing the amount of calculation, facilitating the real-time response of path planning, and alleviating the problem that traditional online planning is time-consuming and difficult to respond in real time.

[0025] The graph search algorithm includes the A* search algorithm. When using the A* search algorithm, on a triangular mesh model, the vertices of the triangles are used as the search nodes of the A* search algorithm, and the edges connecting adjacent vertices in the triangle 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 triangles. For illustration, a triangular mesh model is composed of multiple triangular facets. Each triangular facet has three vertices and three edges. Adjacent triangular facets share an edge, and the line segment connecting the vertices is the triangle edge. A triangular mesh is composed of multiple triangular facets through shared vertices or shared edges. The triangular mesh is used as the workpiece surface to restore the complete surface shape of the workpiece. This application converts 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 a two-dimensional ordered sequence of key points 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 inside the facet, so that the projection point is always on the workpiece surface; adjacent three-dimensional ordered key points are connected in sequence through a graph search algorithm, and the path only moves along the edge of the triangular mesh or inside the triangular facet, so that the path is topologically close to the surface. At the same time, a two-dimensional path planning domain is constructed through PCA principal component analysis to alleviate projection distortion; thereby improving the accuracy of the mapping from two-dimensional to three-dimensional, and alleviating the problem that the existing path planning causes the path to drift away from the workpiece surface due to the lack of surface constraints, or due to the deviation from the actual workpiece due to reliance on idealized surface function fitting, and manual adjustment of the path is required.

[0026] In an optional embodiment, the method further includes: for the continuous processing path, using the triangle facets where the path points are located on the continuous processing path, correcting the three-dimensional coordinates of the path points using the triangle barycentric coordinate interpolation method to obtain a smooth processing path; like Figure 2 The automatic planning system for a polishing robot curved path shown includes: Model building module: builds the three-dimensional surface model and triangular mesh model to be processed; 2D path planning domain generation module: Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; Two-dimensional ordered key point sequence generation module: In the two-dimensional path planning domain, 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 a 3D ordered key point sequence; Continuous machining path generation module: Constructs a continuous machining path on the triangular mesh model based on a three-dimensional ordered key point sequence.

[0027] As an illustration, the acquisition in this application refers to obtaining the required content or data using existing technical means.

[0028] At the same time, the contents not described in detail in this specification belong to the existing technology well known to those skilled in the art.

[0029] In the embodiments provided by the present invention, it should be understood that the disclosed systems or methods can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative. For example, the division of modules is only a logical function division, and other division methods may be used in actual implementation.

[0030] Modules described as separate components may or may not be physically separate, and 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 these modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0031] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or hardware plus software functional modules.

[0032] It is obvious to those skilled in the art 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.

[0033] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A method for automatically planning a curved path for a polishing robot, characterized in that: The following steps are involved: S1, constructing a three-dimensional surface model and a triangular mesh model to be processed; S2. Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; S3. Sampling and sorting path key points in the two-dimensional path planning domain to generate a two-dimensional ordered key point sequence; S4, projecting the two-dimensional ordered key point sequence onto the triangular mesh model to obtain a three-dimensional ordered key point sequence; S5. Construct a continuous processing path on the triangular mesh model according to the three-dimensional ordered key point sequence; 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: In the two-dimensional path planning domain, taking the rectangular bounding box of the largest area as a reference, the rectangular plane of the rectangular bounding box of the largest area is divided into a regular two-dimensional grid map according to the preset polishing path step length; Add unique 2D index coordinates to each grid cell in the 2D grid map to form a spatial index framework covering the entire 2D path planning domain; On a two-dimensional grid map, initial key points are collected at the preset reference position of each grid cell; Perform an inverse transformation based on the preset coordinate transformation matrix to map the 2D index coordinates of the grid unit to the 3D space of the surface area point cloud. Obtain the Z-axis coordinate of each initial key point through the nearest neighbor search of the KD tree algorithm to obtain the 3D point cloud position corresponding to each initial key point. Obtain the curvature value of the surface area corresponding to each initial key point through the three-dimensional point cloud position corresponding to each initial key point; The preset basic sampling density is 1 sampling point per grid unit. When the curvature value of the surface area corresponding to the initial key point is greater than the preset threshold, the sampling density is adjusted to N sampling points per grid unit, where N is a positive integer and N ≥ 2. When the curvature value of the surface area 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 the grid unit. According to the unique two-dimensional index coordinates corresponding to each grid cell, traverse the grid cells on the two-dimensional grid map to obtain multiple sampling points, each sampling point carries the unique two-dimensional index coordinates corresponding to the grid cell; The two-dimensional coordinates of each sampling point in the two-dimensional path planning domain are obtained as two-dimensional ordered key points, and are arranged in a preset order to form a two-dimensional ordered key point sequence.

2. The method for automatically planning a curved path for a polishing robot according to claim 1, wherein: In S1, the three-dimensional 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 pre-processed point cloud data is used as the three-dimensional surface model to be processed; The preprocessed point cloud data is converted into a triangular mesh model using the Poisson reconstruction algorithm.

3. The method for automatically planning a curved path for a polishing robot according to claim 1, wherein: In S2, the three-dimensional surface model to be processed is divided into several surface areas, as follows: Obtaining the normal vector of each point in the three-dimensional surface model to be processed, and obtaining the normal angle between any two adjacent points in the three-dimensional surface model to be processed; According to the normal angle between two adjacent points, a clustering algorithm is used to segment the surface area of ​​the three-dimensional surface model to be processed to obtain several surface areas; In each surface region, the normal angle between any two adjacent points is less than a preset threshold.

4. The method for automatically planning a curved path for a polishing robot according to claim 1 or 3, wherein: In S2, a rectangular bounding box plane S with the largest area is fitted for each surface area, as follows: For each surface area, obtain the points in the surface area and generate a point cloud of the surface area; In the three-dimensional space where the surface area point cloud is located, the area of ​​the rectangular bounding box on any two-dimensional plane P is: project the surface area point cloud 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 directions in the two-dimensional plane P. The area of ​​this rectangle is the area of ​​the rectangular bounding box of the surface area point cloud on the two-dimensional plane P; The principal component analysis algorithm is used on the point cloud of the surface area to obtain three eigenvalues ​​and three eigenvectors corresponding to the three eigenvalues; the three eigenvalues ​​are divided 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 by the maximum eigenvector is taken as the direction of the first principal component; The direction of 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 of the minimum eigenvector is taken as the direction of the third principal component, and the direction of the third principal component is orthogonal to the direction of the first principal component and the direction of 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; Get the centroid of the point cloud of the surface area, and establish a coordinate system in the reference projection plane with the centroid of the point cloud of the surface area as the coordinate origin and the direction of the third principal component as the Z axis; The original three-dimensional coordinates of all points in the surface area point cloud are converted into the coordinate system through the preset coordinate transformation matrix; Extract the X-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the X-axis direction in the reference projection plane; Extract the Y-axis coordinates of all points in the surface area point cloud and take the maximum value and minimum value , and The difference is the length of the bounding box in the Y-axis direction in the reference projection plane; by( , )、( , )、( , )、( , ) are the four vertices, and a rectangular bounding box with the largest area is fitted in the reference projection plane to form a rectangular bounding box plane S with the largest area.

5. The method for automatically planning a curved path for a polishing robot according to claim 4, wherein: In S2, the points in each surface area are mapped to S to form a two-dimensional path planning domain as follows; The two-dimensional projection coordinates of all points in the point cloud of the surface area on the plane S of the rectangular bounding box with the largest area are extracted to generate a two-dimensional projection coordinate set. The two-dimensional projection coordinate set covers the entire domain of the rectangular bounding box with the largest area, and the two-dimensional projection coordinate set is used as the two-dimensional path planning domain.

6. The method for automatically planning a curved path for a polishing robot according to claim 5, characterized in that: In S4, the two-dimensional ordered key point sequence is projected onto the triangular mesh model to obtain a three-dimensional ordered key point sequence as follows: Perform an inverse transformation 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 in the two-dimensional path planning domain to the three-dimensional space where the point cloud of the surface area is located, and obtain temporary three-dimensional coordinates; In the triangular mesh model, a temporary three-dimensional coordinate is used as the search anchor point, and the nearest neighbor search of the temporary three-dimensional coordinate is performed through the KD tree algorithm to find the nearest triangular mesh vertex or triangle facet inner point. The temporary three-dimensional coordinate is replaced by the three-dimensional coordinate of the triangular mesh vertex or triangle facet inner point, and the three-dimensional point cloud position corresponding to each sampling point is obtained as a three-dimensional ordered key point, which is arranged in a preset order to form a three-dimensional ordered key point sequence.

7. The method for automatically planning a curved path for a polishing robot according to claim 6, wherein: 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 sequentially connected in the order of the three-dimensional ordered key point sequence on the triangular mesh model through a graph search algorithm to form a continuous processing path; In the process of generating continuous machining paths using graph search algorithms, the paths only move along the edges of the triangle mesh or inside the triangle patches.

8. The method for automatically planning a curved path for a polishing robot according to claim 1, wherein: Also includes: For continuous machining paths, the three-dimensional coordinates of the path points on the continuous machining path are corrected by using the triangle barycentric coordinate interpolation method through the triangular facets where the path points are located, and a smooth machining path is obtained.

9. A system for automatically planning a curved path for a polishing robot, used to implement the method for automatically planning a curved path for a polishing robot according to any one of claims 1 to 8, characterized in that: include: Model building module: builds the three-dimensional surface model and triangular mesh model to be processed; 2D path planning domain generation module: Divide the 3D surface model to be processed into several surface regions, fit a rectangular bounding box plane S with the largest area to each surface region, and map the points in each surface region to S to form a 2D path planning domain; Two-dimensional ordered key point sequence generation module: In the two-dimensional path planning domain, 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 a 3D ordered key point sequence; Continuous machining path generation module: Constructs a continuous machining path on the triangular mesh model based on a three-dimensional ordered key point sequence.

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

  • Mechanical arm curved surface scanning path planning method based on least square conformal algorithm

    CN119839868A

  • Welding seam self-adaption B spline curve fitting method facing 3D dense out-of-order point set

    CN120510220A

  • Multi-sensor-fusion-based autonomous mobile robot indoor and outdoor positioning method and robot

    US20230111122A1

Cited By

  • Conformal mapping-based robot polishing path planning method and device

    CN121132689A

  • A method and device for robot polishing path planning based on conformal mapping

    CN121132689B

  • Robot variable stiffness surface path planning method based on three-dimensional perception and application

    CN121245864A

  • A Robot Variable Stiffness Surface Path Planning Method Based on 3D Perception and Its Application

    CN121245864B

  • Spraying robot path planning method and system

    CN121492010A