A method for automatically generating a robot machining program for a multi-mold workpiece

By acquiring point cloud data of large forgings and castings, and using laser scanning and improved clustering algorithms to generate countless grinding programs, a robotic grinding and cleaning program is automatically generated, solving the automation problem of surface grinding and cleaning of large forgings and castings and realizing efficient and precise machining of countless molds.

CN115937468BActive Publication Date: 2026-06-23BEIHANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2022-12-01
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, the surface grinding and cleaning of large forgings and castings relies on manual operation, which is difficult to automate efficiently with robots. This is mainly due to the lack of accurate digital models, which makes it difficult to guarantee the processing quality and results in low efficiency.

Method used

By acquiring point cloud data of the blank part and using equipment such as laser scanners, combined with improved clustering algorithms and key point generation technology, a robot polishing program without digital models is generated. This includes point cloud classification, curvature calculation, auxiliary plane establishment, and path point generation, enabling the automatic generation of polishing and cleaning programs without digital models.

Benefits of technology

It enables the automatic generation of robot grinding programs under countless conditions, improves processing accuracy and efficiency, adapts to changes in workpiece curvature and differences in process parameters, and solves the problem of robot processing program generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115937468B_ABST
    Figure CN115937468B_ABST
Patent Text Reader

Abstract

The application discloses a kind of infinite die workpiece robot machining program automatic generation method in the field of intelligent manufacturing, comprising the following steps: step 1, obtain blank point cloud;Step 2, point cloud normal vector and Gaussian curvature calculation;Step 3, all point clouds are classified, generate construction point 1, obtain sub-region boundary line and sub-region clustering center point, then second clustering is carried out, and the boundary line clustering center point is obtained again;Step 4, generate construction point 3, generate surface construction key point using key point generation algorithm;Step 5, establish auxiliary plane point cloud, generate auxiliary plane based on sub-region clustering center point, boundary line clustering center point and surface construction key point;Step 6, generate initial path point, find the intersection of original point cloud and auxiliary plane point cloud, generate initial path point;Step 7, post-processing;Realize the generation of polishing and cleaning program not dependent on numerical model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for automatically generating robot machining programs in the field of intelligent manufacturing. Background Technology

[0002] Large forgings and castings are the foundation of a nation's manufacturing industry. In recent years, with my country's vigorous development of high-end equipment manufacturing, the use of large and complex forgings and castings in major engineering fields such as aerospace, shipbuilding, and energy has become increasingly frequent. After forging and casting, grinding and cleaning surface defects such as oxide scale, risers, and flash is a crucial step in the manufacturing process of large forgings and castings. The grinding quality directly affects the dimensional accuracy, damaged layer thickness, and part performance of the forgings and castings. Currently, almost all large forgings and castings still rely on manual high-intensity grinding, which makes it difficult to guarantee processing quality, control the surface damaged layer, and has extremely low work efficiency. Robotic machining, with its high flexibility and large working space, is particularly suitable for replacing manual grinding and cleaning of the surface of large forgings and castings.

[0003] Currently, robot machining programming includes two methods: teaching and offline programming. For grinding large components, teaching programming is labor-intensive and difficult to operate, while offline programming often requires path generation based on digital models. However, most large forgings and castings lack accurate digital models, and there are significant differences between different blanks. Therefore, it is difficult to perform offline programming for robot machining based on digital models, which limits the application of robot machining. Accordingly, there is an urgent need in this field for a method to generate robot grinding and cleaning programs for large forgings and castings that does not rely on digital models. Summary of the Invention

[0004] The purpose of this invention is to provide a method for automatically generating machining programs for robot workpieces without relying on digital models, which can generate grinding and cleaning programs without depending on digital models.

[0005] To achieve the above objectives, the present invention provides a method for automatically generating machining programs for robots with countless modular workpieces, comprising the following steps:

[0006] Step 1: Obtain the point cloud of the blank part;

[0007] Step 2: Calculation of point cloud normal vectors and Gaussian curvature;

[0008] Step 3: Classify all point clouds to generate construction point 1, obtain the sub-region boundary line and sub-region cluster center point, and then perform a second clustering to classify the sub-region boundary line again to generate construction point 2 and obtain the boundary line cluster center point.

[0009] Step 4: Generate construction point 3, and use the key point generation algorithm to generate surface construction key points;

[0010] Step 5: Create an auxiliary plane point cloud. The auxiliary plane is generated by combining the sub-region cluster center points, boundary line cluster center points, and surface construction key points.

