A Robot Variable Stiffness Surface Path Planning Method Based on 3D Perception and Its Application
The robot variable stiffness surface path planning method, which utilizes 3D perception and AI-assisted programming, solves the problem of unstable perception and force control in robot surface treatment systems on complex surfaces. It enables efficient and precise processing of variable stiffness workpieces and is applicable to remanufacturing scenarios such as wind turbine blades and aircraft skin.
Patent Information
- Application Number
- CN202511824343.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-12-05
AI Technical Summary
Existing robotic surface treatment systems suffer from deviations in complex surface perception and path planning, unstable force control, lack of intelligent human-machine interaction, and difficulty in adapting to the processing requirements of workpieces with variable stiffness.
A robot variable stiffness surface path planning method based on 3D perception is adopted. Point cloud data is acquired by laser scanning or RGB-D camera. Defect detection and region classification are performed by combining linear regression and k-NN algorithm to generate adaptive tool path. An AI-assisted programming framework and energy-constrained variable stiffness control are introduced to achieve stable trajectory tracking and precise control.
It improves the machining accuracy and consistency of variable stiffness workpieces, lowers the programming threshold for non-professional users, and enhances the robot's adaptability and machining efficiency in complex environments.
Smart Images

Figure CN121245864B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a robot path planning method and application based on three-dimensional perception for variable stiffness surfaces, belonging to the field of robot automation technology in surface treatment processing. Background Technology
[0002] In aerospace, wind power, automotive manufacturing, and consumer electronics, surface treatment (including grinding, sanding, and polishing) is a critical process for ensuring the surface quality and service performance of components. However, this process has traditionally relied heavily on manual labor, resulting in high labor intensity, low efficiency, and a processing quality highly dependent on the operator's experience and skills, making it difficult to achieve consistency and stability. With the development of advanced manufacturing and remanufacturing technologies, especially the rise of the circular economy, an increasing number of composite material structural components and large-size thin-walled parts require repair and reprocessing throughout their service life, creating an urgent need for efficient, intelligent, and stable robotic surface treatment.
[0003] While current robotic surface treatment systems have made some progress in industrial applications, several bottlenecks remain. First, in terms of complex surface perception and path planning, traditional offline programming methods based on CAD models struggle to adapt to discrepancies between the actual workpiece and the design model. Low-rigidity workpieces (such as wind turbine blades, aircraft skins, and thin-walled shells) are prone to deformation during installation and processing, leading to trajectory deviations, tool overshoot, or other issues as the robot continues to operate along the theoretical path during surface treatment, thus affecting processing accuracy and surface consistency. Second, in terms of surface defect detection and process parameter setting, existing systems often rely on human experience to identify scratches, pits, or rough areas and manually set appropriate parameters (such as force, angle, and speed). This approach is not only inefficient but also lacks portability and repeatability.
[0004] A more prominent problem lies in the force control stability of low-stiffness workpieces. For example, Chinese patent application CN120755896A discloses an automatic path planning method and system for curved surfaces in a grinding robot, which can achieve automatic grinding path planning for workpiece surfaces. However, due to the high flexibility and insufficient local support of the variable-stiffness workpiece surface structure, these workpieces are prone to vibration and local deformation when subjected to external forces, resulting in significant fluctuations in contact force during surface treatment. Existing fixed-stiffness impedance control or pure position control methods cannot simultaneously ensure trajectory accuracy and contact stability, easily leading to excessive force damaging the workpiece or insufficient force resulting in inadequate surface quality. Disturbances in complex environments and workpiece geometric errors further exacerbate the instability of force control.
[0005] In addition, existing robotic surface treatment systems are operated by front-line production workers in practical applications. If the processing task needs to be adjusted, the system still needs to be rewritten with professional code. The lack of intelligent human-computer interaction mechanism makes it impossible for non-professional users to efficiently define processing tasks. Summary of the Invention
[0006] The technical problem solved by this invention is to provide a robot variable stiffness surface path planning method and its application based on three-dimensional perception, addressing the problems of insufficient perception, reliance on manual programming, and unstable force control in existing robot surface treatment processes.
[0007] This invention is achieved using the following technical solution:
[0008] This invention first discloses a robot path planning method based on three-dimensional perception for varying stiffness surfaces, specifically including the following steps:
[0009] Step S1: Collect initial point cloud data of the workpiece surface, preprocess it and convert it into aligned point cloud data in the robot coordinate system;
[0010] Step S2: Establish a surface defect detection model, perform linear regression residuals on the aligned point cloud data, and use the k-NN method to classify the point cloud into regions of normal points and defect points. Filter the aligned point cloud data to identify abnormal defect points on the workpiece surface, and compensate for the deformation deviation of the workpiece surface by registering it with the target model point cloud of the workpiece to obtain a complete point cloud set of the workpiece surface.
[0011] Step S3: Perform path planning on the complete point cloud set of the workpiece surface obtained in step S2 to generate an adaptive tool path.
[0012] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, further, in step S1, an initial point cloud data of the workpiece surface is obtained by using a laser scanner or RGB-D camera, the initial point cloud data is voxel downsampled, preprocessed point cloud data is generated by surface fitting, the homogeneous transformation matrix from the laser scanner or RGB-D camera to the robot coordinate is obtained based on the hand-eye calibration method, the preprocessed point cloud data is converted into aligned point cloud data in the robot coordinate system, and the integrity of the aligned point cloud data is checked by the distance distribution between point clouds.
[0013] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, step S2 further includes the following sub-steps:
[0014] Sub-step S21, the initial screening stage, involves using linear regression to fit a local plane within the neighborhood of the aligned point cloud data, minimizing the mean square error between the neighborhood points and the fitted plane, and obtaining the optimized solution using the least squares method. For any point cloud point within the aligned point cloud data Calculate the residual :
[0015] ,
[0016] a represents the inclination of the fitted plane in the x-direction, b represents the inclination of the fitted plane in the y-direction, and c represents the intercept of the fitted plane at the origin. For point cloud points Spatial coordinate information, if Exceeding the threshold If the point is identified as a potential defect point, a set of potential defect points is constructed. ;
[0017] Sub-step S22, the re-screening stage: Given the point cloud points to be classified in the set of possible defect points, the k-NN method is used for region classification. The nearest point is selected based on the Euclidean distance from the given point cloud point to other points in the point cloud. Let the set of neighboring points be denoted as _n_. Let the set of possible defect points contain the points to be classified. The category label is Neighbor's Point The category label is The classification points are determined according to the voting rules. category:
[0018] ,
[0019] in, yes Choose any point from the k neighbors. express and The Euclidean distance between two points This indicates the category value that may be a defect point or a normal point. For indicator functions, Indicate neighboring points The category label was assigned a value The identified defects will be used to construct a final defect set. ;
[0020] Sub-step S23: Remove the point cloud points from the final defect point set from the aligned point cloud data, construct a defect-free point cloud optimization set, obtain the alignment transformation matrix by iterating the nearest point between the point cloud optimization set and the point cloud of the target model, and perform point cloud registration on the aligned point cloud data.
[0021] Sub-step S24: Remap the defect point set to the global alignment coordinate system of the alignment point cloud data through the alignment transformation matrix to obtain the complete point cloud set after registration of the workpiece surface, and compare it with the standard surface of the target model to obtain the geometric parameters of the defect.
[0022] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, further, in the sub-step S23, firstly, feature-based coarse registration is adopted to find point pairs for all point cloud points in the optimized point cloud set through nearest neighbor search. Then, using the feature-corresponding point set, RANSAC random sampling minimum set is used to estimate the candidate transform. The solution that maximizes the number of interior points is selected to obtain the initial transformation matrix. Then, the ICP algorithm is used for fine alignment. The initial transformation matrix is used as the initial transformation matrix of the point cloud optimization set to find the nearest neighbor point. The transformation matrix is iteratively updated until the error of the ICP algorithm converges, and the final alignment transformation matrix is obtained.
[0023] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, the adaptive tool path in step S3 is further generated through the following sub-steps:
[0024] Sub-step S31: Obtain the complete point cloud set of the workpiece surface, extract the surface normal vector direction of the point cloud points using principal component analysis, and construct the intersection plane using the surface normal vector direction as the plane normal vector.
[0025] Sub-step S32: Extract the point cloud subset of the workpiece surface near the intersection plane and project it onto the intersection plane to obtain the two-dimensional slice point set corresponding to the intersection plane;
[0026] Sub-step S33: Obtain the polar angle of each point in the two-dimensional slice point set through the slice centroid, sort the two-dimensional slice point set according to the polar angle, remove the noise points, and use cubic splines to fit the sorted points to obtain a smooth closed contour curve.
[0027] Sub-step S34: Perform uniform or curvature adaptive sampling on the contour curve, connect the sampling points in the sampling point set by alternating directions, generate a connection path between the two-dimensional slice point sets of two adjacent intersecting planes, achieve a smooth transition of the connection path by linear interpolation or spline interpolation, and obtain a global path covering the workpiece surface by connecting the contour curve sampling points of the two-dimensional slice point sets of all intersecting planes.
[0028] Sub-step S35: Perform low-pass filtering on the global path to eliminate trajectory jitter caused by point cloud noise, determine the execution posture and processing speed of the robot end effector at each path point of the global path, evaluate the fit between the global path and the point cloud surface through global root mean square error, mean absolute error and maximum error, and finally obtain the adaptive tool path.
[0029] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, further, it also includes step S4, using an AI-assisted programming framework to guide the interactive programming of generating adaptive tool paths through a natural language interface and a knowledge representation engine.
[0030] In the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention, step S4 further includes the following sub-steps:
[0031] Sub-step S41: In the cognitive layer of the AI-assisted programming framework, the knowledge base is initialized through the meta-guide architecture. The knowledge base defines the core concepts required for the surface treatment task in OWL / RDF format, including the surface treatment task type, the type of robotic arm end effector, the material properties of the workpiece surface, and the process parameters of the surface treatment task. It is stored in the MongoDB database using RDF triples.
[0032] Sub-step S42: The domain-specific inferencer of the AI-assisted programming framework combines symbolic knowledge with geometric data, supports adaptive tool path generation, task planning, and parameter derivation. The inference process is based on Prolog predicate logic, and the set of tools available for task planning is derived through predicate derivation.
[0033] Sub-step S43: When reasoning cannot automatically complete the parameters required for generating the adaptive tool path to plan the task, the AI-assisted programming framework interacts with the user through the natural language interface to obtain the missing information. The natural language input by the user is converted into text and then divided into semantic units by the NLP pipeline. Each semantic unit is embedded as a vector and then matched with the concept vector in the knowledge base for similarity.
[0034] Sub-step S44: Parameter completion for the adaptive tool path generation task. The interactive programming workflow of the AI-assisted programming framework is gradually advanced, and the meta-task for generating the adaptive tool path is continuously updated.
[0035] Sub-step S45: Finally, the adaptive tool path information, after inference and interactive completion, is transformed into executable programs for each joint of the robot through the inverse kinematics model.
[0036] This invention also discloses a robot control method for a variable stiffness surface. The adaptive tool path generated according to the path planning method described above is input into the robot controller. A variable stiffness impedance control law that adapts to the material properties of the workpiece surface and external disturbances is added to the trajectory control of the robot in the workpiece surface treatment task. The force feedback trajectory is collected as a reference, and the force control surface treatment is realized by combining the quadratic programming optimization controller, thus completing the variable stiffness trajectory control of the robot on the workpiece surface.
[0037] In the robot control method for variable stiffness surfaces of the present invention, the input of the variable stiffness impedance control law includes the position error, velocity error and desired force of the robot end effector on the workpiece surface, and outputs the variable stiffness matrix of the workpiece surface and the external force, constructs the system energy function of the robot moving on the workpiece surface, and introduces an energy tank mechanism as an additional energy storage unit. When the robot end effector injects too much energy due to the change in workpiece surface stiffness, the energy tank achieves adaptive stabilization by absorbing part of the energy. When the energy is insufficient, the stored energy is released to maintain the continuous controllability of the robot end effector trajectory.
[0038] In the robot control method for variable stiffness surfaces of the present invention, further, in the trajectory control of the robot in the workpiece surface treatment task, the external force on the workpiece surface is collected in real time by sensors, and the force error between the target force and the expected force is corrected. The weighted square error between the target force and the external force output by the variable stiffness impedance control law is optimized by quadratic programming. In the robot's surface treatment task, the variable stiffness matrix output by the variable stiffness impedance control law and the external force are updated in real time, so that the robot's force error gradually converges, and the robot's control parameters are adjusted in real time by the updated variable stiffness impedance control law.
[0039] The present invention proposes a robot surface treatment method based on three-dimensional perception, artificial intelligence-assisted programming, and energy-constrained variable stiffness control. First, point cloud data of the workpiece surface is acquired through laser scanning or an RGB-D camera. Combined with point cloud segmentation, curve fitting, and outlier detection algorithms, defects such as scratches, pits, and rough areas are automatically identified, enabling robot movement path planning that comprehensively covers the workpiece surface. Second, a human-computer interaction programming mode based on a knowledge base and natural language processing is introduced. Users can set task parameters through voice or text interaction, and the system automatically selects the end effector and simulates and verifies the robot's processing program for workpiece surface treatment. Finally, at the control level, an online stiffness optimization method based on quadratic programming is adopted, combined with an energy tank mechanism to ensure the system passivity and stability of the robot's trajectory control on the workpiece surface, achieving real-time adjustment of stiffness parameters.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] (1) Considering the defects and anomalies such as depressions or protrusions on the workpiece surface caused by variable stiffness, and addressing the geometric uncertainties and deformation deviations of complex curved surfaces and variable stiffness workpieces, this invention integrates a three-dimensional point cloud perception module. Point cloud data is acquired using laser scanning or an RGB-D camera. Local planes are fitted using linear regression, and residuals are calculated. Combined with the k-NN algorithm, region classification and anomaly detection are performed, enabling automatic identification and geometric modeling of surface defects in variable stiffness workpieces. This method can quickly screen candidate defect points and compensate for workpiece deformation deviations through point cloud registration after defect point removal, achieving adaptive geometric modeling and ensuring data integrity. Through the defect detection and point cloud registration compensation mechanism using linear regression and the k-NN algorithm, automated surface anomaly identification and adaptive geometric modeling are achieved, avoiding the deviation dependence of traditional offline CAD model programming and improving the machining accuracy and surface consistency of variable stiffness workpieces.
[0042] (2) The present invention designs an adaptive tool path generation process, extracts the principal direction vector based on principal component analysis, adaptively adjusts the slice spacing, and then generates a smooth contour curve as the adaptive tool path for robot movement through projection, sorting and cubic spline fitting. It supports alternating direction connection to reduce the repeated movement of the robot on the workpiece surface. The path post-processing includes low-pass filtering and speed adjustment, which improves the stability of robot path movement.
[0043] (3) Compared with existing programming methods that rely on human experience, this invention introduces an AI-assisted framework of natural language processing and knowledge base reasoning. The knowledge base uses OWL / RDF to represent core concepts (such as task type and tool category), and automatically completes parameters by combining Prolog reasoning mechanism. Users set requirements through voice / text interaction (NLP pipeline segmentation + vector similarity matching), and the system automatically completes processing parameter completion, path planning and virtual simulation, generating directly executable robot processing programs. Digital twin simulation verification is performed by calculating RMSE error, which reduces the programming threshold and time cost for non-professional users. Users can directly use parameterized tasks and tools through voice interaction. The system automatically completes process parameters and generates executable programs, improving the operating efficiency of non-professional users.
[0044] (4) In response to the vibration and instability caused by the force sensitivity of low stiffness workpieces, this invention designs a variable stiffness impedance control law under energy constraints. Through passive analysis and energy tank mechanism, the stiffness parameters are dynamically adjusted. Combined with the energy constraint mechanism, the passivity and energy consistency of the system are guaranteed, ensuring the energy consistency and interactive stability of the system. In the process of processing low stiffness workpieces, stable tracking of contact force and precise trajectory control are achieved, realizing stable tracking and precise trajectory control of contact force on the surface of workpieces with different stiffnesses.
[0045] In summary, the robot path planning method and application based on three-dimensional perception for variable stiffness surfaces provided by this invention coordinates and optimizes the robot's workpiece surface perception, path planning programming, and trajectory control. Under disturbance conditions, the robot's force tracking error is less than 0.5 N. This not only improves the robot's adaptive capability in handling complex variable stiffness workpiece surfaces but also significantly improves the robot's processing consistency and efficiency. The trajectory accuracy is superior to traditional fixed stiffness methods, making it suitable for surface treatment of workpieces with variable stiffness, particularly for remanufacturing scenarios such as wind turbine blades and aircraft skin. It has broad application prospects.
[0046] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0047] Figure 1 This is a schematic diagram summarizing the robot variable stiffness surface path planning and control methods in this invention.
[0048] Figure 2 This is a flowchart illustrating the AI-assisted programming framework in step S4 of the present invention. Detailed Implementation
[0049] Example
[0050] like Figure 1 As shown, the specific process of the robot variable stiffness surface path planning method based on three-dimensional perception of the present invention includes the following steps:
[0051] Step S1: Acquire initial point cloud data of the workpiece surface, preprocess it, and convert it into aligned point cloud data in the robot coordinate system. Initial point cloud data of the workpiece surface is obtained using a laser scanner or RGB-D camera. The initial point cloud data is voxel-sampling, and preprocessed point cloud data is generated through surface fitting. The homogeneous transformation matrix from the laser scanner or RGB-D camera to the robot coordinate system is obtained based on the hand-eye calibration method. The preprocessed point cloud data is then converted into aligned point cloud data in the robot coordinate system, and the integrity of the aligned point cloud data is checked by the distance distribution between point clouds.
[0052] Taking the acquisition of high-resolution 3D point cloud data by scanning the surface of a workpiece using an RGB-D depth camera as an example, the camera generates an initial point cloud using structured light technology. The initial point cloud data is represented as follows: ,in Represents the three-dimensional coordinates of each point. This represents the total number of points in the point cloud. Adjust camera parameters (e.g., resolution 1280x720, frame rate 30 FPS, baseline distance approximately 5-10 cm) to ensure the point cloud covers all relevant surface areas of the workpiece, including edges and complex geometries. During scanning, maintain the distance between the camera and the workpiece within the recommended working range (typically 0.2-1.5 m) and avoid excessive reflection or occlusion that could affect data quality. Acquire multiple frames of point cloud data through multiple scans (at least 3-5 times), and average the data to reduce random noise.
[0053] For the initial point cloud data collected Voxel downsampling is performed using a voxel grid method to reduce data density. The calculation formula is as follows:
[0054] .
[0055] in, The sampled point cloud data, To minimize the voxel edge length, the computational load is reduced by decreasing the point density while preserving the main geometric features of the workpiece. Next, a statistical outlier removal algorithm is applied to calculate the local surface fitting residual for each point. ,like If it is an outlier, then it is marked as an outlier. An empirical threshold, such as 0.1 mm, is used. This step replaces traditional distance statistics with surface fitting to generate a preprocessed point cloud. In addition, the local density distribution of the point cloud is checked. If hollow areas are found (density below 50% of the average), local interpolation is performed to repair them and ensure data integrity.
[0056] The spatial transformation matrix between the depth camera and the robot's end effector is determined through a calibration process. Using a hand-eye calibration method, and employing a known chessboard target (at least 9x9 grid, side length 20-30 mm), at least 20 sets of images were acquired under different poses. The transformation from camera to robot base coordinates was then calculated.
[0057] .
[0058] in The homogeneous transformation matrix from camera to base coordinates, including the rotation matrix. Translation vector , This is the inverse transformation from robot to base coordinates. The transformation parameters are optimized using the least squares method, with a target error of less than 0.5 mm. The preprocessed point cloud is then used. Transform to the robot coordinate system to obtain the alignment point cloud. :
[0059] .
[0060] After calibration, verify the transformation accuracy by repeatedly measuring the corner points of the chessboard (at least 10 times) to ensure that the root mean square error (RMSE) of the reprojection is less than 1 mm, and record the calibration results for subsequent adjustments.
[0061] Check the alignment point cloud To ensure the integrity of the data, calculate the distance distribution between point clouds. If the distance exceeds a preset threshold (e.g., 1 mm), or if there are obvious holes or distortions in the point cloud, adjust the voxel downsampling parameters. (Increase or decrease by 0.1-0.5 mm) or the threshold for removing external points (Adjustment (Value ±2). Use visualization tools to check the point cloud quality, analyze local curvature changes and surface smoothness. If problems are found, repeat the above steps, combining multiple frame point clouds through averaging or weighted averaging to optimize the data, ensuring the integrity of surface details and providing a reliable data foundation for subsequent defect detection and path planning.
[0062] Step S2: Establish a surface defect detection model, perform linear regression residuals on the aligned point cloud data, and use the k-NN method to classify the point cloud into regions of normal points and defect points. Filter the aligned point cloud data to identify abnormal defect points on the workpiece surface, and compensate for the deformation deviation of the workpiece surface by registering it with the target model point cloud to obtain a complete point cloud set of the workpiece surface.
[0063] Step S2 specifically includes the following sub-steps:
[0064] Sub-step S21, initial screening stage, aligning point cloud data Within the point cloud neighborhood, a local plane is fitted using linear regression. The mean square error between the neighborhood points and the fitted plane is minimized, and the optimal solution is obtained using the least squares method. For aligned point cloud data Any point cloud within Calculate the residual :
[0065] .
[0066] like Exceeding the threshold If the point is identified as a potential defect point, a set of potential defect points is constructed. .
[0067] To establish a surface defect detection model, first, align the point cloud data. ,in Indicates the first There are n points, where n is the number of points in the point cloud. For point cloud points The spatial coordinate information of the point. To detect whether there are anomalies at a point, a local plane can be fitted using linear regression within its neighborhood. Assume the fitted plane is... , where a represents the inclination of the fitted plane in the x-direction, b represents the inclination of the fitted plane in the y-direction, and c represents the intercept of the fitted plane at the origin. The objective is to minimize the mean square error between the neighborhood points and the fitted plane.
[0068] .
[0069] This optimization problem is a typical least squares problem, and its solution can be written in matrix form. Let:
[0070] .
[0071] The optimal solution is For any point Calculate its residual ,like Exceeding the threshold 1, that is If 1 is found, then the point is identified as a potential defect point. The initial screening stage is characterized by low computational cost, quickly eliminating most normal points and retaining only the set of potential defect points. .
[0072] Sub-step S22, the re-screening stage, involves selecting point cloud points to be classified from a set of possible defect points. The k-NN method is used for region classification. The nearest point is selected based on the Euclidean distance from the given point to other points in the point cloud. Let the set of neighboring points be denoted as _n_. Let the set of possible defect points contain the points to be classified. The category label is Neighbor's Point The category label is The classification points are determined according to the voting rules. category:
[0073] .
[0074] in, yes Choose any point from the k neighbors. express and The Euclidean distance between two points This indicates the category value that may be a defect point or a normal point. , For indicator functions, Indicate neighboring points The category label was assigned a value .
[0075] Since relying solely on linear regression residuals is susceptible to noise interference, this sub-step employs the k-NN method for region classification. Assume there are two classes of samples: normal points... The defect is Given a point to be classified from a set of possible defect points. First, calculate its Euclidean distance to all points:
[0076] .
[0077] Select the nearest Let the set of neighboring points be denoted as _n_. Then, determine the category according to the voting rules:
[0078] .
[0079] in Let be the indicator function. To enhance robustness, distance weighting is introduced, resulting in:
[0080] ,
[0081] In this way, neighbors who are closer to each other have a greater weight.
[0082] In the secondary screening stage, the set of potential defect points is targeted. Further analysis was conducted on the statistical characteristics of these defects in the point cloud neighborhood. Based on the combined results of the initial and secondary screenings, the final defect point set D was constructed from the identified defect points as follows:
[0083] .
[0084] Points in the possible defect point set C and the points in the final defect point set D All data are from Qidian Cloud. Point cloud data at the selected location.
[0085] Sub-step S23: Aligning point cloud data In the final defect point set, point cloud points are removed to construct an optimized point cloud set without defect points. This optimized point cloud set is then compared with the point cloud of the target model. The alignment transformation matrix is obtained by iterating through the nearest points, and the alignment point cloud data is processed accordingly. Point cloud registration is performed, and the target model here refers to the CAD theoretical model of the scanned workpiece.
[0086] In sub-step S23, firstly, feature-based coarse registration is used to find point pairs for all point cloud points in the optimized point cloud set through nearest neighbor search. Then, using the feature-corresponding point set, RANSAC random sampling minimum set is used to estimate the candidate transform. And select the solution that maximizes the number of interior points to obtain the initial transformation matrix. Then, the ICP algorithm is used for fine alignment. The initial transformation matrix is used as the initial transformation matrix of the point cloud optimization set to find the nearest neighbor point. The transformation matrix is iteratively updated until the error of the ICP algorithm converges, and the final alignment transformation matrix is obtained.
[0087] The specific process of this sub-step is as follows:
[0088] The goal of point cloud registration is to find a candidate transformation matrix. , Represents the rotation matrix. , Denotes the translation vector, which optimizes the set of point clouds on the workpiece surface. Point cloud of the target model To achieve maximum overlap in Euclidean space. The objective of point cloud registration optimization is to minimize the squared error:
[0089] .
[0090] in Represents point cloud points In the target model point cloud The corresponding points in the point cloud. Since point clouds may have global offsets, a feature-based coarse registration is first used. A commonly used feature is FFPH (Fast Point Feature Histogram), which is used for each point cloud point. Calculate its normal vector And construct feature histograms .
[0091] Find point pairs using nearest neighbor search:
[0092] .
[0093] Using the set of feature corresponding points Candidate transforms are estimated by randomly sampling the minimum set using RANSAC. And select the solution that maximizes the number of interior points to obtain the initial transformation. .
[0094] Based on the initial registration, the ICP algorithm is further used for fine alignment. For each iteration... Given the current transformation Transform the source point cloud into:
[0095] .
[0096] Find the nearest neighbor:
[0097] .
[0098] The update transformation minimizes the mean square error:
[0099] .
[0100] For the set of feature corresponding points Calculate the centroid of each point within the area:
[0101] .
[0102] This represents the number of corresponding points within the set of feature corresponding points.
[0103] Construct a decentralized matrix:
[0104] .
[0105] right Perform singular value decomposition: The optimal rotation matrix is: The optimal translation vector is: Iterate and update until the error converges:
[0106] .
[0107] This represents the error in the k-th iteration. This represents the pre-defined maximum threshold for error, after k iterations. < When that happens, stop iterating.
[0108] Sub-step S24: Remap the defect point set to the alignment point cloud data using the alignment transformation matrix. In the global alignment coordinate system, obtain the complete point cloud set after registration of the workpiece surface. The geometric parameters of the defect are obtained by comparing them with the standard surface of the target model.
[0109] In the defect detection stage, this method first calculates the residuals at each sampling point based on a linear regression model. Candidate anomalies are quickly selected by setting a threshold; then, a k-NN classifier is used to discriminate the neighborhood features of the candidate points, resulting in a set of defect points. In this way, suspected real defect points can be separated from the original point cloud, and a set of defects with relatively accurate spatial distribution can be obtained.
[0110] During the registration compensation stage, to avoid the interference of defect points on the point cloud registration process, a set of defect points is created. Point removal from the model results in the construction of a defect-free optimized set for iterative optimization of the objective function using the Intermediate Closest Point (ICP) or other registration algorithms. Through iterative solving, a more robust final alignment transformation matrix is obtained. ,in The optimal rotation matrix is... This is the optimal translation vector. This strategy can significantly reduce the impact of local anomalies on the workpiece surface on the overall registration accuracy.
[0111] During the correction and annotation phase, the defect points in the final defect point set will be... Remapping to the globally aligned coordinate system, the calculation method is as follows:
[0112] .
[0113] The defect is then compared with the standard surface of the workpiece's CAD model to obtain its geometric parameters (such as depth, width, and area), and automatically labeled and archived. This not only achieves coupled processing of defect detection and registration but also provides an accurate geometric benchmark for subsequent adaptive path planning.
[0114] Step S3: Perform path planning on the complete point cloud set of the workpiece surface obtained in step S2 to generate an adaptive tool path.
[0115] Specifically, the adaptive tool path in this step is generated through the following sub-steps:
[0116] Sub-step S31: Obtain the complete point cloud set of the workpiece surface, extract the surface normal vector direction of the point cloud points using principal component analysis, and construct the intersection plane using the surface normal vector direction as the plane normal vector.
[0117] The complete point cloud set of the workpiece surface obtained in step S2 Calculate the centroid of the point cloud:
[0118] .
[0119] Principal component analysis is used to extract the principal direction vector of the point cloud. ,in, This typically corresponds to the direction of the normal vector on the point cloud surface:
[0120] .
[0121] in Let be the covariance matrix of the point cloud. For Perform feature decomposition. , For eigenvalues, For eigenvectors, the eigenvector matrix is... Representing the PCA coordinate system, it can be used as a local coordinate transformation matrix for a plane or slice. .
[0122] Let the plane normal vector be The starting plane is along the point cloud boundary. Directional construction, denoted as e Let be the coordinates of any point in space. This is a reference point at the boundary or centroid of the point cloud. Along the normal vector... Direction, with initial spacing Generate planar families The equation of the m-th intersecting plane is expressed as:
[0123] .
[0124] in, For along the normal vector The offset in direction.
[0125] Then, the planar spacing is adaptively adjusted based on the local curvature distribution of the point cloud. Local Gaussian curvature can be measured using the rate of change of the normal vector. estimate:
[0126] .
[0127] in For point The neighborhood point set, express The normal vector, express The average normal vector of the neighborhood point set.
[0128] Planar spacing Set as:
[0129] .
[0130] This is an adjustment factor. Planes are denser where curvature is high and sparser where curvature is low.
[0131] Sub-step S32: Extract a subset of point clouds from the workpiece surface near the intersection plane and project it onto the intersection plane to obtain the two-dimensional slice point set corresponding to the intersection plane.
[0132] After defining the intersection planes, it is necessary to extract a subset of the point cloud near each plane. For the Intersecting planes Select all points that satisfy the following conditions:
[0133] .
[0134] in The slice thickness threshold is generally taken as... mm, The definition is the normal vector of the plane. The extraction point... Projected onto a plane superior:
[0135] .
[0136] Obtain the two-dimensional projection point set In this way, each intersecting plane corresponds to a set of two-dimensional slice points, which prepares for subsequent contour generation.
[0137] Sub-step S33: Obtain the polar angle of each point in the two-dimensional slice point set through the slice centroid, sort the two-dimensional slice point set according to the polar angle, remove noise points, and use cubic splines to fit the sorted points to obtain a smooth closed contour curve. .
[0138] After obtaining the slice point set, it needs to be transformed into a continuous and smooth contour curve, with the slice centroid as the reference point. For reference, calculate the polar angle at each point. :
[0139] .
[0140] This indicates that the slice point set is subtracted from the y-coordinate of the slice centroid in the local coordinate system of the slice plane. This represents the subtraction of the slice point set with the x-coordinate of the slice centroid in the local coordinate system of the slice plane. The points are sorted by polar angle to form a preliminary outline. The point density is calculated using k-NN, and points below a threshold are considered noise and removed.
[0141] .
[0142] like Then remove Then, a cubic spline is used to fit the sorted points to obtain a smooth closed curve. :
[0143] .
[0144] in Here, is the basis function for the cubic spline, s represents the parameters of the cubic spline fitted curve, and M represents the number of points removed from the sorted two-dimensional slice point set after removing noise points. This represents the j-th point after sorting.
[0145] Finally, each slice point set is transformed into a smooth contour curve. This ensures continuity and processability.
[0146] Sub-step S34: For the contour curve Uniform or curvature adaptive sampling is performed. By connecting sampling points within the sampling point set in alternating directions, a connection path is generated between the two-dimensional slice point sets of two adjacent intersecting planes. The smooth transition of the connection path is achieved through linear interpolation or spline interpolation. The global path covering the workpiece surface is obtained by connecting the contour curve sampling points of the two-dimensional slice point sets of all intersecting planes. .
[0147] Specifically, for the contour curve By performing uniform or curvature adaptive sampling, a point set is obtained:
[0148] .
[0149] The relationship between sampling interval and local curvature is as follows:
[0150] .
[0151] in, The sampling interval represents the distance between the j-th sampling point and the previous sampling point. The initial sampling interval is a constant, representing the reference sampling distance without the influence of curvature. Let be the local curvature, representing the j-th sampling point. The degree of surface curvature at point j, To adjust the coefficients, the greater the curvature, the denser the sampling points. Simultaneously, to reduce repetitive motion, alternating directions are used for connection: if... If there are an odd number of layers, the path order is as follows: ;like If the number of levels is even, then the path order is as follows: .
[0152] In the contours of two adjacent slices and Generate connection paths between them. :
[0153] .
[0154] These are the normalized interpolation parameters for the connection path, used to generate a smooth connection path between two adjacent slice contours. Linear interpolation or spline interpolation is used to achieve a smooth transition between the upper and lower contours. Then, all contour sampling points are concatenated with the connection curve to obtain the global path.
[0155] .
[0156] The resulting path can cover the workpiece surface, adapt to changes in curvature, and maintain continuity and feasibility.
[0157] Sub-step S35: For the global path Low-pass filtering is used to eliminate trajectory jitter caused by point cloud noise. The execution posture and processing speed of the robot end effector at each path point of the global path are determined. The fit between the global path and the point cloud surface is evaluated by global root mean square error, mean absolute error and maximum error. Finally, an adaptive tool path is obtained.
[0158] After generating the original tool path, post-processing and verification are required to ensure that the trajectory meets the robot's execution and processing needs. This includes the global path. Low-pass filtering for moving average:
[0159] .
[0160] This is used to eliminate trajectory jitter caused by point cloud noise, where i is the index of the current path point, k is the filter width (i.e., the filter order or the average number of sampling points), and j represents the distance from the current path point. The index of a relative point within a local area centered at a filter window of size k. For path points... Its robot end-effector posture From surface normal vector tangent vector Sure:
[0161] .
[0162] Construct orthogonal bases as the direction matrix of the end effector, and adjust the machining speed according to the curvature. :
[0163] .
[0164] in This is the speed adjustment coefficient. This represents the maximum processing speed of the robot's end effector, which is the highest operating speed the robot can achieve in a flat region where the curvature approaches zero. Represents the i-th path point on the path. The curvature value at the point. A larger curvature results in a lower velocity, ensuring sufficient contact between the tool and the surface. Acceleration is optimized using quadratic programming constraints.
[0165] .
[0166] The fit between the path and the point cloud surface is evaluated using the root mean square error (RMSE), mean absolute error (MAE), and maximum error (MAX).
[0167] .
[0168] This indicates the number of corresponding point pairs between path points and the point cloud surface. If the error exceeds the threshold, the tile spacing or filtering parameters are readjusted. The final output tool path. for:
[0169] .
[0170] This includes location ,attitude ,speed With acceleration acceleration The velocity can be approximated by the derivative and then directly fed into the robot controller.
[0171] S4. An AI-assisted programming framework is adopted to guide the generation of adaptive tool paths through interactive programming via a natural language interface and a knowledge representation engine. The AI-assisted programming framework adopts a meta-Wizard Architecture based on the KnowRob knowledge representation and reasoning (KR&R) engine. By integrating a structured knowledge base, natural language processing (NLP), and Prolog predicate logic, it achieves automated generation from user interaction to executable robot programs.
[0172] Specifically, such as Figure 2 As shown, this step specifically includes the following sub-steps:
[0173] Sub-step S41: In the cognitive layer of the AI-assisted programming framework, the knowledge base is initialized through the meta-guide architecture. The knowledge base defines the core concepts required for the surface treatment task in OWL / RDF format, including the surface treatment task type, the type of robotic arm end effector, the material properties of the workpiece surface, and the process parameters of the surface treatment task. It is stored in the MongoDB database using RDF triples.
[0174] In the system's cognitive layer, the knowledge base is first initialized using a meta-guided architecture. The knowledge base defines the core concepts required for surface treatment tasks in OWL / RDF format, such as task type (e.g., grinding), tool type (e.g., disc sander), material properties (e.g., glass fiber), and key process parameters (e.g., rotational speed of 6000 rpm). This information is uniformly represented as RDF triples. The knowledge base is based on the KnowRob Knowledge Representation and Reasoning (KR&R) engine, loading the SOMA upper-level ontology and the proprietary ontology for robot surface processing. An ontology is a structured knowledge representation used to define concepts, relationships, and rules within a domain. In this invention, the ontology is represented in Web Language (OWL), converted to Resource Description Format (RDF) triples, and stored in the MongoDB database. The proprietary ontology is a domain-specific ontology customized for the surface processing task. Loading refers to dynamically importing and initializing these ontology files in the KnowRob Knowledge Representation and Reasoning (KR&R) engine, making them the structured foundation of the knowledge base for use by the inference and path planning modules. SOMA (Semantic Ontology for Modeling Actions) is a general upper-level ontology integrated into a general framework that provides robot cognition and task planning (see the Knowledge Base Description in the VA section). It contains common-sense knowledge (such as physical laws and spatial relationships) and basic concepts of robot operation (such as actions and objects). SOMA is an open-source framework developed within the KnowRob ecosystem and integrated into the KnowRob Knowledge Representation and Reasoning (KR&R) engine. As a result, the knowledge base not only covers general and robot-specific knowledge but also incorporates domain knowledge related to surface treatment through extended ontologies. More importantly, the workflow itself is modeled using classes and individuals of the ontology. For example, steps such as surface scanning, path programming, simulation execution, and quality control are connected through successive relationships, forming semantic chains that can be manipulated by the inference engine. This allows the point cloud defect detection results and path planning results generated in the previous stage to be directly embedded into the knowledge system and invoked as sub-symbolic attributes.
[0175] Sub-step S42: The domain-specific inferencer of the AI-assisted programming framework combines symbolic knowledge with geometric data, supports adaptive tool path generation, task planning, and parameter derivation. The inference process is based on the Prolog predicate logic of the KnowRob KR&R engine, and utilizes open-source libraries such as SWI-Prolog to derive a set of available tools for task planning through predicate derivation.
[0176] Building upon this, a domain-specific inference engine is responsible for combining symbolic knowledge with geometric data, supporting task planning and parameter derivation. The inference process, based on Prolog predicate logic, is implemented using a Python control module and the KnowRob plugin, enabling the derivation of a set of tools available for the task via the predicate `has_tool`. For example, when point cloud residuals... and curvature When a certain threshold is reached, the inference engine uses a fuzzy constraint function:
[0177] .
[0178] Tools that satisfy both symbolic conditions and geometric constraints are selected to ensure the physical feasibility of parameter selection. This joint symbolic-subsymbolic reasoning overcomes the limitations of relying solely on static knowledge, making the generated task configuration more aligned with the actual needs of surface processing.
[0179] In sub-step S43, when inference cannot automatically complete the parameters required for generating the adaptive tool path to plan the task, the AI-assisted programming framework interacts with the user through a natural language interface to obtain the missing information. The natural language input by the user is converted into text and then divided into semantic units by the NLP pipeline. Each semantic unit is embedded as a vector and then matched with the concept vectors in the knowledge base for similarity.
[0180] When inference fails to automatically complete parameters, the system interacts with the user through a natural language interface to obtain missing information, such as user voice input. First, via speech recognition function Convert to text Then, the NLP pipeline divides it into semantic units. Each semantic block is embedded as a vector. And perform similarity matching with the concept vectors in the knowledge base:
[0181] .
[0182] in, The similarity is obtained from semantic block matching. Vector representations of concepts in a knowledge base are typically generated using embedding methods (such as RDF triple-based vector embedding or pre-trained models) based on concepts defined in the knowledge base's ontology (OWL / RDF format). When similarity... Exceeding the threshold At this time, semantic blocks are mapped to specific concepts in the ontology, thus completing the grounding process. For example, "fiberglass" will be matched to the material class, and then the material parameters required for path execution will be filled in. This mechanism ensures the consistency between fuzzy language input and knowledge base symbolic representation, while forming a closed-loop interaction through text-to-speech feedback.
[0183] Sub-step S44: Parameter completion for the adaptive tool path generation task. The interactive programming workflow of the AI-assisted programming framework is gradually advanced, and the meta-task for generating the adaptive tool path is continuously updated.
[0184] As knowledge is continuously expanded, the interactive programming workflow is gradually advancing. The belief state of the meta-task. As user input and knowledge base reasoning results Continuously updated:
[0185] .
[0186] The next subtask is selected by the policy function:
[0187] .
[0188] When the semantic matching confidence is insufficient, the system will discard the input and call the default value. This avoids the propagation of uncertainty. In this way, interactive programming forms a closed loop of "reasoning-interaction-verification," enabling users to define complex surface processing procedures step by step without needing to understand the underlying code.
[0189] Sub-step S45: Finally, the adaptive tool path information, after inference and interactive completion, is transformed into executable programs for each joint of the robot through the inverse kinematics model.
[0190] Finally, the path information, after reasoning and interactive completion, will be transformed into a program executable by the robot. The path points generated in step S3... and its posture The data is fed into the inverse kinematics model to solve for the corresponding joint configuration of the robot. :
[0191] .
[0192] To ensure trajectory continuity, cubic polynomial interpolation is used between path points, followed by simulation verification in a digital twin environment to calculate the root mean square error between the actual trajectory and the desired path:
[0193] .
[0194] This indicates the number of trajectory sampling points involved in error calculation, i.e., the total number of sampling points on the path, and the interpolation and force control parameters are dynamically adjusted based on the error results. In this way, the generated program not only conforms to the semantic constraints of the task, but also meets the requirements of trajectory accuracy and force control stability in physical execution, thereby achieving closed-loop automation from point cloud modeling to robot program generation.
[0195] The above describes the path planning method for robots in workpiece surface treatment according to the present invention. After the generated path planning program is input into the robot controller, the present invention further employs the following robot trajectory control method, such as... Figure 1In steps S5 and S6, a variable stiffness impedance control law that adapts to the material properties of the workpiece surface and external disturbances is added to the trajectory control of the robot in the workpiece surface treatment task. The force feedback trajectory is collected as a reference, and the force control surface treatment is realized by combining the quadratic programming optimization controller, thus completing the variable stiffness trajectory control of the robot on the workpiece surface.
[0196] The variable stiffness impedance control law takes into account the position error, velocity error, and desired force of the robot end effector on the workpiece surface as inputs, outputs the variable stiffness matrix of the workpiece surface and the external force, constructs the system energy function of the robot moving on the workpiece surface, and introduces an energy tank mechanism as an additional energy storage unit. When the robot end effector injects too much energy due to changes in the stiffness of the workpiece surface, the energy tank absorbs some energy to achieve adaptive stabilization. When the energy is insufficient, the stored energy is released to maintain the continuous controllability of the robot end effector trajectory.
[0197] Building upon path generation and task programming, the core of the control layer lies in implementing a variable stiffness impedance control capable of adapting to different material properties and external disturbances. System inputs include the position error of the robot's end effector. ,in The position is measured in real time by the sensor. This represents the desired path. Additionally, an internal state variable is introduced. This describes the system's energy storage. The controller's output is the time-varying stiffness matrix. and external forces Together, they ensure the passive stability of the entire system. The impedance control law is defined as:
[0198] .
[0199] in , and Let represent the mass, damping, and stiffness matrices, respectively. Under low-speed conditions, the inertia term... This can be ignored; the control law simplifies to:
[0200] .
[0201] Therefore, the time-varying characteristics of the stiffness matrix parameters directly determine the force-position response of the system. When When the value is low, the system exhibits strong compliance, effectively reducing vibration and overshoot; while when... When the value is increased, the system can converge to the target trajectory faster, but it is prone to instability.
[0202] To achieve an adaptive balance between compliance and stability, the control framework introduces a passive analysis based on the energy function. The system energy can be written as:
[0203] .
[0204] Its derivative is:
[0205] .
[0206] In an ideal situation, if The system satisfies passivity. However, due to The introduction of this, rapid changes in stiffness may lead to An excessively large energy tank would compromise system stability. Therefore, an energy tank mechanism is introduced as an additional energy storage unit, defined as follows:
[0207] .
[0208] The total energy of the system is therefore expanded to By adjusting the dynamics of the energy tank, we can ensure that its evolutionary laws are met. This theoretically ensures the overall passivity of the system.
[0209] The state evolution of the energy tank mechanism used here is given by the following formula:
[0210] .
[0211] in,
[0212] .
[0213] And switching function Defined as:
[0214] .
[0215] Therefore, when the system receives too much energy due to stiffness changes, the energy tank absorbs some of the energy to achieve adaptive stability; when the energy is insufficient, it releases the stored energy to maintain control continuity.
[0216] In the trajectory control of the robot in the workpiece surface treatment task, the external force on the workpiece surface is collected in real time by the sensor. The force error between the target force and the expected force is corrected. The weighted square error between the target force and the external force output by the variable stiffness impedance control law is optimized by quadratic programming. In the robot's surface treatment task, the variable stiffness matrix output by the variable stiffness impedance control law and the external force are updated in real time, so that the robot's force error gradually converges. The robot's control parameters are adjusted in real time by the updated variable stiffness impedance control law.
[0217] For example, during the surface treatment task, the robot uses a six-dimensional force / torque sensor to collect external forces in real time. According to expectation The structural force error is This error reflects the deviation of the robot from the desired contact state during task execution. To improve the robustness and responsiveness of the control, a proportional correction coefficient is introduced. Define the modified target force: This ensures that the expectation force can be adjusted in a timely manner when there are disturbances and modeling uncertainties.
[0218] Based on target force A quadratic programming (QP) optimization problem is constructed to ensure stable tracking performance of the robot during force control. The optimization objective is to minimize the external force. Weighted squared error between the target force and the target force:
[0219] .
[0220] in Here is the weight matrix. An energy tank constraint is also introduced during the optimization process to ensure the system's passivity and energy stability:
[0221] T .
[0222] Where T As the system's energy tank, A minimum energy threshold is set for the system to avoid internal state variables. =0, and The minimum and maximum values set to optimize stiffness, The maximum force expected.
[0223] This design ensures that external forces do not exceed safe limits, stiffness is adjusted within a reasonable range, and the system energy is always non-negative.
[0224] The above optimization problem can be solved in real time using the fast quadratic programming solver OSQP, typically at a frequency above 100Hz. The solver outputs updated stiffness parameters. And calculate the optimal external force. This process forms a closed-loop control framework: force feedback corrects the target → QP optimization → outputs optimal parameters, ensuring that the force error continuously converges during task execution.
[0225] Based on the optimization results and the robot's dynamics model, the final force control command is constructed. The control law is updated as follows:
[0226] .
[0227] in The inertia matrix, For Coriolis force and centrifugal force terms, For gravity compensation, x represents the position vector of the robot's end effector in the task space (Cartesian space). This represents the velocity of the robot's end effector in the task space (Cartesian space). This represents the acceleration of the robot's end effector in the task space (Cartesian space). Calculated... Then through the Jacobian matrix Convert to joint torque command:
[0228] .
[0229] The robot's end effector is driven to complete stable surface treatment operations. Through this closed-loop optimization framework, the force error is less than 0.2 N under undisturbed conditions and remains below 0.5 N even under external disturbances.
[0230] The above embodiments describe the basic principles and main features of the present invention, as well as its advantages. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the specific working principles of the present invention. Various changes and modifications can be made to the present invention without departing from its spirit and scope. All such changes and modifications fall within the scope of the present invention as claimed, which is defined by the appended claims and their equivalents.
Claims
1. A method for robot variable stiffness surface path planning based on three-dimensional perception, characterized in that, Comprising the following steps: Step S1, collecting the initial point cloud data of the workpiece surface, and converting the preprocessed data into aligned point cloud data in the robot coordinate system; Step S2, establishing a surface defect detection model, performing linear regression on the aligned point cloud data, and using a k-NN method to classify the point cloud into normal points and defect points, filtering and identifying the defect points on the workpiece surface from the aligned point cloud data, and compensating for the deformation deviation of the workpiece surface by registering the point cloud with the target model point cloud of the workpiece, to obtain a complete point cloud set of the workpiece surface; The step S2 comprises the following sub-steps: Sub-step S21, screening stage, linear regression is used to fit a local plane within a point cloud neighborhood of the aligned point cloud data, the mean square error of the neighborhood points and the fitted plane is minimized, and the optimized optimal solution is obtained by the least square method For any point cloud point in the aligned point cloud data , the residual error is calculated : , a represents the degree of inclination of the fitting plane in the x direction, b represents the degree of inclination of the fitting plane in the y direction, and c represents the intercept of the fitting plane at the origin, the spatial coordinate information of a point cloud point , if exceeds a threshold value , the point is determined as a possible defect point, and a possible defect point set is constructed ; Sub-step S22, in the re-screening stage, for the point cloud point to be classified in the given possible defect point set, a k-NN method is used for region classification, by the Euclidean distance of the point cloud point to other point cloud points in the point cloud, the nearest neighbor points are selected, recorded as set , the class label of the point to be classified in the possible defect point set is , the class label of the neighbor point is , and the class label of the point to be classified is determined according to a voting rule . , wherein, is any point of the selected k neighbors, denotes and the Euclidean distance between two points, denotes the class value of a possible defect point and normal point, is an indicator function, denotes the class label of the neighbor point is assigned to the determined defect points are constructed into a final defect point set ; Sub-step S23, removing the point cloud points in the final defect point set from the aligned point cloud data to construct a point cloud optimization set without defect points, and obtaining an alignment transformation matrix by iteratively closest point between the point cloud optimization set and the point cloud of the target model, and registering the point cloud data; Sub-step S24, remapping the defect point set to the global alignment coordinate system of the aligned point cloud data through the alignment transformation matrix, obtaining a complete point cloud set of the workpiece surface after registration, and comparing with the standard surface of the target model to obtain the geometric parameters of the defect; Step S3, path planning for the complete point cloud set of the workpiece surface obtained in step S2 to generate an adaptive tool path, using a quadratic programming-based online stiffness optimization method in the control layer, and combining an energy tank mechanism to ensure the system passivity and stability of the robot in the trajectory control of the workpiece surface, and realizing real-time adjustment of the stiffness parameter; The adaptive tool path in step S3 is generated by the following sub-steps: Sub-step S31, obtaining the complete point cloud set of the workpiece surface, extracting the surface normal vector direction of the point cloud points in the set by principal component analysis, and using the surface normal vector direction as a plane normal vector to construct an intersection plane; Sub-step S32, projecting the point cloud subset near the intersection plane of the workpiece surface onto the intersection plane to obtain a two-dimensional slice point set corresponding to the intersection plane; Sub-step S33, obtaining the polar angle of each point in the two-dimensional slice point set by slice centroid, sorting the two-dimensional slice point set according to the polar angle, removing the noise points, and using cubic spline to fit the sorted points to obtain a smooth closed contour curve; Sub-step S34, uniformly or curvature-adaptively sampling the contour curve, connecting the sampling points in the sampling point set by alternating direction, generating a connection path between the two-dimensional slice point sets of adjacent two intersection planes, realizing smooth transition of the connection path by linear interpolation or spline interpolation, and connecting all the contour curve sampling points of the two-dimensional slice point sets of the intersection planes to obtain a global path covering the workpiece surface; Sub-step S35, low-pass filtering the global path to eliminate the trajectory jitter caused by point cloud noise, determining the execution posture and processing speed of the robot end at each path point of the global path, evaluating the fitting degree of the global path and the point cloud surface by global root mean square error, average absolute error and maximum error, and finally obtaining the adaptive tool path.
2. The robot variable stiffness surface path planning method based on three-dimensional perception according to claim 1, characterized in that: In the step S1, the initial point cloud data of the workpiece surface is obtained by using a laser scanner or an RGB-D camera, the initial point cloud data is down-sampled by voxel, the pre-processed point cloud data is generated by surface fitting, the homogeneous transformation matrix of the laser scanner or the RGB-D camera to the robot coordinate is obtained based on the hand-eye calibration method, the pre-processed point cloud data is converted into the aligned point cloud data in the robot coordinate system, and the integrity of the aligned point cloud data is checked by the distance distribution between point clouds.
3. The three-dimensional perception based robot variable stiffness surface path planning method of claim 1, wherein: In the sub-step S23, firstly, a feature-based coarse registration is adopted to find point pairs of all point cloud points in the point cloud optimization set through a nearest neighbor search, to adopt a RANSAC random sample minimum set to estimate a candidate transform by using a feature corresponding point set , to select a solution that makes the number of inliers maximum, to obtain an initial transform matrix, and then to perform a fine alignment by using an ICP algorithm, to find nearest neighbor points by taking the initial transform matrix as an initial iteration transform matrix of the point cloud optimization set, to iteratively update the transform matrix until an error of the ICP algorithm converges, and to obtain a final alignment transform matrix.
4. The three-dimensional perception based robot variable stiffness surface path planning method of claim 1, wherein: The step S4 further comprises the following sub-steps:
5. The three-dimensional perception based robot variable stiffness surface path planning method of claim 4, wherein: The step S4 further comprises the following sub-steps: In the sub-step S41, the initialization of the knowledge base is implemented by the meta-guide architecture in the cognitive layer of the AI-assisted programming framework, the knowledge base is defined in the OWL / RDF form to define the core concepts required for the surface treatment task, including the surface treatment task type, the tool type at the end of the mechanical arm, the material attribute of the workpiece surface, and the process parameters of the surface treatment task, and the RDF triple is stored in the MongoDB database; In the sub-step S42, the domain-specific reasoner of the AI-assisted programming framework combines the symbolic knowledge with the geometric data to support the parameter deduction and task planning for the adaptive tool path generation, the reasoning process is based on the Prolog predicate logic, and the tool set available for the task planning is derived by the predicate; In the sub-step S43, when the reasoning cannot automatically complete the required parameters for the adaptive tool path generation task planning, the AI-assisted programming framework obtains the missing information through the natural language interface and the user interaction, the natural language input by the user is converted into text and then divided into semantic units by the NLP pipeline, each semantic unit is embedded into a vector and then matched with the concept vector in the knowledge base according to the similarity; In the sub-step S44, the parameter completion of the adaptive tool path generation task, the interactive programming workflow of the AI-assisted programming framework is gradually promoted, and the meta-task for generating the adaptive tool path is constantly updated; In the sub-step S45, the adaptive tool path information after the reasoning and the interactive completion is converted into the executable program for each joint of the robot by the inverse kinematics model.
6. A method of robot control for a variable stiffness surface, characterized by: The adaptive tool path generated by the path planning method according to any one of claims 1-5 is input into the robot controller, a variable stiffness impedance control law that is adaptive to the material characteristics of the workpiece surface and external disturbances is added to the trajectory control of the robot in the workpiece surface treatment task, and the force feedback trajectory is collected as a reference to realize the force control surface treatment by combining the quadratic programming optimization controller, and the variable stiffness trajectory control of the robot on the workpiece surface is completed.
7. The robotically-controlled method of varying stiffness surfaces of claim 6, wherein: The input of the variable stiffness impedance control law includes the position error, velocity error and desired force of the robot end on the workpiece surface, and the output is the variable stiffness matrix and external force of the workpiece surface, a system energy function of the robot moving on the workpiece surface is constructed, and an energy tank mechanism is introduced as an additional energy storage unit, when the robot end is excessively energized due to the stiffness change of the workpiece surface, the energy tank absorbs part of the energy to realize adaptive stability, and when the energy is insufficient, the stored energy is released to maintain the continuous control of the robot end trajectory.
8. The robotically-controlled method of varying stiffness surfaces of claim 7, wherein: In the trajectory control of the robot in the workpiece surface processing task, the external force acting on the workpiece surface is collected in real time through the sensor, the force error between the expected force and the target force is corrected, the weighted square error between the target force and the external force output by the variable stiffness impedance control law is optimized through quadratic programming, the variable stiffness matrix and the external force output by the variable stiffness impedance control law are updated in real time in the surface processing task of the robot, the force error of the robot is gradually converged, and the control parameters of the robot are adjusted in real time through the updated variable stiffness impedance control law.
Citation Information
Patent Citations
Method and system for automatically planning curved surface path of grinding robot
CN120755896A
Robot fleet management and additive manufacturing for value chain networks
AU2021401816A1
Impedance control method for flexibility joint mechanical arm based on connection and damping configuration
CN104723340A