A method for generating an adaptive following trajectory of a special-shaped curved surface mechanical arm
Patent Information
- Application Number
- CN202611131264.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-08-28
AI Technical Summary
这些方法在面对工件装夹偏差、曲面曲率突变、型腔凹凸交替、大尺寸曲面分段扫描等复杂场景时,无法自适应调整轨迹点位姿与运动速度,易出现轨迹偏移、末端姿态突变、运动冲击、跟踪精度不足、曲面贴合度差等问题,难以满足自动化、高精度、高一致性作业需求
[0049] (1) Achieve full-process automation without the need for teaching or CAD models. This invention constructs a complete automated link of point cloud acquisition → purification → segmentation → leveling → feature recognition → pose correction → trajectory generation → attitude compensation → velocity planning → coordinate transformation. The entire process requires no manual teaching, no offline programming, and no CAD model. It can be directly integrated into intelligent detection and automated operation equipment, significantly reducing manual programming and debugging time and improving the efficiency of automated operation.
Smart Images

Figure CN122645348A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of robotic arm motion control methods. Background Technology
[0002] Irregularly shaped curved surface components are typical structures in high-end equipment and intelligent manufacturing, widely found in components such as aero-engine blades, precision molds, and complex housings. They generally possess geometric features such as complex cavities, sealing grooves, and variable curvature profiles. Surface inspection, polishing, contour measurement, and automated docking of these components require robotic arms to achieve high-precision, highly compliant, and constant-attitude surface following. However, irregularly shaped curved surface components typically lack standard CAD models, have random clamping positions, and exhibit significant surface undulations. This necessitates that the robotic arm's end effector maintain a constant distance and continuous, stable movement perpendicular to the surface normal to ensure operational accuracy, surface quality, and equipment operational safety.
[0003] Traditional robotic arm trajectory planning methods mainly rely on manual teaching, offline programming, or 2D vision guidance. When faced with complex scenarios such as workpiece clamping deviations, abrupt changes in surface curvature, alternating concave and convex cavities, and segmented scanning of large-sized curved surfaces, these methods cannot adaptively adjust the position and speed of trajectory points, and are prone to problems such as trajectory deviation, sudden changes in end-effector posture, motion impact, insufficient tracking accuracy, and poor surface fit, making it difficult to meet the requirements of automated, high-precision, and highly consistent operations.
[0004] In recent years, robotic arm trajectory planning based on 3D point clouds has gradually become a research hotspot in intelligent manufacturing. However, existing solutions generally suffer from key defects such as imperfect point cloud preprocessing, incomplete filtering and data simplification, insufficient preservation of surface features and edge enhancement, and inability to achieve adaptive weighted purification of features. They also have problems such as insufficient utilization of surface normal vectors and curvature features, low accuracy in recognizing concave and convex regions, poor trajectory smoothness, lack of automatic workpiece pose correction, lack of a unified compliant control mechanism jointly driven by curvature and normal vectors, inability to synchronously and collaboratively adjust trajectory density through a single index, insufficient robustness of end-effector posture and motion speed, and hand-eye coordinate transformation. They cannot achieve stable full-domain following of irregular curved surfaces without teaching or CAD models, and are difficult to adapt to complex structures and high-reliability operation requirements. Summary of the Invention
[0005] The purpose of this invention is to provide an adaptive following trajectory generation method for a robotic arm operating on irregular curved surfaces, integrating point cloud adaptive purification, accurate recognition of concave and convex features, Bayesian-curvature-normal joint driven trajectory smooth generation, real-time normal attitude compensation, and velocity-density coordinated control. This aims to overcome the problems existing in the prior art.
[0006] To achieve the above objectives, the technical solution of the present invention is: a method for generating adaptive following trajectories for a robotic arm with an irregular curved surface, the method steps of which are as follows:
[0007] S1: Collect 3D point cloud data of irregular curved surfaces to obtain the original point cloud;
[0008] S2: Perform the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm on the original point cloud to obtain the purified point cloud;
[0009] S3: Segment the purified point cloud and extract the point cloud of the working area;
[0010] S4: Perform planar fitting and point cloud flattening on the point cloud of the work area to obtain the flattened point cloud;
[0011] S5: Compare the curvature and normal vector of the point cloud with the flat point cloud, identify and separate the concave and convex regions through region growing, obtain surface feature information, and obtain a label set;
[0012] S6: Match the flattened point cloud with the 3D template to calculate the rotation and translation matrix, and obtain the transformation matrix;
[0013] S7: Based on the flattened point cloud, label set and transformation matrix, a smooth trajectory line is generated along the operation path using the Bayesian-curvature-normal joint compliant algorithm to obtain the trajectory path point sequence;
[0014] S8: Perform real-time compensation of normal attitude and height on the trajectory path point sequence based on the undulation of the irregular curved surface to obtain the compensated trajectory;
[0015] S9: The compensated trajectory is combined with the trajectory curvature and the robotic arm motion constraints to dynamically adjust the motion speed, resulting in a speed-planned trajectory;
[0016] S10: The speed planning trajectory is mapped to the robotic arm coordinate system through matrix inverse transformation and hand-eye coordinate transformation to generate robotic arm execution instructions, which are used to drive the execution of adaptive following operations.
[0017] Furthermore, in step S1, a three-dimensional visual scanning system is used to collect three-dimensional point cloud data of irregular curved surfaces. The point cloud collection density is not less than 200 points / cm², and the collection accuracy is ≤0.02mm. At the same time, the clamping posture, camera exposure, and ambient lighting parameters are recorded. The data is transmitted in real time to achieve alignment between the original point cloud cache and the timestamp.
[0018] Furthermore, the point cloud purification algorithm in step S2 is the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm, which includes neighborhood construction, four-level feature calculation, curvature adaptive weight calculation, point cloud purity score, global adaptive threshold decision, and adaptive density resampling. The neighborhood construction involves constructing a neighborhood point set for any point in the original point cloud. The four-level feature calculation includes spatial distance feature, normal vector deviation feature, curvature feature, and local density feature, which respectively characterize the geometric attributes of each point in four dimensions.
[0019] Furthermore, the calculation expression for the spatial distance feature is as follows: ,in, For the first Spatial distance characteristics of points; For the first point cloud Three-dimensional coordinate points; for Within the neighborhood One point; for The neighborhood point set; The number of points in the neighborhood; The Euclidean distance between two points;
[0020] The expression for calculating the normal vector deviation characteristic is as follows: ,in, For the first Characteristics of the normal vector deviation at each point; The number of points in the neighborhood; for Within the neighborhood One point; for The normal vector; For neighborhood points The normal vector; It is the inverse cosine function;
[0021] The expression for calculating the curvature feature is as follows: ,in: For the first Curvature characteristics at each point; Let be the eigenvalues of the neighborhood covariance matrix, and satisfy . ;
[0022] The calculation expression for the local density feature is as follows: ,in, For the first Local density features of individual points; The neighborhood search radius; The number of points in the neighborhood;
[0023] The expression for calculating the curvature adaptive weight is:
[0024] ,in, Spatial distance feature weights; The feature weights are the deviations from the normal vector. Weights for curvature features; Weights for local density features; Curvature characteristics;
[0025] The expression for calculating the point cloud purity score is as follows:
[0026] ,in, For the first Purity score for each point; ; This represents the normalized spatial distance feature. The characteristic of the deviation of the normalized normal vector; Normalized curvature characteristics; This represents the normalized local density features.
[0027] The global adaptive threshold decision calculation expression is as follows: ,in, The purity judgment threshold; Based on the threshold, For adjustment coefficients, Let be the standard deviation of the purity scores for all points, and the decision rule be... Keep this point. Remove this point.
[0028] The adaptive density resampling calculation expression is as follows: ,in, For the first Target density after resampling at each point; Based on the point cloud density; These are curvature weighting coefficients; These are the weighting coefficients for the deviation of the normal vector; Curvature characteristics; This represents the characteristic of the normal vector deviation.
[0029] Furthermore, step S3 uses the RANSAC algorithm to segment the purified point cloud.
[0030] Furthermore, step S4 uses the least squares method to perform plane fitting and point cloud leveling on the point cloud of the working area. Specifically, it calculates the centroid of the point cloud and translates the point cloud to the origin of the coordinate system; constructs the plane equation, minimizes the sum of squared distances from the points to the plane, and solves for the plane parameters and normal vector; constructs a rotation matrix based on the deviation between the normal vector and the Z-axis, and rotates the point cloud to be parallel to the XOY plane, thus completing the point cloud leveling.
[0031] Furthermore, step S5 specifically includes normal vector estimation, curvature calculation, and region growing. The normal vector estimation fits the tangent plane to a set radius neighborhood to unify the normal vector direction. The curvature calculation involves solving the eigenvalues of the neighborhood covariance matrix to obtain the principal curvature and Gaussian curvature. The region growing uses curvature extrema points as seeds and grows according to curvature thresholds to separate concave and convex regions.
[0032] Furthermore, step S6 specifically involves extracting Harris or SIFT key points from the flattened point cloud and the 3D template; calculating FPFH feature descriptors and matching similar feature point pairs; estimating the rotation matrix and translation vector to complete fine registration.
[0033] Furthermore, in step S7, the Bayesian-curvature-normal joint compliance algorithm has the following steps:
[0034] S7.1: Construct a covariance matrix using neighborhood points and solve for the eigenvalues to obtain the original local curvature;
[0035] S7.2: Calculate the angle between the point cloud normal vector and the reference direction to obtain the deviation angle between the original normal vector and the reference direction;
[0036] S7.3: Based on Bayesian maximum a posteriori probability estimation, noise optimization is performed on the deviation angle between curvature, normal vector and reference direction to obtain the Bayesian optimized curvature and the deviation angle between normal vector and reference direction;
[0037] S7.4: Substitute the Bayesian-optimized curvature, normal vector, and deviation angle of the reference direction into the calculation of the trajectory compliance factor;
[0038] S7.5: Based on adaptive encryption or sparse trajectory point density;
[0039] S7.6: Adjust movement speed dynamically;
[0040] S7.7: Corrects the end-effector pose in real time based on the Bayesian optimized normal vector.
[0041] Furthermore, the Bayesian maximum a posteriori estimation provides the optimal estimate of the deviation angle between the curvature, the normal vector, and the reference direction, calculated using the following formula: , ,in: The true geometric state of the surface includes curvature, the deviation angle between the normal vector and the reference direction; This represents the observation of the current point cloud data under all possible true geometric states of the surface. The total probability; This is the prior probability; For observation probability; This is the posterior probability; To obtain the optimized surface geometry through Bayesian maximum a posteriori estimation;
[0042] How to calculate trajectory compliance factor: ,in: For trajectory compliance factor ( ); The local curvature after Bayesian optimization; θ is the deviation angle between the Bayesian optimized normal vector and the reference direction; 0.6 and 0.4 are weighting coefficients;
[0043] Adaptive trajectory point density calculation method: ,in: The base trajectory point density is used, and the trajectory points are automatically densified when the curvature is large and the normal changes rapidly.
[0044] Adaptive motion speed calculation method: ,in: The speed is automatically reduced as the compliance factor increases to the maximum permissible speed.
[0045] Calculation method for real-time normal attitude compensation: ,in: The angle of the current point normal vector after Bayesian optimization; Using the reference attitude angle, the end attitude is corrected in real time by calculating the normal attitude real-time compensation amount to maintain the vertical surface.
[0046] Furthermore, step S8 specifically involves real-time reading of the Z-coordinate of the trajectory point and the surface normal vector; filtering and optimizing the normal vector based on the Bayesian maximum a posteriori probability; dynamically adjusting the end effector posture to ensure it remains consistent with the optimized surface normal vector; and dynamically adjusting the Z-axis height based on Bayesian distance estimation to maintain a constant distance between the end effector and the workpiece surface.
[0047] Furthermore, step S9 specifically establishes a closed-loop collaborative mechanism between velocity and trajectory density based on the compliance factor optimized by Bayes; for regions with large curvature and drastic changes in normal, the motion speed is reduced; for flat regions with gentle curves, the trajectory points are automatically densified to increase the motion speed.
[0048] By adopting the above technical solution, the beneficial effects of the present invention are:
[0049] (1) Achieve full-process automation without the need for teaching or CAD models. This invention constructs a complete automated link of point cloud acquisition → purification → segmentation → leveling → feature recognition → pose correction → trajectory generation → attitude compensation → velocity planning → coordinate transformation. The entire process requires no manual teaching, no offline programming, and no CAD model. It can be directly integrated into intelligent detection and automated operation equipment, significantly reducing manual programming and debugging time and improving the efficiency of automated operation.
[0050] (2) Automatic correction of clamping deviation and high-precision positioning were achieved. The working area was extracted by RANSAC segmentation in step S3, the clamping tilt was eliminated by least squares plane fitting and point cloud flattening in step S4, and the pose deviation was corrected by three-dimensional template matching in step S6. The triple positioning correction worked together to achieve an overall positioning accuracy of 0.02mm and a Z-axis tilt error of ≤0.02mm, which effectively solved the problem of trajectory deviation caused by random workpiece clamping.
[0051] (3) High-precision adaptive following of irregular curved surfaces is achieved. The geometric features of the curved surface are obtained by identifying the concave and convex areas in step S5, the adaptive trajectory is generated by the Bayesian-curvature-normal joint compliance algorithm in step S7, and the normal attitude and height are compensated in real time in step S8 to maintain constant distance and constant normal, so that the attitude fluctuation is ≤ ±0.1°, the distance fluctuation is ≤ ±0.05mm, the trajectory following error is ≤ 0.02mm, the surface fitting consistency is improved by 40% compared with the existing solution, and the one-time positioning and following success rate is ≥99%, which completely solves the problem of following deviation and attitude jump caused by the undulation of irregular surfaces.
[0052] (4) Adaptive and coordinated control of motion speed and trajectory density was achieved. Through the adaptive trajectory point density calculation and adaptive motion speed calculation based on compliance factor in step S7, combined with the look-ahead speed planning based on acceleration and jerk constraints in step S9, a closed-loop coordinated mechanism of speed and trajectory density was established. The robot automatically slows down and densifies in curvature change regions and automatically speeds up and sparses in flat regions to ensure that the robot operates smoothly without impact. Attached Figure Description
[0053] Figure 1 This invention relates to a schematic diagram of the system structure of an adaptive following trajectory generation method for a non-circular curved surface robotic arm.
[0054] Figure 2 This is a flowchart illustrating a method for generating adaptive following trajectories for a robotic arm with irregular curved surfaces, as per the present invention. Detailed Implementation
[0055] To further explain the technical solution of the present invention, the present invention will be described in detail below through specific embodiments.
[0056] This embodiment discloses an adaptive following trajectory generation method for a robotic arm with an irregular curved surface, which is applied to an adaptive following system for a robotic arm with an irregular curved surface, such as... Figure 1The system structure shown includes two parts: hardware and algorithms. The hardware mainly includes a 3D vision scanning module, a multi-axis robotic arm, a data processing controller, a hand-eye coordinate transformation unit, an end effector, and a human-machine interface. The 3D vision scanning module is used to collect 3D point cloud data of the workpiece; the multi-axis robotic arm actuator realizes spatial positioning and trajectory movement; the end effector maintains a constant distance and constant normal orientation with the surface; the data processing controller is used for point cloud processing, trajectory planning, and logical operations; the hand-eye coordinate transformation unit realizes accurate mapping between the camera coordinate system and the robot coordinate system; and the human-machine interface is used for parameter configuration, status monitoring, and result display.
[0057] The improvement of the technical solution of this invention is mainly in the algorithm part, such as... Figure 2 As shown, MFW-Pure (Multi-level Feature Weighted-Purification) is implemented for multi-level feature weighted adaptive point cloud purification, automatic trajectory generation, pose correction, normal pose compensation, and velocity collaborative control. Figure 2 As shown in the figure, the following describes in detail a method for generating adaptive following trajectory for a non-circular curved surface robotic arm disclosed in this embodiment. The method steps are as follows.
[0058] S1: Obtain the original point cloud by acquiring 3D point cloud data of irregular curved surfaces through a 3D vision scanning system.
[0059] The adaptive following system of the irregular curved surface robotic arm is activated. The 3D vision scanning module (which can be a line laser or structured light scanning device, such as a 3D camera) performs a full-area scan of the workpiece, acquiring 3D point cloud data of the working area such as irregular curved surfaces, complex cavities, concave and convex structures, and sealing grooves in real time to obtain the original point cloud. In this embodiment, the point cloud acquisition density is not less than 200 points / cm² (e.g., 200 points / cm²), and the acquisition accuracy is ≤0.02mm (e.g., 0.02mm). At the same time, parameters such as clamping posture, camera exposure, and ambient lighting are recorded to provide a benchmark for subsequent point cloud purification. Meanwhile, the data is transmitted to the data processing controller in real time through a high-speed bus to complete the original point cloud caching and timestamp alignment.
[0060] S2: Perform the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm on the original point cloud, simultaneously completing denoising, outlier removal, surface feature preservation, edge enhancement and density adaptive resampling to obtain the purified point cloud.
[0061] This step applies the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm to the original point cloud, completing noise removal, outlier filtering, surface feature preservation, edge enhancement, and density adaptive resampling in one step, thus improving the fidelity and robustness of the point cloud. The specific algorithm process includes neighborhood construction, four-level feature calculation, curvature adaptive weight calculation, point cloud purity scoring, global adaptive threshold decision, and adaptive density resampling for any point in the original point cloud. The neighborhood construction involves applying the algorithm to any point in the original point cloud. Constructing a neighborhood point set Neighborhood search radius =0.5mm. The four-level feature calculations are spatial distance feature, normal vector deviation feature, curvature feature, and local density feature. The four features characterize the geometric properties of each point from four dimensions: the degree of spatial position deviation, the consistency of local normal vector, the degree of surface curvature, and the density of point cloud distribution.
[0062] The spatial distance feature quantifies the local dispersion of a point in space by calculating the average Euclidean distance between the target point and all its neighboring points. The calculation expression is as follows: ,in, For the first Spatial distance characteristics of points; For the first point cloud Three-dimensional coordinate points; for Within the neighborhood One point; for The neighborhood point set; The number of points in the neighborhood; The value represents the Euclidean distance between two points. The magnitude of this calculated result directly reflects the aggregation or deviation of the point relative to the surrounding point cloud. The larger the value, the farther the point is from the aggregation area of the surrounding point cloud, and the more likely it is to be noise or an outlier. The smaller the value, the higher the spatial aggregation of the point with the surrounding point cloud, and the more likely it is to be located in the main area of the effective surface.
[0063] The normal vector deviation feature quantifies the normal consistency and curvature of the local surface by calculating the average of the angles between the normal vectors of the target point and all its neighboring points, providing a crucial geometric basis for distinguishing between flat regions and complex feature regions. The calculation expression is: ,in, For the first Characteristics of the normal vector deviation at each point; The number of points in the neighborhood; for Within the neighborhood One point; for The normal vector; For neighborhood points The normal vector; This is the inverse cosine function. The larger the value of this calculation result, the greater the difference in normal vectors between the target point and the surrounding points, and the more drastic the change in the orientation of the local surface. This usually corresponds to areas with high curvature, surface edges, transitions between concave and convex features, or points of noise interference. The smaller the value, the more consistent the normal vectors of all points in the local area are, corresponding to a relatively flat surface area.
[0064] The expression for calculating the curvature feature is as follows: ,in: For the first Curvature characteristics at each point; Let be the eigenvalues of the neighborhood covariance matrix, and satisfy . .
[0065] The local density feature quantifies the density or sparseness of a point cloud within a local region by statistically analyzing the ratio of the number of points in the neighborhood of a target point to the area of that neighborhood. The calculation expression is: ,in, For the first Local density features of individual points; The neighborhood search radius; This represents the number of points in the neighborhood. The larger the value of this calculation result, the denser the point cloud around the point, usually located in a region where the point cloud is uniformly sampled and has abundant information; the smaller the value, the sparser the point cloud around the point, often located at the edge of the point cloud, in a scanning blind zone, or in an area with insufficient sampling.
[0066] In this embodiment, local density features do not act independently, but rather work in synergy with curvature features. In flat regions (low curvature), the weight of local density features is automatically increased to ensure uniform sampling of the flat surface; while in high curvature regions, this weight is automatically reduced, giving the curvature features the dominant role. This enables subsequent adaptive density resampling to appropriately sparse the point cloud in flat regions and automatically densify the point cloud in regions with intense features, thus preserving surface details while controlling the data scale.
[0067] The curvature adaptive weighting uses the local curvature value of the current point as the sole adjustment variable to dynamically allocate weight coefficients for four features: spatial distance, normal vector deviation, curvature, and local density, thereby achieving adaptive adjustment of feature contributions. The calculation expression is:
[0068]
[0069] ,in, Spatial distance feature weights; The feature weights are the deviations from the normal vector. Weights for curvature features; Weights for local density features; The calculation results utilize curvature features. When the curvature value is large (located in areas with sharp undulations such as edges, concave and convex transitions), the algorithm automatically increases the weight of curvature features and normal vector deviation features, making the subsequent purity score more focused on geometric morphology information, thus effectively preserving surface details. When the curvature value is small (located in flat areas), the algorithm automatically increases the weight of spatial distance and local density features, making the purity score more focused on spatial distribution and sampling uniformity, thus strengthening the ability to suppress noise and outliers. This mechanism ensures that the purification algorithm adaptively matches different local geometric shapes, avoiding the accuracy loss in complex surface scenarios with fixed weights.
[0070] The point cloud purity score is calculated by weighting and fusing four normalized geometric features (spatial distance, normal vector deviation, curvature, and local density) with an adaptive curvature weight. This quantifies each point in the point cloud into a purity score between 0 and 1, comprehensively representing the reliability of that point as a point within an effective surface. The calculation expression is:
[0071] ,in, For the first Purity score for each point; ; This represents the normalized spatial distance feature. The characteristic of the deviation of the normalized normal vector; Normalized curvature characteristics; The local density features are normalized. Min-Max linear normalization is used, mapping each feature value to the [0,1] interval. The closer the calculated value is to 1, the higher the degree of fit between the point and the geometric properties of the ideal surface, and the more likely it is to be a valid point to be retained; the closer it is to 0, the greater the deviation of the point from the surface model, and the more likely it is to be noise, an outlier, or a boundary edge. By fusing the four features into a unified quantitative index, the purity score provides a single, intuitive criterion for subsequent global adaptive thresholding, eliminating the need for manually set multi-level parameters in the point cloud purification process and achieving fully automatic and highly reliable point cloud quality assessment.
[0072] The global adaptive threshold decision calculation dynamically calculates the discrimination threshold based on the statistical distribution characteristics of the purity score, achieving globally optimal separation of valid interior points and noisy outliers in the point cloud. The expression is: ,in, The purity judgment threshold; The base threshold is set at 0.7. This is an adjustment coefficient, with a value of 0.2. Let be the standard deviation of the purity scores for all points. The decision rule is as follows: This point is retained and considered an interior point of the valid surface. The point is removed and classified as noise, outlier, or flyedge. The core innovation of this decision-making method lies in its "adaptive" nature: unlike traditional methods that use a fixed threshold (e.g., 0.7), the globally adaptive threshold dynamically changes according to the purity distribution of the point cloud data. When the overall quality of the point cloud is good and the purity score distribution is concentrated (σS is small), the threshold tends towards the basic threshold of 0.7, and conventional purification is performed. When the point cloud contains more noise or outliers and the purity score distribution is scattered (σS is large), the threshold automatically increases to screen inliers with stricter criteria, ensuring that the purification effect is not affected by fluctuations in data quality. This adaptive threshold mechanism eliminates the need for repeated manual parameter adjustments and can automatically match appropriate truncation criteria to original point clouds of different qualities, significantly improving the algorithm's adaptability and robustness to complex conditions.
[0073] The adaptive density resampling calculation is driven by two geometric features: curvature and normal vector deviation. It dynamically assigns a target density value to each retained point in the point cloud, guiding subsequent resampling to automatically increase density in areas with severe surface features and decrease density in flat areas, thus achieving optimized redistribution of point cloud data. The expression is: ,in, For the first Target density after resampling at each point; Based on the point cloud density; These are curvature weighting coefficients; These are the weighting coefficients for the deviation of the normal vector; Curvature characteristics; This is a characteristic of the normal vector deviation. It is reflected in the purity score. Retain the point based on the target density Perform random downsampling or interpolation upsampling within the neighborhood to approximate the local point density. Regions with drastic changes in curvature and normal are automatically densified, while flat regions are automatically sparsed. The numerical results of this calculation have a clear physical orientation: when a point is located in a high curvature region ( Larger) or areas of drastic change in normal direction ( When the target density is relatively large, Significantly higher than the baseline density, subsequent resampling in this region performs downsampling to retain more points or interpolation to refine surface details; when a point is located in a flat region ( and When the target density is close to or equal to the baseline density (and the data is relatively small), subsequent resampling in this region will perform appropriate sparsity to control the overall data size.
[0074] This step plays a crucial role in the final optimization of the MFW-Pure purification process: after noise removal and outlier filtering are completed in the previous steps, density resampling driven by curvature and normal ensures that key geometric features such as the edges and concave-convex transitions of irregular surfaces are not overly smoothed, and avoids data redundancy caused by global uniform density. This provides high-quality point clouds with complete details and appropriate data scale for subsequent trajectory planning.
[0075] After the original point cloud is purified by the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm, the purified point cloud has a point cloud noise removal rate of ≥98%, complete preservation of surface features, and uniform data density, providing a high-quality foundation for subsequent processing.
[0076] S3: The RANSAC algorithm is used to segment the purified point cloud, accurately extract the point cloud of the working area, and remove irrelevant structural data.
[0077] This step employs the RANSAC (Random Sampling Consensus) algorithm for model fitting and region segmentation of the purified point cloud. The number of iterations is set to 1000, and the distance threshold is set to 0.05 mm. The model fitting and region segmentation process includes randomly sampling point clouds from the purified point cloud and fitting irregular curved surface models, such as planar, cylindrical, or grooved models; determining whether points are internal or external, retaining the working area, such as curved surfaces, cavities, grooves, and contour edges; and removing irrelevant structures such as tooling and edge flash. Using this method, the point cloud segmentation accuracy can reach ≥98%, achieving precise extraction of the target working area.
[0078] S4: Perform plane fitting and point cloud leveling on the point cloud of the working area, calculate the normal vector and eliminate the positioning error caused by clamping tilt to obtain the leveled point cloud.
[0079] This step uses the least squares method to perform plane fitting and point cloud leveling on the point cloud of the working area. The process includes calculating the centroid of the point cloud and translating the point cloud to the origin; constructing the plane equation, minimizing the sum of squared distances from points to the plane, and solving for the plane parameters and normal vector; constructing a rotation matrix based on the deviation of the normal vector from the Z-axis, and rotating the point cloud until it is parallel to the XOY plane, thus completing the point cloud leveling. After leveling using this method, the normal vector is aligned with the Z-axis direction, the tilt error is ≤0.02mm, and subsequent trajectory planning is greatly simplified.
[0080] S5: Compare the point cloud curvature and normal vector of the flat point cloud, identify and separate concave and convex regions through region growing, obtain surface feature information, and obtain a label set.
[0081] This step accurately distinguishes the convexity and concavity attributes of a surface by calculating local geometric features of the point cloud. Specifically, it includes: normal vector estimation: fitting a tangent plane to a neighborhood with a radius of 0.5 mm to unify the normal vector direction; curvature calculation: solving for the eigenvalues of the neighborhood covariance matrix to obtain the principal curvature and Gaussian curvature; and region growing: using curvature extrema points as seeds, growing according to curvature thresholds to separate convex, concave, and grooved regions. This calculation process accurately identifies key structures such as surface undulations, sidewalls, and corners, providing a basis for trajectory attitude compensation.
[0082] S6: Match the flattened point cloud with the 3D template to calculate the rotation and translation matrix, obtain the transformation matrix, and correct the deviation between the actual pose of the workpiece and the template.
[0083] This step registers the leveled point cloud with a 3D template (a standard template point cloud pre-stored in the system) to eliminate the offset error between the actual position of the workpiece and the theoretical template. Specifically, this includes extracting Harris (corner detection) or SIFT (scale-invariant feature transform) key points from the leveled point cloud and the standard template point cloud; calculating FPFH (Fast Point Feature Histogram) feature descriptors and matching similar feature point pairs; and estimating the rotation matrix. Translation vector The process involves precise registration; by correcting the workpiece pose deviation using a transformation matrix, the actual point cloud is aligned to the template coordinates. After this step, the pose correction results in a positioning error ≤0.03mm, ensuring that the trajectory remains accurate and without misalignment.
[0084] S7: Based on the flattened point cloud, label set and transformation matrix, a smooth trajectory line is generated along the operation path through the Bayesian-curvature-normal joint compliance algorithm to obtain the trajectory path point sequence and realize adaptive optimization of trajectory density.
[0085] The inputs for this step are the flattened point cloud obtained in step S4, the label set obtained in step S5, and the transformation matrix obtained in step S6. Steps S2-S6 above complete the preprocessing, pose correction, and feature extraction of the point cloud, ensuring that each trajectory point has accurate curvature and normal vector information. Based on this, this step utilizes the aforementioned geometric information to generate a trajectory path point sequence with both high accuracy and high compliance through Bayesian estimation and compliance factor calculation. Addressing issues such as uneven trajectory smoothness on irregular curved surfaces, attitude jumps, unstable following, and noise in point cloud observation, this invention develops a method based on Bayesian maximum a posteriori estimation to optimize the uncertainty of curvature and normal vectors. Then, the estimated local curvature and normal vector deviations are weighted and fused to construct a trajectory compliance factor, uniformly driving the synchronous adaptive adaptation of trajectory point density, end-effector posture, and motion speed. This achieves Bayesian optimal estimation + super-compliant, constant normal, and constant distance following of the robotic arm on irregular curved surfaces, resulting in a Bayesian-curvature-normal joint compliance algorithm, specifically including the following:
[0086] Curvature estimated using Bayesian maximum a posteriori (MAP) The deviation angle between the normal vector and the reference direction To achieve optimal estimation and eliminate the influence of measurement noise, the following calculation formulas are used:
[0087]
[0088] in: For the true geometric state of the surface (curvature) The deviation angle between the normal vector and the reference direction ); This represents the observation of the current point cloud data under all possible true geometric states of the surface. The total probability; This is the prior probability (smooth surface prior); For observation probability (Gaussian noise model); This represents the posterior probability (outputting the optimal estimate).
[0089] The aforementioned Bayesian maximum a posteriori estimation formula serves to model the probabilistic relationship between point cloud observations (including measurement noise) and the surface geometry (curvature, normal deviation angle) into a Bayesian inference framework. The prior probability characterizes the physical constraint of surface smoothness (i.e., the true surface will not exhibit physically meaningless abrupt changes), while the observation probability describes the Gaussian distribution of sensor noise. By maximizing the posterior probability, the algorithm achieves an optimal balance between "fitting the observed data" and "maintaining geometric plausibility," thereby retrieving the most probable true curvature and normal deviation angle from the noisy point cloud. This estimation process effectively suppresses quantization errors introduced by 3D scanning, ambient light interference, and measurement uncertainties caused by local surface occlusion, making the extracted geometric features more robust and physically consistent, and significantly reducing the input noise sensitivity of subsequent trajectory compliance factor calculations. Compared to directly using the curvature and normal vector of the original point cloud (which is susceptible to noise interference and produces false extrema), the Bayesian optimized feature quantity can more realistically reflect the macroscopic trend and microscopic fluctuations of the irregular surface. It provides a highly reliable geometric basis for trajectory point density adaptation, speed control and attitude compensation, fundamentally ensuring the stability and accuracy of the trajectory generation process and avoiding trajectory oscillation or misjudgment caused by noise amplification.
[0090]
[0091] in, To obtain the optimized surface geometry (curvature) through Bayesian maximum a posteriori estimation (MAP) The deviation angle between the normal vector and the reference direction This process achieves optimal estimation results, ensuring that the surface geometry is closest to the true surface state in terms of minimizing the mean square error. It effectively avoids spurious extrema caused by noise, giving the optimized curvature and normal deviation angle stronger anti-interference capabilities and physical consistency. This guarantees that even with slight distortions or scanning defects in the original point cloud, it can still provide stable and reliable geometric features for trajectory planning, fundamentally improving the adaptability and accuracy lower bound of the entire following method to complex conditions. By maximizing the posterior probability, the most reliable set of surface geometry states is selected as the final estimate from all possible states; that is, "given the observed data, find the combination of surface curvature and normal deviation angle that maximizes the posterior probability."
[0092] How to calculate trajectory compliance factor: ,in: For trajectory compliance factor ( ); The local curvature after Bayesian optimization; η represents the deviation angle (in radians) between the Bayesian-optimized normal vector and the reference direction; 0.6 and 0.4 are weighting coefficients. This calculation formula generates a single compliance factor in the [0,1] interval by weighting and fusing the Bayesian-optimized curvature and the deviation angle of the normal vector, achieving a "one-index-overall" control effect: when η increases, it indicates severe local surface undulations, automatically triggering subsequent steps such as trajectory point densification, motion speed reduction, and end-effector attitude fine-tuning; conversely, it results in sparser and faster movement. This fusion strategy takes into account the dual effects of surface curvature and orientation changes, avoiding conflicts and redundancies from separate decisions. It provides a unified, continuous, and physically meaningful quantitative benchmark for the coordinated adaptive adjustment of trajectory density, speed, and attitude, fundamentally ensuring the compliance and fit of the robotic arm in the full-domain motion of irregular curved surfaces.
[0093] Adaptive trajectory point density calculation method: ,in: The baseline trajectory point density is used, and the density is automatically increased when the curvature is high and the normal changes rapidly. This calculation formula dynamically adjusts the trajectory point density through a compliance factor, achieving an adaptive mechanism of "geometric complexity-driven sampling density": when η is large (corresponding to regions with steep curvature increases or sharp normal changes), the trajectory points are automatically increased to provide sufficient interpolation nodes for subsequent attitude compensation and speed adjustment, ensuring that feature regions such as deep grooves and edges do not experience fitting distortion caused by undersampling; when η is small (corresponding to flat regions), the trajectory points are moderately sparse, reducing computational redundancy and frequent start-stop of the actuator. This density adaptive strategy, while ensuring accurate reproduction of the geometric details of irregular curved surfaces, effectively controls the trajectory data scale and planning computation, providing a trajectory foundation that combines accuracy and efficiency for the robotic arm to accurately follow in high-curvature regions and efficiently navigate in flat regions.
[0094] Adaptive motion speed calculation method: ,in: To achieve the maximum permissible speed, the speed automatically decreases as the compliance factor increases. This calculation formula uses the compliance factor to exponentially control the movement speed, establishing a speed adaptive mechanism where "the more complex the surface, the smoother the movement": when η is large (corresponding to areas of abrupt curvature changes or sharp normal transitions), the speed decreases rapidly and exponentially, allowing the robotic arm to pass through characteristic areas such as deep grooves and edges at low speeds, avoiding loss of posture control, vibration, or trajectory deviation due to excessive inertia; when η is small (corresponding to flat areas), the speed automatically rebounds to near its maximum value, ensuring operational efficiency. This exponential decay design gives the speed adjustment "sensitive response and rapid convergence" characteristics—even a moderate increase in the compliance factor can trigger a significant speed correction, ensuring sufficient time margin for posture adjustment in areas requiring the most precise control. This speed control mechanism, together with the aforementioned trajectory point density encryption (ρ increases with η), forms a “encryption-deceleration” collaborative closed loop, enabling the robotic arm to maintain accuracy in complex curved areas with denser step lengths and slower speeds, and to improve efficiency in flat areas with sparser step lengths and faster speeds, thus achieving the optimal balance between accuracy and efficiency.
[0095] Calculation method for real-time normal attitude compensation: ,in: The angle of the current point normal vector after Bayesian optimization; Using the reference attitude angle, the end effector's attitude is corrected in real time by calculating the normal attitude compensation to maintain a perpendicular position to the curved surface. This calculation formula provides the end effector with explicit and quantifiable attitude adjustment commands by calculating the deviation between the current point's normal vector angle (after Bayesian optimization) and the reference attitude angle. As the robotic arm moves along the curved surface, the actual orientation of the surface at each trajectory point (as determined by...) is... (characterization) and preset reference orientation ( The real-time deviation between the joint space and the surface (usually set to the direction perpendicular to the curved surface) is directly mapped to the angular displacement compensation amount in the joint space. This deviation-driven mechanism ensures that the end effector's attitude can respond instantaneously to every undulation in the surface normal—whether it's a rapid rise at the boss or an instantaneous tilt at the groove, the compensation amount... All of them can accurately reflect the direction and magnitude of the required attitude correction. Combined with the aforementioned Bayesian optimization to effectively suppress the noise of normal vector measurement, this compensation amount has a high signal-to-noise ratio and high response speed. From the hardware execution level, it ensures that the end effector always maintains a high degree of consistency with the surface normal during the full-domain motion of the irregular curved surface. It is a key execution link to achieve the core goal of "constant normal following".
[0096] The specific algorithm calculation and processing steps are as follows:
[0097] S7.1: Construct the covariance matrix using neighborhood points, and solve for the eigenvalues to obtain the original local curvature. ;
[0098] S7.2: Calculate the angle between the point cloud normal vector and the reference direction to obtain the deviation angle between the original normal vector and the reference direction. ;
[0099] S7.3: Bayesian Maximum A posteriori (MAP) probability estimation for curvature The deviation angle between the normal vector and the reference direction Noise optimization is performed to obtain the Bayesian optimized curvature. The deviation angle between the normal vector and the reference direction ;
[0100] S7.4: The curvature after Bayesian optimization The deviation angle between the normal vector and the reference direction Substitute into the core formula to calculate the trajectory compliance factor. ;
[0101] S7.5: According to Adaptive encryption or sparse trajectory point density;
[0102] S7.6: According to Dynamically adjust the speed of movement;
[0103] S7.7: Corrects the end-effector pose in real time based on the Bayesian optimized normal vector.
[0104] This step effectively suppresses the interference of point cloud observation noise on curvature and normal vector extraction through Bayesian maximum a posteriori estimation, obtaining a more reliable estimate that closely resembles the actual surface geometry. By constructing a "trajectory compliance factor," curvature and normal deviations are unified into a single driving index, achieving coordinated adaptive control of trajectory point density, end-effector attitude, and motion velocity. In regions with abrupt curvature changes and drastic normal changes, trajectory points are automatically densified and attitude transitions are smoothed; in flat regions, they are reasonably sparsed, ensuring a high degree of fit between the trajectory and the concave-convex features of the irregular surface, avoiding problems such as uneven trajectory density and attitude jumps in traditional methods. The initial trajectory output in this step provides a high-quality pose reference for subsequent real-time compensation, effectively reducing the risk of motion shock and significantly improving trajectory following accuracy and compliance, laying a crucial foundation for ultimately achieving stable constant-distance, constant-normal following. The trajectory path point sequence output in this step, with each path point containing three-dimensional position coordinates, target normal vector, desired velocity, and trajectory point density identifier, is used in subsequent steps.
[0105] S8: Perform real-time compensation of normal attitude and height for the trajectory path point sequence based on the undulation of the irregular curved surface to obtain the compensated trajectory, and maintain the constant distance and constant normal between the end effector and the curved surface.
[0106] The difference between this step and step S7 is that step S7 generates static trajectory path points, while this step performs dynamic compensation based on real-time feedback during the actual movement of the robotic arm to address the slight deviation between the actual curved surface and the offline point cloud. Real-time feedback data can come from a laser rangefinder or a six-dimensional force sensor installed on the end effector. To achieve constant distance and constant normal tracking of surface undulations, this step includes real-time reading of the trajectory point Z-coordinate and the surface normal vector; filtering and optimizing the normal vector based on Bayesian maximum a posteriori probability (MAP), dynamically adjusting the end effector posture to ensure it always matches the optimized surface normal vector; dynamically adjusting the Z-axis height based on Bayesian distance estimation to maintain a constant distance between the end effector and the workpiece surface (in this embodiment, this constant distance is preferably 2-5mm); automatically raising bosses and automatically lowering grooves to achieve adaptive trajectory compensation, resulting in a compensated trajectory. Through this compensation process, the compensated posture fluctuation is ≤±0.1°, and the distance fluctuation is ≤±0.05mm, fundamentally avoiding jumps, missed steps, and vibrations to address the slight deviation between the actual curved surface and the offline point cloud.
[0107] S9: The compensated trajectory is combined with the trajectory curvature and the motion constraints of the robotic arm to dynamically adjust the motion speed, resulting in a speed-planned trajectory that achieves smooth, stable, and impact-free motion.
[0108] This step is based on the Bayesian-optimized compliance factor. A closed-loop collaborative mechanism for speed and trajectory density is established. For regions with high curvature and drastic changes in normal direction, the motion speed is reduced (3-8 mm / s), and the trajectory points are automatically densified. For flat or gently curving regions, the motion speed is increased (10-20 mm / s), and the trajectory points are appropriately dispersed. Forward planning is performed based on acceleration and jerk constraints to ensure smooth, shock-free motion. Through this process, the trajectory following stability error is ≤0.02 mm, and there is no stuttering or jittering in areas of abrupt changes in curvature.
[0109] S10: The speed planning trajectory is mapped to the robotic arm coordinate system through matrix inverse transformation and hand-eye coordinate transformation to generate robotic arm execution instructions, which are used to drive the execution of adaptive following operations.
[0110] This step maps the Bayesian compliant trajectory to the robotic arm coordinate system and drives its execution. Specifically, it involves: performing an inverse matrix transformation on the trajectory points to restore them to the actual workpiece position; converting the coordinates to robot-executable coordinates using a hand-eye calibration matrix; outputting compliant trajectory, constant normal orientation, and adaptive speed commands to drive the robotic arm in adaptive following; and simultaneously recording the trajectory path, attitude error, and motion parameters, supporting quality traceability and offline optimization. Through this transformation and mapping process, the coordinate transformation repeatability accuracy can reach ≤0.02mm, meeting high-precision operation requirements. Finally, the robotic arm-executable commands are output and sent to the robotic arm servo driver via a real-time communication bus, driving the robotic arm to complete the adaptive following operation. The trajectory path, attitude error, and motion parameters are recorded simultaneously, supporting quality traceability and offline optimization.
[0111] This embodiment proposes an adaptive following trajectory generation method for a robotic arm on irregular curved surfaces based on 3D point clouds. Compared with existing technologies, it achieves significant innovation and improvement in multiple aspects such as point cloud preprocessing, pose correction, trajectory generation, attitude compensation, and speed control, and has the following advantages:
[0112] I. Point Cloud Preprocessing: The first MFW-Pure multi-level feature weighted adaptive purification can replace the traditional multi-level filtering process with a single execution. Existing technologies (which only employ conventional filtering methods) have limited effectiveness in suppressing point cloud noise, reducing data dimensionality, and preserving surface features. This invention proposes the MFW-Pure (Multi-level Feature Weighted Adaptive Point Cloud Purification) algorithm, which for the first time integrates four-dimensional geometric information—spatial distance features, normal vector deviation features, curvature features, and local density features—into a unified purification framework. Its core innovations are: Curvature Adaptive Dynamic Weight Allocation: The weight coefficients of the four features are automatically adjusted based on the local curvature of each point, achieving differentiated use of features. Global Purity Score Calculation: The purity score for each point is calculated globally, and a global adaptive threshold decision is implemented, replacing traditional fixed threshold filtering. Curvature-Normal Joint Density Resampling: The point cloud is automatically densified in areas with drastic changes in curvature and normal, and automatically thinned in flat areas, preserving surface details while controlling data scale. The results of this embodiment show a point cloud noise removal rate of ≥98%, complete preservation of surface features, and an improvement in point cloud processing accuracy of over 40%, providing a high-quality data source far exceeding existing technologies for subsequent Bayesian-curvature-normal joint trajectory planning.
[0113] II. Pose Correction and Localization: RANSAC segmentation + plane leveling + template matching quadruple localization, achieving a positioning accuracy of 0.02mm. Existing technologies lack a complete pose correction closed loop, resulting in insufficient positioning accuracy under complex clamping deviations. This invention constructs a quadruple localization correction closed loop: RANSAC point cloud segmentation: 1000 iterations, distance threshold of 0.05mm, accurately extracting point clouds of the work area, achieving a segmentation accuracy of ≥98%, effectively eliminating irrelevant structures such as tooling and edge protrusions. Least squares plane fitting and point cloud leveling: By calculating the centroid of the point cloud, constructing the plane equation, and minimizing the sum of squared distances from points to the plane, solving for plane parameters and normal vectors, the point cloud is rotated to be parallel to the XOY plane. After leveling, the Z-axis tilt error can be ≤0.02mm. 3D template matching pose correction: Extracting Harris / SIFT keypoints, calculating FPFH (Fast Point Feature Histogram) feature descriptors for feature matching, estimating the rotation matrix R and translation vector T to complete fine registration, achieving a positioning error of ≤0.03mm after pose correction. The overall positioning accuracy of this embodiment reaches 0.02mm, which is far superior to the correction effect of relying solely on a single template matching, and completely solves the problem of trajectory deviation caused by workpiece clamping tilt and placement offset.
[0114] III. Trajectory Generation: Bayesian-Curvature-Normal Joint Driving Mechanism, Pioneering a Unified Control Mechanism of "Compliance Factor". Existing technologies lack a compliant control mechanism that integrates curvature and normal, failing to achieve unified and coordinated adjustment of surface undulations, trajectory density, and motion speed. Relying solely on surface fitting to optimize trajectory smoothness results in low trajectory following accuracy and poor adaptability in complex undulating surface scenarios. This invention introduces Bayesian Maximum A posteriori estimation (MAP) into the field of irregular surface trajectory planning for the first time. Its core innovations include: Bayesian noise optimization: For point cloud observation noise, the curvature k and normal vector deviation angle Δn are optimally estimated to obtain k̂ and Δn, effectively suppressing the impact of measurement noise on trajectory planning. A pioneering "trajectory compliance factor" integrates two independent geometric indices, curvature and normal vector deviation, into a single driving index, achieving coordinated control of "one factor governing three parameters." Adaptive trajectory point density: Automatically densifies trajectory points when curvature is high and normal changes rapidly. Adaptive motion speed: Automatically reduces speed as the compliance factor increases. The results of this embodiment show that the trajectory following stability error is ≤0.02mm, there is no stuttering or jitter in the abrupt change area of the curved surface, the trajectory fitting consistency is improved by 40% compared with the existing solution, and the success rate of positioning and following in one attempt can reach more than 99%.
[0115] IV. Normal Attitude and Height: Real-time Closed-Loop Compensation for Constant Distance and Normal Orientation Following. Existing technologies do not achieve smooth trajectory control and real-time attitude compensation, easily leading to trajectory jitter, attitude abrupt changes, and robotic arm vibration in areas of abrupt curvature change. Existing technologies lack a real-time normal attitude compensation mechanism, failing to guarantee stable contact between the end effector and the curved surface with constant distance and normal orientation. This invention establishes a real-time closed-loop compensation mechanism for normal attitude and height: based on the Bayesian optimized normal vector, the attitude compensation amount is calculated in real time, dynamically adjusting the end effector attitude to ensure it always remains consistent with the optimized normal vector of the curved surface. Based on Bayesian distance estimation, the Z-axis height is dynamically adjusted to maintain a constant distance (2-5mm) between the end effector and the workpiece surface, automatically raising bosses and lowering grooves. In this embodiment, attitude fluctuation is ≤±0.1°, and distance fluctuation is ≤±0.05mm, fundamentally avoiding jumps, missed steps, and vibration problems, and completely solving the following deviation and attitude jumps caused by irregular surface undulations.
[0116] V. Speed-Density Coordinated Control: Curvature-Driven Adaptive Speed Adjustment for Smooth, Impact-Free Motion. Existing technologies cannot dynamically adjust trajectory density and motion speed based on surface undulations; some technologies do not dynamically adjust trajectory density and speed through a combined curvature and normal index, leading to missed tracking or oversampling in deep grooves and steeply changing surface regions. This invention establishes a closed-loop coordinated speed-trajectory density mechanism: in regions with high curvature and drastic normal changes, the motion speed is automatically reduced (3~8mm / s), and the trajectory points are densified; in flat, gently curving regions, the motion speed is automatically increased (10~20mm / s), and the trajectory points are reasonably sparsed; forward planning is performed based on acceleration and jerk constraints to ensure smooth, impact-free motion. Results of this embodiment: trajectory following error ≤0.02mm, motion without vibration or impact, significantly superior to existing technologies that cannot dynamically adjust fixed speeds.
[0117] VI. Full-Process Automation: No teaching required, no CAD model needed, forming a complete technical closed loop. Existing technologies cannot form a closed loop of "point cloud processing—feature recognition—trajectory generation—compliant control"; existing technologies lack multi-view point cloud fusion and full-domain continuous trajectory stitching capabilities, limiting their adaptability to large-size irregular parts. This invention constructs a complete automated link from point cloud acquisition to robotic arm drive: point cloud acquisition → MFW-Pure purification → RANSAC segmentation → plane fitting and leveling → concave and convex feature recognition → 3D template matching and pose correction → Bayesian-curvature-normal joint trajectory generation → real-time compensation of normal attitude and height → curvature-velocity collaborative control → hand-eye coordinate transformation → robotic arm execution. The advantages of this embodiment: no manual teaching, no offline programming, no CAD model required throughout the process; adaptable to various irregular curved surfaces, complex cavities, and sealing groove components; can be directly integrated into intelligent inspection equipment; highly versatile and with broad industrialization prospects.
[0118] VII. Real-time Performance and Robustness: The embedded platform can run in real time and has strong anti-interference capabilities. This invention optimizes the MFW-Pure and Bayesian-curvature-normal joint algorithm for embedded platforms: low computational load and fast response: it can run in real time on the embedded controller, meeting the production line cycle time requirements; strong compatibility: compatible with 3D line lasers, structured light, and binocular cameras, and adaptable to six-axis / four-axis / customized robotic arms; high robustness: based on the Bayesian probability model, it dynamically suppresses trajectory uncertainty, significantly improving trajectory following accuracy and anti-interference capabilities under complex working conditions.
[0119] The above embodiments and figures are not intended to limit the product form and style of the present invention. Any appropriate changes or modifications made by those skilled in the art should be considered as not departing from the patent scope of the present invention.
Claims
1. A method for generating adaptive following trajectories for a robotic arm with an irregular curved surface, characterized in that, The steps are as follows: S1: Collect 3D point cloud data of irregular curved surfaces to obtain the original point cloud; S2: Perform the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm on the original point cloud to obtain the purified point cloud; S3: Segment the purified point cloud and extract the point cloud of the working area; S4: Perform planar fitting and point cloud flattening on the point cloud of the work area to obtain the flattened point cloud; S5: Oppose the point cloud curvature and normal vector of the flat point cloud, identify and separate concave and convex regions through region growing, obtain surface feature information, and obtain a label set; S6: Match the flattened point cloud with the 3D template to calculate the rotation and translation matrix, and obtain the transformation matrix; S7: Based on the flattened point cloud, label set and transformation matrix, a smooth trajectory line is generated along the operation path using the Bayesian-curvature-normal joint compliant algorithm to obtain the trajectory path point sequence; S8: Perform real-time compensation of normal attitude and height on the trajectory path point sequence based on the undulation of the irregular curved surface to obtain the compensated trajectory; S9: The compensated trajectory is combined with the trajectory curvature and the robot arm motion constraints to dynamically adjust the motion speed, resulting in a speed-planned trajectory; S10: The speed planning trajectory is mapped to the robotic arm coordinate system through matrix inverse transformation and hand-eye coordinate transformation to generate robotic arm execution instructions, which are used to drive the execution of adaptive following operations.
2. The method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 1, characterized in that, The point cloud purification algorithm described in step S2 is the MFW-Pure multi-level feature weighted adaptive point cloud purification algorithm, which includes neighborhood construction, four-level feature calculation, curvature adaptive weight calculation, point cloud purity score, global adaptive threshold decision, and adaptive density resampling. The neighborhood construction involves constructing a neighborhood point set for any point in the original point cloud. The four-level feature calculation includes spatial distance feature, normal vector deviation feature, curvature feature, and local density feature, which respectively characterize the geometric attributes of each point in four dimensions.
3. The method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 2, characterized in that, The calculation expression for the spatial distance feature is as follows: ,in, For the first Spatial distance characteristics of points; For the first point cloud Three-dimensional coordinate points; for Within the neighborhood One point; for The set of neighborhood points; The number of points in the neighborhood; The Euclidean distance between two points; The expression for calculating the normal vector deviation characteristic is as follows: ,in, For the first Characteristics of the normal vector deviation at each point; The number of points in the neighborhood; for Within the neighborhood One point; for The normal vector; For neighborhood points The normal vector; It is the inverse cosine function; The expression for calculating the curvature feature is as follows: ,in: For the first Curvature characteristics at each point; Let be the eigenvalues of the neighborhood covariance matrix, and satisfy . ; The calculation expression for the local density feature is as follows: ,in, For the first Local density features of individual points; The neighborhood search radius; The number of points in the neighborhood; the expression for calculating the curvature adaptive weight is: , ,in, Spatial distance feature weights; The feature weights are the deviations from the normal vector. Weights for curvature features; Weights for local density features; Curvature characteristics; The expression for calculating the point cloud purity score is as follows: ,in, For the first Purity score for each point; ; This represents the normalized spatial distance feature. The characteristic of the deviation of the normalized normal vector; Normalized curvature characteristics; This represents the normalized local density features. The global adaptive threshold decision calculation expression is as follows: ,in, The purity threshold; Based on the threshold, For adjustment coefficients, Let be the standard deviation of the purity scores for all points, and the decision rule be... Keep this point. Remove this point; The adaptive density resampling calculation expression is as follows: ,in, For the first Target density after resampling at each point; Based on the point cloud density; These are curvature weighting coefficients; These are the weighting coefficients for the deviation of the normal vector; Curvature characteristics; This represents the characteristic of the normal vector deviation.
4. A method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 1, 2, or 3, characterized in that, In step S7, the Bayesian-curvature-normal joint compliance algorithm has the following steps: S7.1: Construct a covariance matrix using neighborhood points and solve for the eigenvalues to obtain the original local curvature; S7.2: Calculate the angle between the point cloud normal vector and the reference direction to obtain the deviation angle between the original normal vector and the reference direction; S7.3: Based on Bayesian maximum a posteriori probability estimation, noise optimization is performed on the deviation angle between curvature, normal vector and reference direction to obtain the Bayesian optimized curvature and the deviation angle between normal vector and reference direction; S7.4: Substitute the Bayesian-optimized curvature, normal vector, and deviation angle of the reference direction into the calculation of the trajectory compliance factor; S7.5: Based on adaptive encryption or sparse trajectory point density; S7.6: Adjust movement speed dynamically; S7.7: Corrects the end-effector pose in real time based on the Bayesian optimized normal vector.
5. The method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 4, characterized in that, The Bayesian maximum a posteriori estimation provides the optimal estimate of the curvature, the deviation angle between the normal vector and the reference direction, and is calculated using the following formula: , ,in: The true geometric state of the surface includes curvature, the deviation angle between the normal vector and the reference direction; This represents the observation of the current point cloud data under all possible true geometric states of the surface. The total probability; This is the prior probability; For observation probability; This is the posterior probability; To obtain the optimized surface geometry through Bayesian maximum a posteriori estimation; Trajectory compliance factor calculation method: ,in: For trajectory compliance factor ( ); The local curvature after Bayesian optimization; θ is the deviation angle between the Bayesian optimized normal vector and the reference direction; 0.6 and 0.4 are weighting coefficients; Adaptive trajectory point density calculation method: ,in: The base trajectory point density is used, and the trajectory points are automatically densified when the curvature is large and the normal changes rapidly. Adaptive motion speed calculation method: ,in: The speed is automatically reduced as the compliance factor increases, which is the maximum permissible speed. Calculation method for real-time normal attitude compensation: ,in: The angle of the current point normal vector after Bayesian optimization; Using the reference attitude angle, the end attitude is corrected in real time by calculating the normal attitude real-time compensation amount to maintain the vertical surface.
6. The method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 5, characterized in that, Step S8 specifically involves real-time reading of the Z-coordinate of the trajectory point and the surface normal vector; filtering and optimizing the normal vector based on the Bayesian maximum a posteriori probability; dynamically adjusting the end effector posture to ensure it always remains consistent with the optimized surface normal vector; and dynamically adjusting the Z-axis height based on Bayesian distance estimation to maintain a constant distance between the end effector and the workpiece surface. Step S9 specifically establishes a closed-loop collaborative mechanism between velocity and trajectory density based on the compliance factor optimized by Bayes; for regions with large curvature and drastic changes in normal, the motion speed is reduced; for flat regions with gentle curves, the trajectory points are automatically densified to increase the motion speed.
7. A method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 1, 2, or 3, characterized in that, The specific calculations in step S5 include normal vector estimation, curvature calculation, and region growing. The normal vector estimation fits the tangent plane to a neighborhood with a set radius to unify the direction of the normal vector. The curvature calculation involves solving the eigenvalues of the neighborhood covariance matrix to obtain the principal curvature and Gaussian curvature. The region growing uses the curvature extrema as seeds and grows according to the curvature threshold to separate concave and convex regions. And / or, step S6 specifically involves extracting Harris or SIFT key points from the flattened point cloud and the 3D template; calculating FPFH feature descriptors and matching similar feature point pairs; estimating the rotation matrix and translation vector to complete fine registration; And / or, step S4 uses the least squares method to perform plane fitting and point cloud leveling on the point cloud of the working area. Specifically, it calculates the centroid of the point cloud, translates the point cloud to the origin of the coordinate system, constructs the plane equation, minimizes the sum of squared distances from the points to the plane, solves for the plane parameters and normal vector, and constructs a rotation matrix based on the deviation between the normal vector and the Z-axis to rotate the point cloud to be parallel to the XOY plane, thus completing the point cloud leveling. And / or, step S3 uses the RANSAC algorithm to segment the purified point cloud; And / or, in step S1, a three-dimensional visual scanning system is used to collect three-dimensional point cloud data of irregular curved surfaces. The point cloud collection density is not less than 200 points / cm², the collection accuracy is ≤0.02mm, and the clamping posture, camera exposure, and ambient lighting parameters are recorded simultaneously. The data is transmitted in real time to achieve alignment between the original point cloud cache and the timestamp.
8. The method for generating adaptive following trajectories for a robotic arm with an irregular curved surface as described in claim 6, characterized in that, The specific calculations in step S5 include normal vector estimation, curvature calculation, and region growing. The normal vector estimation fits the tangent plane to a neighborhood with a set radius to unify the direction of the normal vector. The curvature calculation involves solving the eigenvalues of the neighborhood covariance matrix to obtain the principal curvature and Gaussian curvature. The region growing uses the curvature extrema as seeds and grows according to the curvature threshold to separate concave and convex regions. And / or, step S6 specifically involves extracting Harris or SIFT key points from the flattened point cloud and the 3D template; calculating FPFH feature descriptors and matching similar feature point pairs; estimating the rotation matrix and translation vector to complete fine registration; And / or, step S4 uses the least squares method to perform plane fitting and point cloud leveling on the point cloud of the working area. Specifically, it calculates the centroid of the point cloud, translates the point cloud to the origin of the coordinate system, constructs the plane equation, minimizes the sum of squared distances from the points to the plane, solves for the plane parameters and normal vector, and constructs a rotation matrix based on the deviation between the normal vector and the Z-axis to rotate the point cloud to be parallel to the XOY plane, thus completing the point cloud leveling. And / or, step S3 uses the RANSAC algorithm to segment the purified point cloud; And / or, in step S1, a three-dimensional visual scanning system is used to collect three-dimensional point cloud data of irregular curved surfaces. The point cloud collection density is not less than 200 points / cm², the collection accuracy is ≤0.02mm, and the clamping posture, camera exposure, and ambient lighting parameters are recorded simultaneously. The data is transmitted in real time to achieve alignment between the original point cloud cache and the timestamp.