[0011] Step 6: Generate initial path points by finding the intersection of the original point cloud and the auxiliary visible point cloud.

[0012] Step 7, post-processing.

[0013] Compared with existing technologies, the beneficial effects of this invention are as follows: by using non-contact / contact measurement devices such as laser scanners, binocular structured light, and lidar, the original point cloud of the blank is obtained; by improving the clustering algorithm, the sub-region boundary lines and sub-region cluster centers, and the boundary line cluster centers are obtained; and by using a key point generation algorithm, surface construction key points are generated, thereby establishing an auxiliary planar point cloud and generating initial path points. A robot programming language template (dedicated robot programming languages ​​such as Rapid and KRL) is established, with the initial path points as the input part. Finally, the processing program is generated autonomously, realizing the generation of the grinding and cleaning program without relying on the digital model.

[0014] As a further improvement of the present invention, step 2 includes the following:

[0015] Calculate the normal vector and Gaussian curvature of all points in the point cloud M(xi, yi, zi). The Gaussian curvature K of any point on the surface is the product of the principal curvatures at that point, and its formula is:

[0016]

[0017] In the formula, L = r xx n;N=r yy n;E=r x r x F = r x r y G = r y r y ;r x r y r xx r yy r xy , is the partial differential of the surface. E, F, and G are called the first fundamental invariants of the surface, and L, M, and N are called the second fundamental invariants of the surface.

[0018] As a further improvement to the present invention, step 3 includes the following:

[0019] Step 3.1, select any point p in the point cloud. i (x i y i , z iStarting from a given axis, the Gaussian curvature of all points is traversed along the given axis direction, i.e., manually specified according to the workpiece type.

[0020] Step 3.2: The initial number of clusters k is set to 1. When the Gaussian curvature is traversed, the sign of the curvature changes, so k = k + 1.

[0021] Step 3.3: After completing the traversal, determine the final value of k, and select k samples in the point cloud as the initial cluster centers a = a1, a2, ... ak;

[0022] Step 3.4, for each sample p in the dataset i Calculate its distance to the k cluster centers and assign it to the cluster corresponding to the smallest distance; here, the distance is the Euclidean distance ρ between points in three-dimensional space:

[0023]

[0024] Step 3.5, for each category a j Recalculate its cluster center a j :

[0025]

[0026] In the formula, c i For a j The cluster centered at x is c i The coordinates of a point in the map;

[0027] Step 3.6: Repeat steps 3.2 and 3.3 until the termination condition is met, i.e., the error is minimized or the number of iterations is set;

[0028] Step 3.7: After clustering, solving the intersection of two adjacent regions can obtain the point cloud of the sub-region boundary lines;

[0029] Step 3.8: Repeat steps 3.1-3.7 to obtain the cluster center points of the boundary line.

[0030] As a further improvement to the present invention, step 4 includes the following:

[0031] Step 4.1, Input the sub-region boundary line L ij All points on;

[0032] Step 4.2, find the cluster center point C at the distance from the boundary line. ij The point with the closest spatial distance is denoted as k0; the spatial distance is calculated using the Euclidean distance formula.

[0033]

[0034] Step 4.3, using point k0 as the reference point, draw the boundary line L ij Divided into left boundary line L ij 'and the right boundary line L ij ”;

[0035] Step 4.4, input the left boundary line L ij ';

[0036] Step 4.5, find the left boundary line L. ij The distance D between all points inside and point k0 x Solve according to the above Euclidean distance formula to determine the distance D. x Is it smaller than the belt grinding width L? B belt grinding width L B If so, based on the actual process settings, then store it in a temporary point set U. i ;

[0037] Step 4.6: Set the Gaussian curvature threshold G and determine the temporary point set U. i Check if the Gaussian curvature of the interior points is less than the threshold G; if so, store it in a temporary point set V. i ;

[0038] Step 4.7, find the temporary point set V i The point with the largest spatial distance from point k0 is found using the Euclidean distance formula described above, and denoted as k. -1 point;

[0039] Step 4.8, let k -1 =k0, repeat steps 4.5-4.7 to obtain point k in sequence. -2 Point K -3 ...point k -m ;

[0040] Step 4.9, input the right boundary line L ij Repeat steps 4.5-4.8 to obtain points k1, k2, k3... k n ;

[0041] Step 4.10: The set of key points P on the boundary line can be obtained through the above algorithm. ij ={k -m k -m+1 , ...k0, ...k n-1 k n}, key point set P ij All points within the belt satisfy the condition that the distance between any two adjacent points is less than the belt grinding width L. B Furthermore, the Gaussian curvature of all points is less than the threshold G.

[0042] As a further improvement to the present invention, step 5 includes the following:

[0043] An auxiliary planar point cloud was automatically generated using a dual constraint method of curvature and grinding width. The basic idea behind constructing the auxiliary planar point cloud is that any two intersecting straight lines in space can define a plane. Therefore, three key points were generated through steps 3 and 4, and two intersecting straight lines were constructed using these three key points. Specifically, key points were generated on the boundary line of the sub-regions, and connecting the key points on the boundary line with the cluster center point of the boundary line can define a straight line. The second straight line was determined by connecting the cluster center point of the boundary line with the cluster center point of the sub-regions, and the two straight lines intersected at the cluster center point of the boundary line. The two intersecting straight lines can generate a defined plane.

[0044] After determining the boundary line and the set of key points, the line connecting the cluster center of the sub-region and the cluster center of the boundary line is used as the axis, and the points in the set of key points are used as control points. The three points determine a plane, which can generate an auxiliary plane cluster.

[0045] As a further improvement to the present invention, step 7 includes the following:

[0046] Step 7.1, determine the polishing direction;

[0047] Step 7.2, path point thinning and accuracy compensation;

[0048] Step 7.3, Path point assignment program template;

[0049] Step 7.4: Complete the autonomous generation of the processing program.

[0050] As a further improvement to the present invention, the specific content of step 7.1 is as follows:

[0051] The sub-region cluster center point can represent the spatial position of all points in the entire spatial region. The k cluster center points are connected in an orderly manner to obtain the spatial directed line segments. According to the direction of the robot feed axis, that is, according to the direction set by the process, the directed line segment points are sorted to obtain the robot grinding direction.

[0052] As a further improvement to the present invention, the specific content of step 7.2 is as follows:

[0053] The proportion of path points to be retained is set according to different accuracy requirements. The initial path points are thinned out in a uniform downsampling manner; that is, some points are retained at equal intervals. First, the point cloud is divided into voxels, i.e., small cubes. Each voxel retains the point closest to the center of the voxel to replace the voxel, and other points are deleted to achieve the goal of uniform downsampling.

[0054] Then, excessive thinning will reduce the surface accuracy, so accuracy compensation is needed. At points with large Gaussian curvature, the Gaussian curvature threshold needs to be changed to increase the number of retained points, thereby retaining denser path points locally and improving surface accuracy.

[0055] As a further improvement to the present invention, the specific content of step 7 is as follows.

[0056] The motion commands in the machining program include path points and quaternions representing the robot's posture. During assignment, the obtained path point coordinates and normal vector quaternions are sequentially assigned to the motion commands to obtain the robot's executable program file. Attached Figure Description

[0057] Figure 1 This is the overall flowchart of the present invention.

[0058] Figure 2 This is a computational example diagram of the automatic partitioning and clustering based on curvature of this invention.

[0059] Figure 3 The algorithm diagram represents the key points of this invention.

[0060] Figure 4 This is a flowchart of the auxiliary plane of the present invention.

[0061] Figure 5 This is a computational example diagram for generating the auxiliary flat main cluster of this invention.

[0062] Figure 6 This is an overall example view of the present invention. Detailed Implementation

[0063] The present invention will be further described below with reference to the accompanying drawings:

[0064] like Figure 1-6 The method for automatically generating machining programs for robots with countless modular workpieces, as shown, is characterized by including the following:

[0065] Step 1: Obtain the point cloud of the blank part;

[0066] Step 2: Calculation of point cloud normal vectors and Gaussian curvature;

[0067] Calculate point cloud M(x) i y i , z i The normal vector and Gaussian curvature of all points on the surface are given. The Gaussian curvature K at any point on the surface is the product of the principal curvatures at that point, and its formula is:

[0068]

[0069] In the formula, L = r xx n;N=ryy n;E=r x r x F = r x r y G = r y r y ;r x r y r xx r yy r xy , is the partial differential of the surface. E, F, and G are called the first fundamental invariants of the surface, and L, M, and N are called the second fundamental invariants of the surface.

[0070] Step 3: Classify all point clouds to generate construction point 1, obtain the sub-region boundary line and sub-region cluster center point, and then perform a second clustering to classify the sub-region boundary line again to generate construction point 2 and obtain the boundary line cluster center point.

[0071] Step 3.1, select any point p in the point cloud. i (x i y i , z i Starting from a given axis, the Gaussian curvature of all points is traversed along the given axis direction, i.e., manually specified according to the workpiece type.

[0072] Step 3.2: The initial number of clusters k is set to 1. When the Gaussian curvature is traversed, the sign of the curvature changes, so k = k + 1.

[0073] Step 3.3: After completing the traversal, determine the final value of k, and select k samples in the point cloud as the initial cluster centers a = a1, a2, ... ak;

[0074] Step 3.4, for each sample p in the dataset i Calculate its distance to the k cluster centers and assign it to the cluster corresponding to the smallest distance; here, the distance is the Euclidean distance ρ between points in three-dimensional space:

[0075]

[0076] Step 3.5, for each category a j Recalculate its cluster center a j :

[0077]

[0078] In the formula, c i For a j The cluster centered at x is c i The coordinates of a point in the map;

[0079] Step 3.6: Repeat steps 3.2 and 3.3 until the termination condition is met, i.e., the error is minimized or the number of iterations is set;

[0080] Step 3.7: After clustering, solving the intersection of two adjacent regions can obtain the point cloud of the sub-region boundary lines;

[0081] Step 3.8: Repeat steps 3.1-3.7 to obtain the cluster center points of the boundary line.

[0082] Step 4: Generate construction point 3, and use the key point generation algorithm to generate surface construction key points;

[0083] Step 4.1, Input the sub-region boundary line L ij All points on;

[0084] Step 4.2, find the cluster center point C at the distance from the boundary line. ij The point with the closest spatial distance is denoted as k0; the spatial distance is calculated using the Euclidean distance formula.

[0085]

[0086] Step 4.3, using point k0 as the reference point, draw the boundary line L ij Divided into left boundary line L ij 'and the right boundary line L ij ”;

[0087] Step 4.4, input the left boundary line L ij ';

[0088] Step 4.5, find the left boundary line L. ij The distance D between all points inside and point k0 x Solve according to the above Euclidean distance formula to determine the distance D. x Is it smaller than the belt grinding width L? B belt grinding width L B If so, based on the actual process settings, then store it in a temporary point set U. i ;

[0089] Step 4.6: Set the Gaussian curvature threshold G and determine the temporary point set U. i Check if the Gaussian curvature of the interior points is less than the threshold G; if so, store it in a temporary point set V. i ;

[0090] Step 4.7, find the temporary point set V i The point with the largest spatial distance from point k0 is found using the Euclidean distance formula described above, and denoted as k. -1 point;

[0091] Step 4.8, let k -1=k0, repeat steps 4.5-4.7 to obtain point k in sequence. -2 Point K -3 ...point k -m ;

[0092] Step 4.9, input the right boundary line L ij Repeat steps 4.5-4.8 to obtain points k1, k2, k3... k n ;

[0093] Step 4.10: The set of key points P on the boundary line can be obtained through the above algorithm. ij ={k -m k -m+1 , ...k0, ...k n-1 k n}, key point set P ij All points within the belt satisfy the condition that the distance between any two adjacent points is less than the belt grinding width L. B Furthermore, the Gaussian curvature of all points is less than the threshold G.

[0094] Step 5: Create an auxiliary plane point cloud. The auxiliary plane is generated by combining the sub-region cluster center points, boundary line cluster center points, and surface construction key points.

[0095] An auxiliary planar point cloud was automatically generated using a dual constraint method of curvature and grinding width. The basic idea behind constructing the auxiliary planar point cloud is that any two intersecting straight lines in space can determine a plane. Therefore, three key points were generated through steps 3 and 4, and two intersecting straight lines were constructed using these three key points. Specifically, key points were generated on the boundary line of the sub-regions, and connecting the key points on the boundary line with the cluster center point of the boundary line can determine a straight line. A second straight line was determined by connecting the cluster center point of the boundary line with the cluster center point of the sub-regions, and the two straight lines intersected at the cluster center point of the boundary line. The two intersecting straight lines can generate a definite plane. After determining the boundary line and the set of key points, the line connecting the cluster center point of the sub-regions and the cluster center point of the boundary line was used as the axis, and the points in the set of key points were used as control points. These three points determined a plane, and an auxiliary planar cluster could be generated.

[0096] Step 6: Generate initial path points by finding the intersection of the original point cloud and the auxiliary visible point cloud.

[0097] Step 7, post-processing.

[0098] Step 7.1, determine the polishing direction;

[0099] The sub-region cluster center point can represent the spatial position of all points in the entire spatial region. The k cluster center points are connected in an orderly manner to obtain the spatial directed line segments. According to the direction of the robot feed axis, that is, according to the direction set by the process, the directed line segment points are sorted to obtain the robot grinding direction.

[0100] Step 7.2, path point thinning and accuracy compensation;

[0101] The path point retention ratio is set according to different accuracy requirements. The initial path points are thinned out using a uniform downsampling method, that is, some points are retained at equal intervals. First, the point cloud is divided into voxels, i.e., small cubes. For each voxel, the point closest to the voxel center is retained to replace the voxel, and other points are deleted to achieve the goal of uniform downsampling. Then, excessive thinning will reduce the surface accuracy, so accuracy compensation is required. At points with large Gaussian curvature, the Gaussian curvature threshold needs to be changed to increase the number of retained points, thereby retaining denser path points locally and improving the surface accuracy.

[0102] Step 7.3, Path point assignment program template;

[0103] The motion instructions in the machining program include path points and quaternions representing the robot's posture. When assigning values, the coordinates of the path points and the normal vector quaternions obtained above are sequentially assigned to the motion instructions to obtain the robot's executable program file.

[0104] Step 7.4: Complete the autonomous generation of the processing program.

[0105] This invention addresses the problem of traditional offline robot programming methods relying on digital models, resolving the difficulty of generating robot machining programs during intelligent manufacturing improvements in the forging and casting industry. The method proposed in this invention requires only a 3D point cloud of the workpiece as initial conditions, eliminating the need for complex reverse reconstruction and standard digital models, and can generate the final executable robot machining file. Furthermore, the path point generation method is based on changes in workpiece curvature and differences in process parameters, thus better adapting to curved surface machining and improving machining accuracy.

[0106] This invention is not limited to the above embodiments. Based on the technical solutions disclosed herein, those skilled in the art can make some substitutions and modifications to some of the technical features without creative effort, and all such substitutions and modifications are within the protection scope of this invention.

Claims

1. A method for automatically generating machining programs for robots with countless workpieces, characterized in that: Includes the following: Step 1: Obtain the point cloud of the blank part; Step 2: Calculation of point cloud normal vectors and Gaussian curvature; Step 3: Classify all point clouds to generate construction point 1, obtain the sub-region boundary line and sub-region cluster center point, and then perform a second clustering to classify the sub-region boundary line again to generate construction point 2 and obtain the boundary line cluster center point. Step 4: Generate construction point 3, and use the key point generation algorithm to generate surface construction key points; Step 4.1, Input the boundary lines of the sub-regions All points on; Step 4.2, find the cluster center points at the distance from the boundary line. The point that is closest in space is denoted as Points; spatial distance is calculated using the Euclidean distance formula. ; Step 4.3, with Using point as the reference point, the boundary line is drawn. Divided into left boundary line 'and the right boundary line ''; Step 4.4, enter the left boundary line. '; Step 4.5, find the left boundary line. Distance of all points within Distance between points Solve according to the above Euclidean distance formula to determine the distance. Is it smaller than the belt grinding width? belt grinding width If so, based on the actual process settings, then store in a temporary point set. ; Step 4.6: Set the Gaussian curvature threshold G and determine the temporary point set. Is the Gaussian curvature of the interior point less than the threshold G? If so, store in a temporary point set. ; Step 4.7, find the temporary point set. Inner distance The point with the largest spatial distance is found using the Euclidean distance formula described above, and is denoted as . point; Step 4.8, let Repeat steps 4.5-4.7 to obtain points sequentially. ,point ...point ; Step 4.9, enter the right boundary line. Repeat steps 4.5-4.8 to obtain the point. ,point ,point ...point ; Step 4.10: The set of key points on the boundary line can be obtained through the above algorithm. Key point set All points satisfy the condition that the distance between any two adjacent points is less than the width of the belt grinding. Furthermore, the Gaussian curvature of all points is less than the threshold G; Step 5: Create an auxiliary plane point cloud. The auxiliary plane is generated by combining the sub-region cluster center points, boundary line cluster center points, and surface construction key points. Step 6: Generate initial path points and find the intersection of the original point cloud and the auxiliary visible point cloud; Step 7, post-processing.

2. The method for automatically generating machining programs for a robot with no modular workpieces according to claim 1, characterized in that: Step 2 includes the following: Calculate point cloud M(x) i y i , z i Given the normal vector and Gaussian curvature of all points on the surface, the Gaussian curvature K at any point on the surface is the product of the principal curvatures at that point, and its formula is: ; In the formula, L=r xx n;N=r yy n;E=r x r x F=r x r y G=r y r y ;r x , r y , r xx , r yy , r xy , is the partial differential of the surface. E, F, and G are called the first fundamental invariants of the surface, and L, M, and N are called the second fundamental invariants of the surface.

3. The method for automatically generating machining programs for a robot with no modular workpieces according to claim 2, characterized in that: Step 3 includes the following: Step 3.1, select any point p in the point cloud. i (x) i y i , z i Starting from a given axis, the Gaussian curvature of all points is traversed along the given axis direction, i.e., manually specified according to the workpiece type. Step 3.2: The initial number of clusters k is set to 1. When the Gaussian curvature is traversed, the sign of the curvature changes, so k = k + 1. Step 3.3: After completing the traversal, determine the final value of k, and select k samples from the point cloud as initial cluster centers a = a1, a2, ... a k ; Step 3.4, for each sample p in the dataset i Calculate its distance to the k cluster centers and assign it to the cluster corresponding to the smallest distance; here, the distance is the Euclidean distance ρ between points in three-dimensional space: ; Step 3.5, for each category a j Recalculate its cluster center a j : ; In the formula, c i For a j The cluster centered at x is c i The coordinates of a point in the map; Step 3.6: Repeat steps 3.2 and 3.3 until the termination condition is met, i.e., the error is minimized or the number of iterations is set; Step 3.7: After clustering, solving the intersection of two adjacent regions can obtain the point cloud of the sub-region boundary lines; Step 3.8: Repeat steps 3.1-3.7 to obtain the cluster center points of the boundary line.

4. The method for automatically generating machining programs for robots with countless modular workpieces according to claim 3, characterized in that: Step 5 includes the following: An auxiliary planar point cloud was automatically generated using a dual constraint method of curvature and grinding width. The basic idea behind constructing the auxiliary planar point cloud is that any two intersecting straight lines in space can define a plane. Therefore, three key points were generated through steps 3 and 4, and two intersecting straight lines were constructed using these three key points. Specifically, key points were generated on the boundary line of the sub-regions, and connecting the key points on the boundary line with the cluster center point of the boundary line can define a straight line. The second straight line was determined by connecting the cluster center point of the boundary line with the cluster center point of the sub-regions, and the two straight lines intersected at the cluster center point of the boundary line. The two intersecting straight lines can generate a defined plane. After determining the boundary line and the set of key points, the line connecting the cluster center of the sub-region and the cluster center of the boundary line is used as the axis, and the points in the set of key points are used as control points. The three points determine a plane, which can generate an auxiliary plane cluster.

5. The method for automatically generating machining programs for robots with countless workpieces according to claim 4, characterized in that: Step 7 includes the following: Step 7.1, determine the polishing direction; Step 7.2, path point thinning and accuracy compensation; Step 7.3, Path point assignment program template; Step 7.4: Complete the autonomous generation of the processing program.

6. The method for automatically generating machining programs for a robot with countless workpieces according to claim 5, characterized in that: The specific content of step 7.1 is as follows: The sub-region cluster center point can represent the spatial position of all points in the entire spatial region. The k cluster center points are connected in an orderly manner to obtain the spatial directed line segments. According to the direction of the robot feed axis, that is, according to the direction set by the process, the directed line segment points are sorted to obtain the robot grinding direction.

7. The method for automatically generating machining programs for a robot with countless workpieces according to claim 6, characterized in that: The specific content of step 7.2 is as follows: The proportion of path points to be retained is set according to different accuracy requirements. The initial path points are thinned out in a uniform downsampling manner; that is, some points are retained at equal intervals. First, the point cloud is divided into voxels, i.e., small cubes. Each voxel retains the point closest to the center of the voxel to replace the voxel, and other points are deleted to achieve the goal of uniform downsampling. Then, excessive thinning will reduce the surface accuracy, so accuracy compensation is needed. At points with large Gaussian curvature, the Gaussian curvature threshold needs to be changed to increase the number of retained points, thereby retaining denser path points locally and improving surface accuracy.

8. The method for automatically generating machining programs for a robot with countless workpieces according to claim 7, characterized in that: The specific details of step 7.3 are as follows: The motion instructions in the machining program include path points and quaternions representing the robot's posture. When assigning values, the coordinates of the path points and the normal vector quaternions obtained above are sequentially assigned to the motion instructions to obtain the robot's executable program file.