A pose correction method based on workpiece surface features
Patent Information
- Application Number
- CN202611183970.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-06
AI Technical Summary
[0002]目前,针对具备周向重复表面特征的旋转类工件,主流位姿定位方式主要包括机械定位销找正、人工辅助找正、二维图像特征识别以及整幅三维点云直接模板配准四类方式,各类传统定位方案均存在明显技术短板,难以适配高精度、高稳定性的工件位姿定位场景
(1)依托点云局部曲率构建表面特征评分机制筛选候选特征点,摒弃工件全域杂乱点云参与配准运算,优先遴选曲率变化显著、稳定性更强的边缘及过渡区域点位作为特征基准,大幅削弱平面重复区域无效点云带来的匹配干扰,提升特征选取针对性;
Smart Images

Figure CN122694967B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of workpiece machining posture correction technology, and in particular to a posture correction method based on workpiece surface features. Background Technology
[0002] Currently, for rotating workpieces with circumferentially repeating surface features, the mainstream pose positioning methods mainly include four types: mechanical positioning pin alignment, manual assisted alignment, two-dimensional image feature recognition, and direct template registration of the entire three-dimensional point cloud. All of these traditional positioning solutions have obvious technical shortcomings and are difficult to adapt to high-precision and high-stability workpiece pose positioning scenarios.
[0003] Specifically, mechanical positioning and manual alignment methods are highly dependent on the precision of fixture processing and the experience of manual operators, with little room for error and cannot be adapted to the positioning of workpieces of various specifications. Their versatility and automation level are extremely low. Two-dimensional image recognition can only acquire planar information and is easily affected by working conditions such as workpiece surface reflection, on-site occlusion, and changes in workpiece height. The reliability of feature extraction is poor, and it cannot achieve accurate three-dimensional pose calculation. The traditional whole-frame three-dimensional point cloud direct registration scheme does not purify and screen the effective point cloud of the workpiece. It will not only mix in invalid noise points such as bearing mechanism, fixture, and scene background, causing data interference, but is also easily affected by the periodic characteristics of the workpiece's own circumferential repeating structure, frequently resulting in matching ambiguity and misregistration problems, making it difficult to guarantee the accuracy of pose calculation.
[0004] In summary, existing pose localization schemes for workpieces rotating with circumferentially repeating features have systemic defects: they generally lack targeted and effective feature screening and purification strategies, making it difficult to avoid matching ambiguities caused by circumferentially repeating structures; at the same time, they lack a sound registration quality evaluation and abnormal back-off closed-loop mechanism, making it impossible to effectively intercept abnormal situations such as misregistration and noise interference, resulting in insufficient stability and reliability of the final pose calculation results, making it difficult to meet the process requirements of high-precision automated correction and robotic operations. Summary of the Invention
[0005] This invention provides a pose correction method based on workpiece surface features to overcome the above-mentioned technical problems.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows: A pose correction method based on workpiece surface features, comprising: S1. Obtain the robot's photo pose matrix; collect the original 3D point cloud of the workpiece, perform preprocessing, output the original workpiece point cloud, design a collection state factor based on the original workpiece point cloud to evaluate whether the collected original 3D point cloud of the workpiece is valid. If valid, execute S2; otherwise, re-collect the workpiece point cloud. S2. Obtain a homogeneous transformation matrix based on the robot's photographic pose matrix and the pre-calibrated hand-eye calibration matrix; use the homogeneous transformation matrix to perform a homogeneous coordinate transformation on the original workpiece point cloud, thereby obtaining a workpiece point cloud with unified coordinate units in the robot's base coordinate system. S3. Determine the workpiece center point and calculate the radial distance of each point in the workpiece point cloud after the coordinate units are unified relative to the workpiece center point. Design an effective point state factor based on the radial distance to select effective workpiece surface points that meet the preset conditions from the workpiece point cloud after the coordinate units are unified. Design a preprocessing state factor to evaluate whether the number of effective workpiece surface points that meet the preset conditions meets the requirements. If it does, proceed to S4. Otherwise, return to S2 to re-acquire the workpiece point cloud after the coordinate units are unified before proceeding to this step. S4. Establish a KD-Tree for the effective surface point cloud of the workpiece, solve the local curvature of the workpiece, calculate the surface feature score of each point in the effective surface point cloud of the workpiece in combination with the local curvature, and filter to obtain a set of candidate feature points; design a feature extraction state factor to evaluate whether the set of candidate feature points meets the requirements. If it does, proceed to S5; otherwise, return to S3 to re-filter the effective surface points of the workpiece before proceeding to this step. S5. Based on the candidate feature point set, establish a voxel adjacency graph, obtain the effective connected component set based on the voxel adjacency graph, and then obtain the target feature point cloud; design a connected component purification state factor to evaluate whether the target feature point cloud meets the requirements. If it does, proceed to S6; otherwise, return to S4 to regenerate the candidate feature point set before proceeding to this step. S6. Load the pre-established standard template feature point cloud and solve the coarse centroid registration translation between the standard template feature point cloud and the target feature point cloud; generate a set of periodic candidate angles according to the number of circumferential repeating units of the workpiece; obtain an initial registration matrix based on the set of periodic candidate angles and the coarse centroid registration translation; perform ICP fine registration with the initial registration matrix and the template feature point cloud as input to obtain the ICP fine registration matrix; obtain the optimal periodic candidate result by combining the set of periodic candidate angles, and then obtain the complete registration matrix; design a registration state factor to evaluate whether the optimal periodic candidate result meets the requirements. If yes, proceed to S7; otherwise, return to S5 to reconstruct the target feature point cloud before performing this step. S7. Based on the complete registration matrix, register the target feature point cloud to obtain the registered target feature point cloud; decompose the complete registration matrix to extract the three-dimensional translational deviation and rotational deviation, and then obtain the pose deviation vector; based on the registered target feature point cloud and the standard template feature point cloud, filter to form a stable matching point pair set, and combine the stable matching point pair set to design the pose calculation state factor to evaluate whether the stable matching point pair set meets the requirements. If yes, proceed to S8; otherwise, return to S6 to obtain a new complete registration matrix before performing this step. S8. Obtain the output mode of the pose correction process, the output mode including the forward correction mode of the support mechanism or positioning fixture and the reverse compensation mode of the robot trajectory; calculate the pose correction amount in the forward correction mode of the support mechanism or positioning fixture based on the pose deviation vector; calculate the pose correction amount in the reverse compensation mode of the robot trajectory based on the pose deviation vector or the complete registration matrix; design a pre-output quality judgment factor to evaluate whether the pose correction amount in the corresponding mode meets the requirements. If so, perform pose correction operation according to the pose correction amount; otherwise, output a non-compliance reminder.
[0007] Furthermore, in S4, a KD-Tree is established for the effective surface point cloud of the workpiece, the local curvature of the workpiece is solved, and the surface feature score of each point in the effective surface point cloud of the workpiece is calculated based on the local curvature. A candidate feature point set is then obtained, including: S41. Establish a KD-Tree for the effective surface point cloud of the workpiece, and search and determine the local neighborhood point set for each point in the effective surface point cloud of the workpiece. The first point cloud of the effective surface of the workpiece The set of neighborhood points of a point is represented as: ; in, For the first The set of neighboring points of a point; and The first point cloud of the effective surface of the workpiece The and the first One point; Point cloud of the effective surface of the workpiece; It is the Euclidean norm; The neighborhood search radius; S42. Perform principal component analysis on the local neighborhood set of each point to calculate the local curvature. include: In calculating the effective surface point cloud of the workpiece, the first The neighborhood mean of each point is: ; in, For the first The neighborhood mean of each point; For the set of neighborhood points The number of points in the middle; For the set of neighborhood points The point in the middle; The effective surface point cloud of the workpiece is calculated based on the distribution of neighboring points relative to the neighborhood mean. The neighborhood covariance matrix of each point is: ; in, For the first The neighborhood covariance matrix of each point; For neighborhood covariance matrix Perform eigenvalue decomposition: ; in, for The Unit eigenvectors; for The corresponding eigenvalues; Indices for eigenvalues and eigenvectors; Calculate the first based on the eigenvalue decomposition results The local curvature at each point is: ; in, For the first Local curvature at each point; , and for The three eigenvalues; To prevent extremely small positive numbers with a denominator of zero; S43. Calculate the change in unit normal vector between each point in the effective surface point cloud of the workpiece and each point in the local neighborhood point set, including: Will The unit eigenvector corresponding to the smallest eigenvalue As the first in the effective surface point cloud of the workpiece Local unit normal vector at each point: ; in, For the first Local unit normal vector at each point; Based on the point cloud of the effective surface of the workpiece Calculate the local unit normal vector of the nth point. The change in the unit normal vector at each point is: ; in, For the first The change in the unit normal vector at each point; For neighborhood points The local unit normal vector; S44. Calculate the surface feature score of each point in the effective surface point cloud of the workpiece by combining the local curvature and the unit normal vector change. Points with scores exceeding a set threshold are selected as feature points, thereby obtaining a candidate feature point set, including: In calculating the effective surface point cloud of the workpiece, the first The surface feature score for each point is: ; in, For the first Surface feature score of each point; These are the weighting coefficients corresponding to the normalized local curvature; For the first Normalized local curvature at each point; The weighting coefficients corresponding to the normalized normal variation; For the first Normalized normal variation at each point; These are the weighting coefficients corresponding to the normalized radial position evaluation values; For the first Normalized radial position evaluation value of each point; The set of candidate feature points obtained after screening is as follows: ; in, For the set of candidate feature points; Point cloud of the effective surface of the workpiece The first in One point; The threshold for surface feature scoring.
[0008] Furthermore, in S4, the feature extraction state factors are designed, including: Calculate the first candidate feature point in the set based on the workpiece center coordinates. The angular positions of the points are: ; in, For the first The angular position of each point relative to the center of the workpiece; It is the arctangent function in the four quadrants; and These are the candidate feature point sets. Points in exist direction and Coordinates of direction; and The center point of the workpiece is at direction and Coordinates of direction; Based on the angular position The circumferential partition number of the candidate feature points is calculated as follows: ; in, For the first The circumferential partition number corresponding to each candidate feature point; This is a corner-to-partition mapping function; The first point cloud of the effective surface of the workpiece One point; For the set of candidate feature points; A circumferential partition set is formed based on the circumferential partition numbers corresponding to the candidate feature points, and is represented as follows: ; in, The set of circumferential partitions covered by candidate feature points; Number of candidate feature points and the number of circumferential partitions covered by candidate feature points They are respectively: ; The feature extraction state factor of the design is expressed as: ; in, State factors are extracted for feature extraction; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is The threshold for the minimum number of candidate feature points; This is the minimum threshold for the number of circumferentially covered partitions.
[0009] Furthermore, in S5, a voxel adjacency graph is established based on the candidate feature point set, and a set of effective connected components is obtained based on the voxel adjacency graph, thereby obtaining the target feature point cloud, including: S51. Map each point in the candidate feature point set to a voxel grid according to the set voxel size; S52. Construct a voxel adjacency graph using voxel meshes as nodes, represented as: ; in, This is a voxel adjacency graph; A set of voxel nodes; It is the set of adjacent edges of voxels; and The first The and the first Individual index, ; The voxel indices corresponding to the candidate feature points are: ; in, For the first Voxel indices corresponding to each candidate feature point; This is the floor function; The first in the candidate feature point set One point; Voxel grid size; voxels With voxels The adjacency indicator is represented as: ; in, voxels With voxels Adjacency indicator; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The threshold for the adjacency distance of a voxel; S53. Perform a breadth-first search or depth-first search on the voxel adjacency graph to obtain the set of connected components, represented as: ; in, For the first A set of connected components; For connected component indexes; The number of connected components; For connected component search operators; S54. Calculate the spatial span based on the set of connected components, and then obtain the maximum effective connected component. Obtain the target feature point cloud based on the maximum effective connected component, including: Calculate the first The spatial span of each connected component is: ; in, For the first Spatial span of a connected component; and The first The maximum and minimum corner points of the bounding box of each connected component; Based on the set of connected components and the spatial span, the effective set of connected components is obtained as follows: ; in, A set of valid connected components; For the first The number of points in each connected component; This is the threshold for the minimum number of points in a connected component. The minimum spatial span threshold for connected components; From the set of valid connected components The connected component with the largest number of vertices is selected as the maximally effective connected component, denoted as: ; in, The maximum effective connected component; A set of valid connected components; The voxel index belongs to the largest effective connected component. The candidate feature points form the target feature point cloud, represented as: ; in, The target feature point cloud.
[0010] Furthermore, based on the set of periodic candidate angles and the coarse centroid registration translation, an initial registration matrix is obtained. Using the initial registration matrix and the template feature point cloud as input, ICP fine registration is performed to obtain the ICP fine registration matrix, which includes: A candidate rotation matrix is constructed based on the candidate angles, and is expressed as follows: ; in, For the first The center rotation matrix corresponding to each candidate angle; Center point of the workpiece Let be the homogeneous translation matrix of the translation vector; To bypass Axis rotation rotation matrix; It is a zero translation vector; This is the zero row vector at the bottom of the homogeneous transformation matrix; For Let be the homogeneous translation matrix of the translation vector; The first in the set of candidate periodic angles The candidate angles for each cycle are represented as follows: ; in, For the first Initial values for candidate angles; Index for candidate angles; This represents the number of circumferentially repeating surface units; Based on the coarse registration translation of the centroid and the candidate rotation matrix, the first... The initial registration matrix corresponding to each candidate angle is used to complete the coarse registration of the centroid and rotation of the candidate angles of the target feature point cloud, resulting in the initial registration matrix, expressed as: ; in, For the first The initial registration matrix corresponding to each candidate angle; For Let be the homogeneous translation matrix of the translation vector; For the first The center rotation matrix corresponding to each candidate angle; ICP fine registration is performed using the initial registration matrix and the feature point cloud of the standard template as input, resulting in the ICP fine registration matrix, which is represented as follows: ; in, For the first ICP registration matrix corresponding to each candidate angle; For iterative nearest-point registration operators; The target feature point cloud.
[0011] Furthermore, by combining the aforementioned set of periodic candidate angles, the optimal periodic candidate result is obtained, thereby yielding the complete registration matrix, including: Calculate the comprehensive registration error for each candidate angle in the set of candidate periodic angles, and select the candidate angle with the smallest comprehensive registration error as the optimal candidate period result. Wherein, the... The formula for calculating the overall registration error corresponding to each candidate initial value is: ; in, For the first The overall registration error corresponding to each candidate angle; This refers to the ICP error weighting coefficient; For the first ICP error corresponding to each candidate angle; for Error threshold; To ensure stable matching of residual weighting coefficients; For the first Stable matching residuals corresponding to each candidate angle; To stabilize the residual threshold; Weighting coefficients for the number of stable matching point pairs; For the first The number of stable matching point pairs corresponding to each candidate angle; The candidate angle with the smallest overall registration error, i.e., the candidate result for the optimal period, is: ; in, Index of the optimal candidate angle; Based on the optimal periodicity candidate results, the complete registration matrix is obtained, expressed as: ; in, The complete registration matrix from the target feature point cloud to the template feature point cloud; This is the ICP fine registration matrix corresponding to the optimal periodic candidate result; This is the initial registration matrix corresponding to the optimal periodic candidate result.
[0012] Furthermore, in S7, based on the complete registration matrix, the target feature point cloud is registered, and the registered target feature point cloud is represented as follows: ; in, For the registered target feature point cloud For target feature point cloud; The complete registration matrix is decomposed to extract the three-dimensional translational and rotational deviations, thereby obtaining the pose deviation vector, including: Decomposing the complete registration matrix yields: ; in, For complete registration rotation matrix For complete registration translation vector; The translation deviation is defined based on the complete registration translation vector and is expressed as follows: ; in, Translational deviation vector , , They are respectively , , Translational deviation in direction; according to - - Euler angles are used to extract rotational bias, expressed as follows: ; in, , , They are respectively around , , Rotational deviation in direction, around The rotational deviation of the shaft is used for angular correction of the bearing mechanism. The arctangent function in the four quadrants and Rotation matrix Middle characterization X Elements of axial space components It is the arcsine function; Rotation matrix Middle characterization Y Elements of axial space components and Rotation matrix Middle characterization Z Elements of the axial space components; The pose deviation vector is obtained based on the three-dimensional translational and rotational deviations, and is expressed as follows: ; in, This is the pose deviation vector.
[0013] Furthermore, based on the registered target feature point cloud and standard template feature point cloud, a stable matching point pair set is formed. Combining this stable matching point pair set, a pose calculation state factor is designed, including: Bidirectional nearest neighbor retrieval is performed using both the standard template feature point cloud and the registered target feature point cloud as retrieval bases: Each point in the standard template feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the registered target feature point cloud; simultaneously, each point in the registered target feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the standard template feature point cloud. Only point pairs that are mutually matched in both sets of retrieval results and whose Euclidean distance is less than a preset stable matching distance threshold are retained, and these are summarized to form a stable matching point pair set, represented as: ; in, For a stable set of matching point pairs For feature points of standard template Registered target feature points The matching point pairs formed; In order to be in The nearest neighbor operator in the search. The first feature point cloud of the standard template Points The first feature point cloud of the registered target Points In order to be in The nearest neighbor operator in the search. for and Euclidean distance between To stabilize the matching distance threshold; The number of stable matching pairs in the set of stable matching pairs is: ; in, To ensure a stable number of matching point pairs; The stable matching residual is calculated based on the number of stable matching point pairs: ; in, To stabilize the matching residual For stable matching point pairs For stable matching point pairs The Euclidean distance between two points in the middle; Based on the number of stable matching point pairs and the stable matching residual, the pose design state factor is calculated as follows: ; in, Calculate the state factor for the pose; For characteristic functions, when all conditions within the three parentheses are true. Values Otherwise, the value is The threshold for the minimum number of stable matching pairs; To stabilize the residual threshold; The comprehensive registration error corresponding to the optimal candidate result; This is the threshold for comprehensive registration error.
[0014] Furthermore, calculating the pose correction amount of the bearing mechanism or positioning fixture in the positive correction mode based on the pose deviation vector includes: The unlimited positive correction amount of the bearing mechanism or positioning fixture is calculated based on the pose deviation vector and expressed as follows: ; in, This represents the positive correction amount for the workpiece posture without amplitude limitation. The correction ratio matrix for the supporting mechanism or positioning fixture; This is the pose deviation vector; By limiting the unlimited positive correction amount within the allowable range, the workpiece posture positive correction amount after limiting is obtained, and it is used as the pose correction amount in the positive correction mode of the bearing mechanism or positioning fixture, expressed as:
[0015] in, This is the positive correction amount for the workpiece posture after amplitude limiting; For amplitude limiting operators; and These are the lower and upper limits of the positive correction amount, respectively; Based on the complete registration matrix, the pose correction amount in the robot trajectory matrix reverse compensation mode is determined as follows: ; in, This is the robot trajectory reverse compensation matrix, which is the pose correction amount in the robot trajectory matrix reverse compensation mode. For the complete registration matrix; Calculating the pose correction amount in the robot trajectory reverse compensation mode based on the pose deviation vector includes: The unlimited reverse compensation amount for the robot's subsequent trajectory is calculated based on the pose deviation vector and expressed as follows: ; in, This is the reverse compensation amount for the unlimited robot trajectory; This is the robot trajectory compensation ratio matrix; By limiting the unlimited reverse compensation amount of the robot's subsequent trajectory within an allowable range, the limited reverse compensation amount of the robot's subsequent trajectory is obtained, and this amount is used as the pose correction amount in the robot trajectory reverse compensation mode, expressed as: ; in, This is the amplitude-limiting reverse compensation amount for the robot's subsequent trajectory; and These represent the lower and upper limits of the reverse compensation amount for the robot's subsequent trajectory, respectively.
[0016] Furthermore, in S8, the pre-output quality determination factor is expressed as: ; in, To output the pre-quality determination factor; Calculate the state factor for the pose; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The range of corrections that can be performed by the supporting mechanism or positioning fixture; The range of compensable parameters for the robot's subsequent trajectory; This defines the executable range for reverse compensation of the robot trajectory matrix.
[0017] The present invention has the following beneficial effects: (1) Based on the local curvature of the point cloud, a surface feature scoring mechanism is constructed to screen candidate feature points. The messy point cloud of the entire workpiece is abandoned in the registration operation. The edge and transition area points with significant curvature changes and stronger stability are selected as feature references. This greatly reduces the matching interference caused by invalid point clouds in the plane repetition area and improves the targeting of feature selection. (2) Construct a voxel adjacency graph and extract effective connected components to complete the purification of feature point cloud, remove discrete noise and isolated noise, gather continuous effective feature regions, and further purify and register the data source; (3) To address the pain point that the circumferential repetitive structure of rotating workpieces is prone to causing periodic mismatch of ICP, multiple sets of candidate rotation angle initial values are set according to the number of circumferential repetitive units. All initial postures are traversed to complete coarse registration and superimpose ICP fine registration. The optimal complete registration matrix is determined by comprehensive registration error selection, which effectively avoids the ambiguity of angle matching caused by repetitive features and significantly improves the three-dimensional pose registration accuracy. (4) Differentiate between the two output modes of tooling forward posture correction and robot trajectory reverse compensation to calculate the pose correction amount, which can be adapted to the control requirements of different equipment.
[0018] In summary, this invention constructs an automated pose positioning and correction system that integrates feature selection, anti-periodic registration, multi-level quality self-inspection, and closed-loop pose compensation. This system significantly improves the stability, accuracy, and process safety of solving the three-dimensional pose of workpieces with circumferentially repeating surface features, and can be widely adapted to automated tooling positioning and robot processing and assembly scenarios. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of a pose correction method based on workpiece surface features according to the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] This embodiment provides a pose correction method based on workpiece surface features, targeting rotating workpieces with circumferentially repeating surface features. It can be used in scenarios such as robot inspection, grinding, assembly, loading / unloading, or posture compensation of load-bearing mechanisms. Figure 1 As shown, it includes: S1. Control the robot to move to the preset shooting position, read the robot's current shooting pose, and convert it into a robot shooting pose matrix; collect the original three-dimensional point cloud of the workpiece through the three-dimensional camera, perform preprocessing, output the original workpiece point cloud in the camera coordinate system, design a collection state factor based on the original workpiece point cloud to evaluate whether the collected original three-dimensional point cloud of the workpiece is valid. If it is valid, execute S2; otherwise, re-collect the workpiece point cloud. Specifically, the photographing pose includes the translation of the robot end effector in the robot base coordinate system and the pose quaternion.
[0023] Specifically, after the robot reaches the preset shooting position, it searches for and connects to the 3D camera. If the camera is not connected, does not return a valid depth frame, or the number of acquisition points is insufficient, the acquisition is retried according to a preset number of times. After exceeding the preset number of times, an acquisition NG is output to avoid invalid acquisition data directly entering the registration process. In this embodiment, the 3D camera is able to cover the workpiece's central reference area, part of the circumferential surface edge area, and the transition area between adjacent surface units.
[0024] Specifically, preprocessing the original 3D point cloud includes: removing invalid acquisition points that have no coordinate values, no depth values, or are not finite in value.
[0025] In a specific embodiment, the original workpiece point cloud is represented as follows: ; in, This is the original workpiece point cloud composed of each valid acquisition point in the camera coordinate system; for The first in One point; Point index; for The total number of points in; The robot's pose matrix for taking photos is represented as follows: ; in, This is the homogeneous transformation matrix from the robot's end-effector coordinate system to the robot's base coordinate system; for The rotation matrix in; for Translation vector in; This is the zero row vector at the bottom of the homogeneous transformation matrix; represents the homogeneous coordinate constant in the homogeneous transformation matrix; The designed acquisition state factor is: ; in, To collect state factors; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is 0; The total number of points in the original workpiece point cloud; The minimum effective number of points threshold for the original workpiece point cloud; For a valid identifier of a depth frame, when When this occurs, it indicates that the depth frame is valid; Specifically, based on the original workpiece point cloud, a data acquisition state factor is obtained, and then the validity of the acquired original 3D point cloud of the workpiece is evaluated, including: if... If, then execute S2, if If the result is not found, it will not proceed to the subsequent registration calculation.
[0026] S2. Obtain a homogeneous transformation matrix based on the robot's photographic pose matrix and the pre-calibrated hand-eye calibration matrix; use the homogeneous transformation matrix to perform a homogeneous coordinate transformation on the original workpiece point cloud, thereby obtaining a workpiece point cloud with unified coordinate units in the robot's base coordinate system. Specifically, the hand-eye calibration matrix represents the fixed spatial relationship between the three-dimensional camera coordinate system and the robot end effector coordinate system.
[0027] Specifically, in this embodiment, the acquired on-site workpiece point cloud, template feature point cloud, workpiece center, and tooling center are unified to the same length unit to avoid inconsistencies in dimensions during subsequent filtering, registration, and compensation calculations.
[0028] In a specific embodiment, the homogeneous transformation matrix is represented as: ; in, This is the homogeneous transformation matrix from the camera coordinate system to the robot base coordinate system; Photo pose matrix for the robot; The hand-eye calibration matrix from the camera coordinate system to the robot's end effector coordinate system; Using the homogeneous transformation matrix to perform a homogeneous coordinate transformation on the original workpiece point cloud, the first... The homogeneous transformation result of points is expressed as: ; in, For the first The homogeneous points in the robot's base coordinate system after homogeneous transformation; The first point cloud of the original workpiece in the camera coordinate system One point; Based on the The homogeneous transformation of each point yields the robot's base coordinate points without unified coordinate units. : ; in, For the robot's base coordinate system, where coordinate units have not been standardized, the first... One point; , and They are respectively The first three coordinate components; The symbol for vector transpose; robot base coordinate points To ensure that subsequent template registration and pose correction calculations have a unified dimension, the robot's base coordinate points with unified coordinate units are obtained: ; in, The first robot base coordinate system after coordinate unit unification One point; The scaling factor is the unit scaling factor. This leads to the workpiece point cloud with unified coordinate units: ; in, The workpiece point cloud with unified coordinate units in the robot's base coordinate system; for The first in One point; for Total points.
[0029] S3. Determine the workpiece center point and calculate the radial distance of each point in the workpiece point cloud after the coordinate units are unified relative to the workpiece center point. Design an effective point state factor based on the radial distance to select effective workpiece surface points that meet the preset conditions from the workpiece point cloud after the coordinate units are unified. Design a preprocessing state factor to evaluate whether the number of effective workpiece surface points that meet the preset conditions meets the requirements. If it does, proceed to S4. Otherwise, return to S2 to re-acquire the workpiece point cloud after the coordinate units are unified before proceeding to this step. Specifically, in this embodiment, the workpiece center point can be obtained from the calibrated tooling center or from the point cloud fitting of the center reference region; when both are available, the workpiece center point can also be obtained using a weighted fusion method, using the tooling calibration center, point cloud fitting center, or fusion center as optional center sources, avoiding unclear center sources when the workpiece is initially misaligned, and providing a clear geometric reference for subsequent radial filtering and circumferential partitioning. This includes: The workpiece center point obtained from the calibrated tooling center is represented as: ; in, The workpiece center point in the robot's base coordinate system; for exist Coordinates of direction; for exist Coordinates of direction; for exist Coordinates of direction; The workpiece center point obtained by fitting the point cloud of the central reference region is represented as follows: ; in, The center point of the workpiece is obtained by fitting the point cloud. Center-fitting operator; Point cloud of the central reference region; The workpiece center point obtained by weighted fusion is represented as follows: ; in, The center point of the workpiece for weighted fusion; Centralized integration weights; Calculate the first unit in the workpiece point cloud after unit unification. The radial distance of each point relative to the center point of the workpiece is expressed as: ; in, For the first The radial distance of each point relative to the center of the workpiece; for exist Coordinates of direction; for exist Coordinates of direction; The center point of the workpiece is at Coordinates of direction; The center point of the workpiece is at Coordinates of direction; The first design based on the radial distance The effective point state factor of the nth point is used to determine the nth point. Whether a point belongs to the effective surface points of the workpiece is indicated by: ; ; in, For the first Effective point state factors for each point; For characteristic functions, when all conditions within the three parentheses are true. Values Otherwise, the value is and These are the effective lower and upper limits of the height, set according to the workpiece installation height; for exist Coordinates of direction; and These are the lower and upper limits of the effective radial distance, respectively; A collection of obstacle areas formed by fixtures, load-bearing mechanisms, or non-workpiece areas; Point cloud of the effective surface of the workpiece; Specifically, this embodiment will use the effective point state factor. equal The points are retained as the effective surface point cloud of the workpiece. .
[0030] The number of points in the effective surface point cloud of the workpiece is: ; in, The number of points in the point cloud of the effective surface of the workpiece; The preprocessing state factor is designed as follows: ; in, For preprocessing state factors; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The minimum effective surface point count threshold; effective surface point cloud point count. Reaching the threshold At that time, that is If so, then S4 will be executed.
[0031] S4. Establish a KD-Tree for the effective surface point cloud of the workpiece, solve the local curvature of the workpiece, calculate the surface feature score of each point in the effective surface point cloud of the workpiece in combination with the local curvature, and filter to obtain a set of candidate feature points; design a feature extraction state factor to evaluate whether the set of candidate feature points meets the requirements. If it does, proceed to S5; otherwise, return to S3 to re-filter the effective surface points of the workpiece before proceeding to this step. In a specific embodiment, in S4, a KD-Tree is established for the effective surface point cloud of the workpiece, the local curvature of the workpiece is solved, and the surface feature score of each point in the effective surface point cloud of the workpiece is calculated based on the local curvature. A candidate feature point set is then obtained by filtering, including: S41. Establish a KD-Tree for the effective surface point cloud of the workpiece, and search and determine the local neighborhood point set for each point in the effective surface point cloud of the workpiece. The first point cloud of the effective surface of the workpiece The set of neighborhood points of a point is represented as: ; in, For the first The set of neighboring points of a point; and The first point cloud of the effective surface of the workpiece indivual and the One point; Point cloud of the effective surface of the workpiece; It is the Euclidean norm; The neighborhood search radius; S42. Perform principal component analysis on the local neighborhood set of each point to calculate the local curvature, including: In calculating the effective surface point cloud of the workpiece, the first The neighborhood mean of each point is: ; in, For the first The neighborhood mean of each point; For the set of neighborhood points The number of points in the middle; For the set of neighborhood points The point in the middle; The effective surface point cloud of the workpiece is calculated based on the distribution of neighboring points relative to the neighborhood mean. The neighborhood covariance matrix of each point is: ; in, For the first The neighborhood covariance matrix of each point; For neighborhood covariance matrix Perform eigenvalue decomposition: ; in, for The Unit eigenvectors; for The corresponding eigenvalues; Indices for eigenvalues and eigenvectors; Calculate the first based on the eigenvalue decomposition results The local curvature at each point is: ; in, For the first Local curvature at each point; , and for The three eigenvalues; To prevent extremely small positive numbers with a denominator of zero; Specifically, the local curvature is used to characterize the degree of geometric change of the workpiece circumferential surface edge, the transition region between adjacent surface units, and the central reference transition region.
[0032] S43. Calculate the change in unit normal vector between each point in the effective surface point cloud of the workpiece and each point in the local neighborhood point set, thereby identifying regions with significant abrupt changes in surface orientation, including: Will The unit eigenvector corresponding to the smallest eigenvalue As the first in the effective surface point cloud of the workpiece Local unit normal vector at each point: ; in, For the first Local unit normal vector at each point; Based on the point cloud of the effective surface of the workpiece Calculate the local unit normal vector of the nth point. The change in the unit normal vector at each point is: ; in, For the first The change in the unit normal vector at each point; For neighborhood points The local unit normal vector; S44. Calculate the surface feature score of each point in the effective surface point cloud of the workpiece by combining the local curvature and the unit normal vector change, and take the points with scores exceeding the set threshold as feature points, thereby filtering to obtain a set of candidate feature points. Specifically, the first point in the effective surface point cloud of the workpiece The formula for calculating the surface feature score of a point is: ; in, For the first Surface feature score of each point; These are the weighting coefficients corresponding to the normalized local curvature; For the first Normalized local curvature at each point; The weighting coefficients corresponding to the normalized normal variation; For the first Normalized normal variation at each point; These are the weighting coefficients corresponding to the normalized radial position evaluation values; For the first Normalized radial position evaluation value of each point; The set of candidate feature points obtained after screening is as follows: ; in, For the set of candidate feature points; Point cloud of the effective surface of the workpiece The first in One point; The surface feature scoring threshold; No. Normalized local curvature at each point The calculation formula is: ; in, For the first Normalized local curvature at each point; and These represent the minimum and maximum local curvature values in the point cloud of the effective surface of the workpiece. To prevent extremely small positive numbers with a denominator of zero; No. Normalized normal change at each point The calculation formula is: ; in, For the first Normalized normal variation at each point; and These represent the minimum and maximum values of the change in unit normal vector within the point cloud of the effective surface of the workpiece. To prevent extremely small positive numbers with a denominator of zero; Normalized radial position evaluation value The calculation formula is: ; in, For the first Normalized radial position evaluation value of each point; For the first The radial distance of each point relative to the center of the workpiece; To prevent extremely small positive numbers with a denominator of zero.
[0033] In a specific embodiment, S4 involves designing a feature extraction state factor to evaluate whether the candidate feature point set meets the requirements, including: Calculate the first candidate feature point in the set based on the workpiece center coordinates. The angular positions of the points are: ; in, For the first The angular position of each point relative to the center of the workpiece; It is the arctangent function in the four quadrants; and These are the candidate feature point sets. Points in exist direction and Coordinates of direction; and The center point of the workpiece is at direction and Coordinates of direction; Based on the angular position The circumferential partition number of the candidate feature points is calculated as follows: ; in, For the first The circumferential partition number corresponding to each candidate feature point; This is a corner-to-partition mapping function; The first point cloud of the effective surface of the workpiece One point; For the set of candidate feature points; A circumferential partition set is formed based on the circumferential partition numbers corresponding to the candidate feature points, and is represented as follows: ; in, The set of circumferential partitions covered by candidate feature points; Number of candidate feature points and the number of circumferential partitions covered by candidate feature points They are respectively: ; The feature extraction state factor of the design is expressed as: ; in, State factors are extracted for feature extraction; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is The threshold for the minimum number of candidate feature points; This is the minimum threshold for the number of circumferentially covered partitions; Based on the feature extraction state factor evaluation, it is determined whether the number of feature points in the candidate feature point set and the number of covered circumferential partitions both meet the requirements. = When performing S5, feature points are concentrated in local areas, which increases the risk of periodic mismatches.
[0034] Specifically, in this embodiment, the angular position is not directly used as a feature scoring item, but is used for circumferential coverage constraints, thereby maintaining the stability of feature scoring when the initial angle of the workpiece is unknown, while reducing the risk of mismatch caused by circumferential repetitive structures.
[0035] S5. Based on the candidate feature point set, establish a voxel adjacency graph, obtain the effective connected component set based on the voxel adjacency graph, and then obtain the target feature point cloud; design a connected component purification state factor to evaluate whether the target feature point cloud meets the requirements. If it does, proceed to S6; otherwise, return to S4 to regenerate the candidate feature point set before proceeding to this step. In a specific embodiment, S5 involves establishing a voxel adjacency graph based on the candidate feature point set, obtaining a set of effective connected components based on the voxel adjacency graph, and then obtaining the target feature point cloud, including: S51. Map each point in the candidate feature point set to a voxel grid according to the set voxel size; S52. Construct a voxel adjacency graph using voxel meshes as nodes, represented as: ; in, This is a voxel adjacency graph; A set of voxel nodes; It is the set of adjacent edges of voxels; and The first The and the first Individual index, ; The voxel indices corresponding to the candidate feature points are: ; in, For the first Voxel indices corresponding to each candidate feature point; This is the floor function; The first in the candidate feature point set One point; Voxel grid size; voxels With voxels The adjacency indicator is represented as: ; in, voxels With voxels Adjacency indicator; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The threshold for the adjacency distance of a voxel; Specifically, when the spatial distance between two voxels does not exceed the voxel adjacency threshold, the two are determined to be adjacent voxels.
[0036] S53. Perform a breadth-first search or depth-first search on the voxel adjacency graph to obtain the set of connected components, represented as: ; in, For the first A set of connected components; For connected component indexes; The number of connected components; For connected component search operators; S54. Calculate the spatial span based on the set of connected components, and then obtain the maximum effective connected component. Obtain the target feature point cloud based on the maximum effective connected component, including: Calculate the first The spatial span of each connected component is: ; in, For the first Spatial span of a connected component; and The first The maximum and minimum corner points of the bounding box of each connected component; Based on the set of connected components and the spatial span, the effective set of connected components is obtained as follows: ; in, A set of valid connected components; For the first The number of points in each connected component; This is the threshold for the minimum number of points in a connected component. The minimum spatial span threshold for connected components; From the set of valid connected components The connected component with the largest number of vertices is selected as the maximally effective connected component, denoted as: ; in, The maximum effective connected component; A set of valid connected components; The voxel index belongs to the largest effective connected component. The candidate feature points form the target feature point cloud, represented as: ; in, The target feature point cloud.
[0037] In a specific embodiment, in S5, the designed connected component purification state factor is expressed as: ; in, Purify the state factors for connected components; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The number of points in the target feature point cloud. ; The minimum number of points in the target feature point cloud is the threshold value. Specifically, the number of points in the target feature point cloud is evaluated based on the state factor of the connected component purification to determine whether all points meet the requirements. = At that time, execute S6.
[0038] Specifically, in this embodiment, by using voxel adjacency graphs, effective connected component filtering, and spatial span constraints, the real and continuous target feature body is retained among the candidate feature points, avoiding the influence of discrete noise or local false detection points on template registration.
[0039] S6. Load the pre-established standard template feature point cloud and solve the coarse centroid registration translation between the standard template feature point cloud and the target feature point cloud; generate a set of periodic candidate angles according to the number of circumferential repeating units of the workpiece; obtain an initial registration matrix based on the set of periodic candidate angles and the coarse centroid registration translation; perform ICP fine registration with the initial registration matrix and the template feature point cloud as input to obtain the ICP fine registration matrix; obtain the optimal periodic candidate result by combining the set of periodic candidate angles, and then obtain the complete registration matrix; design a registration state factor to evaluate whether the optimal periodic candidate result meets the requirements. If yes, proceed to S7; otherwise, return to S5 to reconstruct the target feature point cloud before performing this step. Specifically, in this embodiment, the standard template feature point cloud is obtained by performing the same effective region filtering, surface feature extraction, and maximum connected component extraction on the standard posture workpiece point cloud as in S3 to S5, or by sampling a standard CAD model and filtering it according to the same feature rules. The standard template feature point cloud is represented as follows: ; in, For standard template feature point cloud; The processing flow is the same as S3 to S5; Point cloud of workpiece in standard posture; For model sampling operators; It is a standard CAD model.
[0040] In a specific embodiment, S6, solving for the coarse centroid registration translation between the standard template feature point cloud and the target feature point cloud includes: The formula for calculating the centroid of the target feature point cloud is: ; in, The centroid of the point cloud representing the target feature; For the target feature point cloud, the first One point; The formula for the centroid of a template feature point cloud is: ; in, The centroid of the template feature point cloud; The number of points in the template feature point cloud; For the template feature point cloud, the first One point; The coarse registration translation amount of the centroid based on the point cloud of the standard template feature and the point cloud of the target feature is calculated and expressed as follows: ; in, This is the coarse registration translation amount for the center of gravity; In this embodiment, to address the potential periodic mismatches caused by circumferentially repeating surface features, a set of periodic candidate angles is generated based on the number of circumferentially repeating units on the workpiece, wherein the first... The candidate angles for each cycle are represented as follows: ; in, For the first Initial values for candidate angles; Index for candidate angles; This represents the number of circumferentially repeating surface units; In a specific embodiment, an initial registration matrix is obtained based on the set of periodic candidate angles and the coarse centroid registration translation. ICP fine registration is then performed using the initial registration matrix and the template feature point cloud as input to obtain the ICP fine registration matrix, which includes: A candidate rotation matrix is constructed based on the candidate angles, and is expressed as follows: ; in, For the first The center rotation matrix corresponding to each candidate angle; Center point of the workpiece Let be the homogeneous translation matrix of the translation vector; To bypass Axis rotation rotation matrix; It is a zero translation vector; This is the zero row vector at the bottom of the homogeneous transformation matrix; For Let be the homogeneous translation matrix of the translation vector; Specifically, in this embodiment, the workpiece is first translated to the center, and then rotated around... Constructing a central rotation matrix by rotating the axis and then translating it back to its original position. .
[0041] Based on the coarse registration translation of the centroid and the candidate rotation matrix, the first... The initial registration matrix corresponding to each candidate angle is used to complete the coarse registration of the centroid and rotation of the candidate angles of the target feature point cloud, resulting in the initial registration matrix, expressed as: ; in, For the first The initial registration matrix corresponding to each candidate angle; For Let be the homogeneous translation matrix of the translation vector; For the first The center rotation matrix corresponding to each candidate angle; ICP fine registration is performed using the initial registration matrix and the feature point cloud of the standard template as input, resulting in the ICP fine registration matrix, which is represented as follows: ; in, For the first ICP registration matrix corresponding to each candidate angle; For iterative nearest-point registration operators; The target feature point cloud.
[0042] In a specific embodiment, the optimal periodic candidate result is obtained by combining the set of periodic candidate angles, thereby obtaining the complete registration matrix, including: Calculate the comprehensive registration error for each candidate angle in the set of candidate periodic angles, and select the candidate angle with the smallest comprehensive registration error as the optimal candidate period result. Wherein, the... The formula for calculating the overall registration error corresponding to each candidate initial value is: ; in, For the first The overall registration error corresponding to each candidate angle; This refers to the ICP error weighting coefficient; For the first ICP error corresponding to each candidate angle; for Error threshold; To ensure stable matching of residual weighting coefficients; For the first Stable matching residuals corresponding to each candidate angle; To stabilize the residual threshold; Weighting coefficients for the number of stable matching point pairs; For the first The number of stable matching point pairs corresponding to each candidate angle; The candidate angle with the smallest overall registration error, i.e., the candidate result for the optimal period, is: ; in, Index of the optimal candidate angle; Based on the optimal periodicity candidate results, the complete registration matrix is obtained, expressed as: ; in, The complete registration matrix from the target feature point cloud to the template feature point cloud; This is the ICP fine registration matrix corresponding to the optimal periodic candidate result; This is the initial registration matrix corresponding to the optimal periodic candidate result.
[0043] In a specific embodiment, in S6, the designed registration state factor is expressed as: ; in, For registration state factors; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is The comprehensive registration error corresponding to the optimal periodic candidate result; The comprehensive registration error threshold; The ICP error corresponding to the optimal period candidate result; Specifically, the optimal period candidate result is evaluated based on the registration state factor to determine whether it meets the requirements. If so, then S7 will be executed.
[0044] Specifically, this embodiment introduces a periodic candidate angle around the center point of the workpiece for workpieces with circumferentially repeating surface features, and outputs a complete registration matrix, which reduces the risk of mismatch of repeating structures and avoids incomplete translation deviation caused by using only the ICP residual matrix.
[0045] S7. Based on the complete registration matrix, register the target feature point cloud to obtain the registered target feature point cloud; decompose the complete registration matrix to extract the three-dimensional translational deviation and rotational deviation, and then obtain the pose deviation vector; based on the registered target feature point cloud and the standard template feature point cloud, filter to form a stable matching point pair set, and combine the stable matching point pair set to design the pose calculation state factor to evaluate whether the stable matching point pair set meets the requirements. If yes, proceed to S8; otherwise, return to S6 to obtain a new complete registration matrix before performing this step. In a specific embodiment, in S7, based on the complete registration matrix, the target feature point cloud is registered to obtain the registered target feature point cloud representation as follows: ; in, For the registered target feature point cloud For target feature point cloud; In a specific embodiment, the complete registration matrix is decomposed to extract the three-dimensional translational and rotational deviations, thereby obtaining the pose deviation vector, including: Decomposing the complete registration matrix yields: ; in, For complete registration rotation matrix For complete registration translation vector; The translation deviation is defined based on the complete registration translation vector and is expressed as follows: ; in, Translational deviation vector , , They are respectively , , Translational deviation in direction; according to - - Euler angles are used to extract rotational bias, expressed as follows: ; in, , , They are respectively around , , Rotational deviation in direction, around The rotational deviation of the shaft is used for angular correction of the bearing mechanism. It is the arctangent function in the four quadrants; and Rotation matrix Middle characterization X The elements of the axial space components are specifically the first... Line 1 Column and number Column elements; It is the arcsine function; Rotation matrix Middle characterization Y The elements of the axial space components, specifically the first... Line 1 Column elements; and Rotation matrix Middle characterization Z Elements of axial space components, For the first Line 1 Column elements, For the first The element in the first row and first column; The pose deviation vector, obtained based on the three-dimensional translational and rotational deviations, is used for subsequent robot trajectory compensation and is expressed as follows: ; in, This is the pose deviation vector.
[0046] In a specific embodiment, a stable set of matching point pairs is formed based on the registered target feature point cloud and the standard template feature point cloud. The pose calculation state factor is then designed using this stable set of matching point pairs, including: Bidirectional nearest neighbor retrieval is performed using both the standard template feature point cloud and the registered target feature point cloud as retrieval bases: Each point in the standard template feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the registered target feature point cloud; simultaneously, each point in the registered target feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the standard template feature point cloud. Only point pairs that are mutually matched in both sets of retrieval results and whose Euclidean distance is less than a preset stable matching distance threshold are retained, and these are summarized to form a stable matching point pair set, represented as: ; in, For a stable set of matching point pairs For feature points of standard template Registered target feature points The matching point pairs formed; In order to be in The nearest neighbor operator in the search. The first feature point cloud of the standard template Points The first feature point cloud of the registered target Points In order to be in The nearest neighbor operator in the search. for and Euclidean distance between To stabilize the matching distance threshold; The number of stable matching pairs in the set of stable matching pairs is: ; in, To ensure a stable number of matching point pairs; The stable matching residual is calculated based on the number of stable matching point pairs: ; in, To stabilize the matching residual For stable matching point pairs For stable matching point pairs The Euclidean distance between two points in the middle; Based on the number of stable matching point pairs and the stable matching residual, the pose design state factor is calculated as follows: ; in, Calculate the state factor for the pose; For characteristic functions, when all conditions within the three parentheses are true. Values Otherwise, the value is The threshold for the minimum number of stable matching pairs; To stabilize the residual threshold; The comprehensive registration error corresponding to the optimal candidate result; This is the threshold for comprehensive registration error.
[0047] Specifically, this embodiment evaluates whether the comprehensive registration error, the number of stable matching point pairs obtained based on the stable matching point pair set, and the stable matching residuals meet the requirements, including: if If the process returns to S5 to reacquire the target feature point cloud, it will re-enter S6 to execute the entire process of candidate angle arrangement, coarse registration, and ICP fine registration. However, the number of stable matching point pairs Or stable matching residual If the requirements are not met, return to S6, re-traverse the candidate angles of the cycle to complete the registration operation, obtain a new complete registration matrix, and then execute S7 to filter stable matching points and solve the pose deviation vector; if the above three indicators meet the preset judgment conditions, then execute S8.
[0048] Specifically, this embodiment uses the complete registration matrix instead of the ICP residual matrix to extract pose deviations, and applies quality constraints to the pose results through bidirectional nearest neighbor stable matching points, thereby improving the reliability of pose correction output.
[0049] S8. Obtain the output mode of the pose correction process, wherein the output mode includes a forward correction mode for the support mechanism or positioning fixture, a reverse compensation mode for the robot trajectory, and a reverse compensation mode for the robot trajectory matrix; calculate the pose correction amount in the forward correction mode for the support mechanism or positioning fixture based on the pose deviation vector; calculate the pose correction amount in the reverse compensation mode for the robot trajectory based on the pose deviation vector; determine the pose correction amount in the reverse compensation mode for the robot trajectory matrix based on the complete registration matrix; design a pre-output quality judgment factor to evaluate whether the pose correction amount in the corresponding mode meets the requirements. If so, perform pose correction operation according to the pose correction amount; otherwise, output a non-compliance reminder.
[0050] In a specific embodiment, the output mode of the pose correction process is defined as follows: ; in, Output mode; For positive correction mode of the supporting mechanism or positioning tooling; This is the robot trajectory reverse compensation mode; This is the robot trajectory matrix reverse compensation mode; Specifically, in this embodiment, the output mode is predetermined by the process configuration file, robot control task, or host computer control instruction; In a specific embodiment, calculating the pose correction amount of the bearing mechanism or positioning fixture in the positive correction mode based on the pose deviation vector includes: The unlimited positive correction amount of the bearing mechanism or positioning fixture is calculated based on the pose deviation vector and expressed as follows: ; in, This represents the positive correction amount for the workpiece posture without amplitude limitation. The correction ratio matrix for the supporting mechanism or positioning fixture; This is the pose deviation vector; By limiting the unlimited positive correction amount within the allowable range, the workpiece posture positive correction amount after limiting is obtained, and it is used as the pose correction amount in the positive correction mode of the bearing mechanism or positioning fixture, expressed as:
[0051] in, This is the positive correction amount for the workpiece posture after amplitude limiting; For amplitude limiting operators; and These are the lower and upper limits of the positive correction amount, respectively.
[0052] In a specific embodiment, the pose correction amount in the robot trajectory matrix reverse compensation mode is determined based on the complete registration matrix, and is expressed as follows: ; in, This is the robot trajectory reverse compensation matrix, which is the pose correction amount in the robot trajectory matrix reverse compensation mode. For the complete registration matrix; Calculating the pose correction amount in the robot trajectory reverse compensation mode based on the pose deviation vector includes: The unlimited reverse compensation amount for the robot's subsequent trajectory is calculated based on the pose deviation vector and expressed as follows: ; in, This is the reverse compensation amount for the unlimited robot trajectory; This is the robot trajectory compensation ratio matrix; By limiting the unlimited reverse compensation amount of the robot's subsequent trajectory within an allowable range, the limited reverse compensation amount of the robot's subsequent trajectory is obtained, and this amount is used as the pose correction amount in the robot trajectory reverse compensation mode, expressed as: ; in, This is the amplitude-limiting reverse compensation amount for the robot's subsequent trajectory; and These represent the lower and upper limits of the reverse compensation amount for the robot's subsequent trajectory, respectively.
[0053] In a specific embodiment, a pre-quality judgment factor is designed to evaluate whether the pose correction amount in the corresponding mode meets the requirements, including: The output quality determination factor of the design is expressed as follows: ; in, To output the pre-quality determination factor; Calculate the state factor for the pose; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The range of corrections that can be performed by the supporting mechanism or positioning fixture; The range of compensable parameters for the robot's subsequent trajectory; This defines the executable range for reverse compensation of the robot trajectory matrix.
[0054] In a specific embodiment, the pose correction amount in the corresponding mode is evaluated based on the output quality judgment factor to determine whether it meets the requirements. If so, a pose correction operation is performed based on the pose correction amount, wherein: After completing the pose correction operation based on the pose correction amount, the workpiece point cloud is re-acquired, and S1 to S7 are repeated to obtain the verification pose deviation vector. A post-execution verification state factor is designed to evaluate whether the verification pose deviation vector meets the threshold requirements. If yes, OK is output; otherwise, NG is output, and the failure reason is determined accordingly. Return to the corresponding step and reprocess; Specifically, the verification pose deviation vector is represented as: ; in, To verify the pose deviation vector after execution; This is to verify the translation deviation vector; To verify the rotational deviation vector; The status factor after design execution is as follows: ; in, For post-execution review of status factors; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is To verify the translation deviation threshold; To verify the rotational deviation threshold; Based on the pre-output quality assessment factor and the post-execution review status factor, the output assessment result is as follows: ; in, This is the final pose correction determination result; This indicates that the pose correction result meets the requirements. This indicates that the pose correction result does not meet the requirements; Indicates except and Other than these; Define the set of NG failure reason codes as follows: ; in, A set of codes for NG failure reasons; Encoding for failed data collection; Encoding for preprocessing failures; Encoding for failed surface feature extraction; Encoding failures in connected component purification; Code for registration failure; Code for pose calculation failure; Output the code for quality determination failure; Code for failure to verify after execution; Coded for failures without a reason; Define the NG decision state vector as: ; in, This is the NG decision state vector; This refers to the acquisition state factor in S1; This refers to the preprocessing state factor in S3; Extract state factors for features in S4; Purify the state factors of the connected components in S5; This refers to the registration state factor in S6; Calculate the state factor for the pose in S7; This refers to the output pre-quality determination factor in S8; This refers to the post-execution review status factor in S8. Define the NG failure reason encoding vector as follows: ; in, Encode the failure reason vector for NG; The index of the first failure state factor is determined based on the NG failure reason encoding vector: ; in, The index of the first failure state factor; Select the operator for the smallest index; Index for state factors; The index in the NG decision state vector is Element; The reason for the NG failure was determined to be: ; in, This serves as the identifier for the NG failure reason in the current process output; The index in the NG failure reason encoding vector is Element; Specifically, when There exists a value in When the state factor is given, the formula is based on the index. From NG failure reason encoding vector Extract the corresponding failure reason from the middle ; The NG failure reason flag when there is no failure reason is set as follows: ; in, This serves as the identifier for the NG failure reason in the current process output; Coded for failures without a reason; Specifically, when the NG decision state vector All state factors are At that time, the formula will indicate the reason for NG failure. Set to no failure reason code .
[0055] This embodiment clearly distinguishes between the forward correction of the bearing mechanism and the reverse compensation of the robot trajectory. It performs the pre-output quality judgment separately according to the output mode, and no longer uses the same "OR" condition to mix the correction amount of the bearing mechanism and the compensation amount of the robot trajectory. At the same time, a verification mechanism for re-collecting point clouds after execution is introduced to form an executable, verifiable and rollback pose correction closed loop.
[0056] Example 1: Taking a rotating workpiece with circumferentially repeating surface features as an example, the workpiece includes a central reference region, multiple circumferentially distributed surface units, and transition curved surface regions formed between adjacent surface units. Due to factors such as manual loading, initial angle of the bearing mechanism, fixture positioning gap, and workpiece surface reflection, the actual pose of the workpiece may have translational and angular deviations from the pose of the standard template. When using the method proposed in this invention, the robot first moves to a preset imaging position, the 3D camera acquires the workpiece point cloud, and the point cloud is unified to the robot's base coordinate system through the robot's imaging pose and hand-eye calibration matrix. Subsequently, based on the workpiece installation height, the central reference area or tooling calibration center, and the effective radial range, the point cloud is filtered to remove support mechanisms, fixtures, and background points. Then, the local curvature, unit normal vector change, and radial position evaluation values of the effective surface point cloud are calculated, and circumferential coverage constraints are used to ensure a balanced distribution of candidate feature points. After maximizing connectivity to purify the candidate surface feature points, the on-site target feature point cloud is obtained. The system loads a standard template feature point cloud established according to the same feature rules, performs registration on the on-site target feature point cloud, and retains stable matching point pairs through bidirectional nearest neighbor. The workpiece pose deviation vector is calculated based on the complete registration matrix, and compensation is further generated. After pose correction, the point cloud is re-acquired and verified. If the verified pose deviation meets the threshold, "OK" is output; otherwise, "NG" is output, and the process returns to the corresponding step for reprocessing.
[0057] Beneficial effects: (1) This invention does not directly register the entire field point cloud, but first extracts the effective surface features of the workpiece based on local curvature, normal change, radial position evaluation value and circumferential coverage constraint, and then uses the purified target feature point cloud for registration. Stable surface features such as the circumferential surface edge, the transition area between adjacent surface units and the central reference transition of rotating workpieces with circumferential repeating surface features are used for pose correction, thereby improving the attitude positioning stability of complex curved surface workpieces before robot operation; (2) This invention uses workpiece installation height and radial joint filtering, workpiece center point determination, candidate feature point screening, periodic candidate initial value registration and maximum connected domain purification to eliminate irrelevant regions, isolated false detection points and erroneous periodic registration results step by step. This can reduce the interference of periodic mismatch caused by bearing mechanism, fixture, background point, discrete noise and circumferential repeating surface on pose calculation, thereby improving the reliability of pose deviation calculation. (3) The present invention introduces ICP error, stable matching residual, number of stable matching point pairs and output limit determination before outputting pose correction amount, and re-collects point cloud and performs verification after execution. According to the reason for failure, it returns to the corresponding step for reprocessing, which can form a closed loop process from point cloud acquisition, feature extraction, template registration, pose correction, post-execution verification to OK / NG rollback, reducing the risk of error correction amount directly entering robot operation and improving the accuracy of processing.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A pose correction method based on workpiece surface features, characterized in that, include: S1. Obtain the robot's photo pose matrix; The original 3D point cloud of the workpiece is acquired and preprocessed to output the original workpiece point cloud. Based on the original workpiece point cloud, an acquisition state factor is designed to evaluate whether the acquired original 3D point cloud of the workpiece is valid. If it is valid, S2 is executed; otherwise, the workpiece point cloud is reacquired. S2. Obtain the homogeneous transformation matrix based on the robot's photographic pose matrix and the pre-calibrated hand-eye calibration matrix; The original workpiece point cloud is subjected to homogeneous coordinate transformation using the homogeneous transformation matrix to obtain a workpiece point cloud with unified coordinate units in the robot base coordinate system. S3. Determine the center point of the workpiece, and calculate the radial distance of each point in the workpiece point cloud after the coordinate units are unified relative to the center point of the workpiece; combine the radial distance to design an effective point state factor, so as to select effective surface points of the workpiece that meet the preset conditions from the workpiece point cloud after the coordinate units are unified. Design a preprocessing state factor to evaluate whether the number of effective surface points of the workpiece that meet the preset conditions meets the requirements. If it does, execute S4; otherwise, return to S2 to re-acquire the workpiece point cloud with unified coordinate units before executing this step. S4. Establish a KD-Tree for the effective surface point cloud of the workpiece, solve the local curvature of the workpiece, calculate the surface feature score of each point in the effective surface point cloud of the workpiece in combination with the local curvature, and filter to obtain a set of candidate feature points. Design a feature extraction state factor to evaluate whether the candidate feature point set meets the requirements. If it does, proceed to step S5; otherwise, return to step S3 to re-filter the effective surface points of the workpiece before proceeding to this step. S5. Based on the candidate feature point set, establish a voxel adjacency graph, and based on the voxel adjacency graph, obtain a set of effective connected components, thereby obtaining the target feature point cloud; Design a connected component purification state factor to evaluate whether the target feature point cloud meets the requirements. If it does, execute S6; otherwise, return to S4 to regenerate the candidate feature point set before executing this step. S6. Load the pre-established standard template feature point cloud, and solve the coarse registration translation amount of the centroid between the standard template feature point cloud and the target feature point cloud; generate a set of periodic candidate angles according to the number of circumferential repeating units of the workpiece, obtain an initial registration matrix based on the set of periodic candidate angles and the coarse registration translation amount of the centroid, and perform ICP fine registration with the initial registration matrix and the template feature point cloud as input to obtain the ICP fine registration matrix; The optimal periodic candidate result is obtained by combining the aforementioned set of periodic candidate angles, and then the complete registration matrix is obtained. Design a registration state factor to evaluate whether the optimal periodic candidate result meets the requirements. If it does, execute S7; otherwise, return to S5 to reconstruct the target feature point cloud before executing this step. S7. Based on the complete registration matrix, register the target feature point cloud to obtain the registered target feature point cloud; The complete registration matrix is decomposed to extract the three-dimensional translational and rotational deviations, thereby obtaining the pose deviation vector. Based on the registered target feature point cloud and standard template feature point cloud, a stable matching point pair set is formed. The pose calculation state factor is designed in combination with the stable matching point pair set to evaluate whether the stable matching point pair set meets the requirements. If it does, S8 is executed; otherwise, S6 is returned to obtain a new complete registration matrix before executing this step. S8. Obtain the output mode of the pose correction process, wherein the output mode includes a forward correction mode of the support mechanism or positioning fixture, a reverse compensation mode of the robot trajectory, and a reverse compensation mode of the robot trajectory matrix; calculate the pose correction amount in the forward correction mode of the support mechanism or positioning fixture based on the pose deviation vector; calculate the pose correction amount in the reverse compensation mode of the robot trajectory based on the pose deviation vector. Based on the complete registration matrix, determine the pose correction amount in the robot trajectory matrix reverse compensation mode; design an output pre-quality judgment factor to evaluate whether the pose correction amount in the corresponding mode meets the requirements. If it does, perform pose correction operation according to the pose correction amount; otherwise, output a non-compliance reminder.
2. The pose correction method based on workpiece surface features according to claim 1, characterized in that, In S4, a KD-Tree is established for the effective surface point cloud of the workpiece, the local curvature of the workpiece is solved, and the surface feature score of each point in the effective surface point cloud of the workpiece is calculated based on the local curvature. A candidate feature point set is then obtained, including: S41. Establish a KD-Tree for the effective surface point cloud of the workpiece, and search and determine the local neighborhood point set for each point in the effective surface point cloud of the workpiece. The first point cloud of the effective surface of the workpiece The set of neighborhood points of a point is represented as: ; in, For the first The set of neighboring points of a point; and The first point cloud of the effective surface of the workpiece The and the first One point; Point cloud of the effective surface of the workpiece; It is the Euclidean norm; The neighborhood search radius; S42. Perform principal component analysis on the local neighborhood set of each point to calculate the local curvature, including: In calculating the effective surface point cloud of the workpiece, the first The neighborhood mean of each point is: ; in, For the first The neighborhood mean of each point; For the set of neighborhood points The number of points in the middle; For the set of neighborhood points The point in the middle; The effective surface point cloud of the workpiece is calculated based on the distribution of neighboring points relative to the neighborhood mean. The neighborhood covariance matrix of each point is: ; in, For the first The neighborhood covariance matrix of each point; For neighborhood covariance matrix Perform eigenvalue decomposition: ; in, for The Unit eigenvectors; for The corresponding eigenvalues; Indices for eigenvalues and eigenvectors; Calculate the first based on the eigenvalue decomposition results The local curvature at each point is: ; in, For the first Local curvature at each point; , and for The three eigenvalues; To prevent extremely small positive numbers with a denominator of zero; S43. Calculate the change in unit normal vector between each point in the effective surface point cloud of the workpiece and each point in the local neighborhood point set, including: Will The unit eigenvector corresponding to the smallest eigenvalue As the first in the effective surface point cloud of the workpiece Local unit normal vector at each point: ; in, For the first Local unit normal vector at each point; Based on the point cloud of the effective surface of the workpiece Calculate the local unit normal vector of the nth point. The change in the unit normal vector at each point is: ; in, For the first The change in the unit normal vector at each point; For neighborhood points The local unit normal vector; S44. Calculate the surface feature score of each point in the effective surface point cloud of the workpiece by combining the local curvature and the unit normal vector change. Points with scores exceeding a set threshold are selected as feature points, thereby obtaining a candidate feature point set, including: In calculating the effective surface point cloud of the workpiece, the first The surface feature score for each point is: ; in, For the first Surface feature score of each point; These are the weighting coefficients corresponding to the normalized local curvature; For the first Normalized local curvature at each point; The weighting coefficients corresponding to the normalized normal variation; For the first Normalized normal variation at each point; These are the weighting coefficients corresponding to the normalized radial position evaluation values; For the first Normalized radial position evaluation value of each point; The set of candidate feature points obtained after screening is as follows: ; in, For the set of candidate feature points; Point cloud of the effective surface of the workpiece The first in One point; The threshold for surface feature scoring.
3. The pose correction method based on workpiece surface features according to claim 2, characterized in that, In S4, the feature extraction state factors are designed, including: Calculate the first candidate feature point in the set based on the workpiece center coordinates. The angular positions of the points are: ; in, For the first The angular position of each point relative to the center of the workpiece; It is the arctangent function in the four quadrants; and These are the candidate feature point sets. Points in exist direction and Coordinates of direction; and The center point of the workpiece is at direction and Coordinates of direction; Based on the angular position The circumferential partition number of the candidate feature points is calculated as follows: ; in, For the first The circumferential partition number corresponding to each candidate feature point; This is a corner-to-partition mapping function; The first point cloud of the effective surface of the workpiece One point; For the set of candidate feature points; A circumferential partition set is formed based on the circumferential partition numbers corresponding to the candidate feature points, and is represented as follows: ; in, The set of circumferential partitions covered by candidate feature points; Number of candidate feature points and the number of circumferential partitions covered by candidate feature points They are respectively: ; The feature extraction state factor of the design is expressed as: ; in, State factors are extracted for feature extraction; For characteristic functions, when both conditions within the parentheses are true. Values Otherwise, the value is The threshold for the minimum number of candidate feature points; This is the minimum threshold for the number of circumferentially covered partitions.
4. The pose correction method based on workpiece surface features according to claim 3, characterized in that, In S5, a voxel adjacency graph is established based on the candidate feature point set, and a set of effective connected components is obtained based on the voxel adjacency graph, thereby obtaining the target feature point cloud, including: S51. Map each point in the candidate feature point set to a voxel grid according to the set voxel size; S52. Construct a voxel adjacency graph using voxel meshes as nodes, represented as: ; in, This is a voxel adjacency graph; A set of voxel nodes; It is the set of adjacent edges of voxels; and The first The and the first Individual index, ; The voxel indices corresponding to the candidate feature points are: ; in, For the first Voxel indices corresponding to each candidate feature point; This is the floor function; The first in the candidate feature point set One point; Voxel grid size; voxels With voxels The adjacency indicator is represented as: ; in, voxels With voxels Adjacency indicator; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The threshold for the adjacency distance of a voxel; S53. Perform a breadth-first search or depth-first search on the voxel adjacency graph to obtain the set of connected components, represented as: ; in, For the first A set of connected components; For connected component indexes; The number of connected components; For connected component search operators; S54. Calculate the spatial span based on the set of connected components, and then obtain the maximum effective connected component. Obtain the target feature point cloud based on the maximum effective connected component, including: Calculate the first The spatial span of each connected component is: ; in, For the first Spatial span of a connected component; and The first The maximum and minimum corner points of the bounding box of each connected component; Based on the set of connected components and the spatial span, the effective set of connected components is obtained as follows: ; in, A set of valid connected components; For the first The number of points in each connected component; This is the threshold for the minimum number of points in a connected component. The minimum spatial span threshold for connected components; From the set of valid connected components The connected component with the largest number of vertices is selected as the maximally effective connected component, denoted as: ; in, The maximum effective connected component; A set of valid connected components; The voxel index belongs to the largest effective connected component. The candidate feature points form the target feature point cloud, represented as: ; in, The target feature point cloud.
5. The pose correction method based on workpiece surface features according to claim 4, characterized in that, An initial registration matrix is obtained based on the set of periodic candidate angles and the coarse centroid registration translation. ICP fine registration is then performed using the initial registration matrix and the template feature point cloud as input to obtain the ICP fine registration matrix, which includes: A candidate rotation matrix is constructed based on the candidate angles, and is expressed as follows: ; in, For the first The center rotation matrix corresponding to each candidate angle; Center point of the workpiece Let be the homogeneous translation matrix of the translation vector; To bypass Axis rotation The rotation matrix; It is a zero translation vector; This is the zero row vector at the bottom of the homogeneous transformation matrix; For Let be the homogeneous translation matrix of the translation vector; The first in the set of periodic candidate angles The candidate angles for each cycle are represented as follows: ; in, For the first Initial values for candidate angles; Index for candidate angles; This represents the number of circumferentially repeating surface units; Based on the coarse registration translation of the centroid and the candidate rotation matrix, the first... The initial registration matrix corresponding to each candidate angle is used to complete the coarse registration of the centroid and rotation of the candidate angles of the target feature point cloud, resulting in the initial registration matrix, expressed as: ; in, For the first The initial registration matrix corresponding to each candidate angle; For Let be the homogeneous translation matrix of the translation vector; For the first The center rotation matrix corresponding to each candidate angle; ICP fine registration is performed using the initial registration matrix and the feature point cloud of the standard template as input, resulting in the ICP fine registration matrix, which is represented as follows: ; in, For the first ICP fine registration matrix corresponding to each candidate angle; For iterative nearest-point registration operators; The target feature point cloud.
6. The pose correction method based on workpiece surface features according to claim 5, characterized in that, By combining the aforementioned set of periodic candidate angles, the optimal periodic candidate result is obtained, and thus the complete registration matrix is obtained, including: Calculate the comprehensive registration error for each candidate angle in the set of candidate periodic angles, and select the candidate angle with the smallest comprehensive registration error as the optimal candidate period result. Wherein, the... The formula for calculating the overall registration error corresponding to each candidate initial value is: ; in, For the first The overall registration error corresponding to each candidate angle; This refers to the ICP error weighting coefficient; For the first ICP error corresponding to each candidate angle; for Error threshold; To ensure stable matching of residual weighting coefficients; For the first Stable matching residuals corresponding to each candidate angle; To stabilize the residual threshold; Weighting coefficients for the number of stable matching point pairs; For the first The number of stable matching point pairs corresponding to each candidate angle; The candidate angle with the smallest overall registration error, i.e., the candidate result for the optimal period, is: ; in, Index of the optimal candidate angle; Based on the optimal periodicity candidate results, the complete registration matrix is obtained, expressed as: ; in, The complete registration matrix from the target feature point cloud to the template feature point cloud; This is the ICP fine registration matrix corresponding to the optimal periodic candidate result; This is the initial registration matrix corresponding to the optimal periodic candidate result.
7. The pose correction method based on workpiece surface features according to claim 6, characterized in that, In S7, based on the complete registration matrix, the target feature point cloud is registered, and the registered target feature point cloud is represented as follows: ; in, For the registered target feature point cloud For target feature point cloud; The complete registration matrix is decomposed to extract the three-dimensional translational and rotational deviations, thereby obtaining the pose deviation vector, including: Decomposing the complete registration matrix yields: ; in, For complete registration rotation matrix For complete registration translation vector; The translation deviation is defined based on the complete registration translation vector and is expressed as follows: ; in, Translational deviation vector , , They are respectively , , Translational deviation in direction; according to - - Euler angles are used to extract rotational bias, expressed as follows: ; in, , , They are respectively around , , Rotational deviation in direction, around The rotational deviation of the shaft is used for angular correction of the bearing mechanism. The arctangent function in the four quadrants and Rotation matrix Middle characterization X Elements of axial space components It is the arcsine function; Rotation matrix Middle characterization Y Elements of axial space components and Rotation matrix Middle characterization Z Elements of the axial space components; The pose deviation vector is obtained based on the three-dimensional translational and rotational deviations, and is expressed as follows: ; in, This is the pose deviation vector.
8. The pose correction method based on workpiece surface features according to claim 7, characterized in that, Based on the registered target feature point cloud and standard template feature point cloud, a stable matching point pair set is formed. Using this stable matching point pair set, a pose calculation state factor is designed, including: Bidirectional nearest neighbor retrieval is performed using both the standard template feature point cloud and the registered target feature point cloud as retrieval bases: Each point in the standard template feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the registered target feature point cloud; simultaneously, each point in the registered target feature point cloud is used as a base to retrieve the corresponding nearest neighbor point in the standard template feature point cloud. Only point pairs that are mutually matched in both sets of retrieval results and whose Euclidean distance is less than a preset stable matching distance threshold are retained, and these are summarized to form a stable matching point pair set, represented as: ; in, For a stable set of matching point pairs For feature points of standard template Registered target feature points The matching point pairs formed; In order to be in The nearest neighbor operator in the search. The first feature point cloud of the standard template Points The first feature point cloud of the registered target Points In order to be in The nearest neighbor operator in the search. for and Euclidean distance between To stabilize the matching distance threshold; The number of stable matching pairs in the set of stable matching pairs is: ; in, To ensure a stable number of matching point pairs; The stable matching residual is calculated based on the number of stable matching point pairs: ; in, To stabilize the matching residual For stable matching point pairs For stable matching point pairs The Euclidean distance between two points in the middle; Based on the number of stable matching point pairs and the stable matching residual, the pose design state factor is calculated as follows: ; in, Calculate the state factor for the pose; For characteristic functions, when all conditions within the three parentheses are true. Values Otherwise, the value is The threshold for the minimum number of stable matching pairs; To stabilize the residual threshold; The comprehensive registration error corresponding to the optimal candidate result; This is the threshold for comprehensive registration error.
9. The pose correction method based on workpiece surface features according to claim 8, characterized in that, Calculating the pose correction amount of the bearing mechanism or positioning fixture in the positive correction mode based on the pose deviation vector includes: The unlimited positive correction amount of the bearing mechanism or positioning fixture is calculated based on the pose deviation vector and expressed as follows: ; in, This represents the positive correction amount for the workpiece posture without amplitude limitation. The correction ratio matrix for the supporting mechanism or positioning fixture; This is the pose deviation vector; By limiting the unlimited positive correction amount within the allowable range, the workpiece posture positive correction amount after limiting is obtained, and it is used as the pose correction amount in the positive correction mode of the bearing mechanism or positioning fixture, expressed as: in, This is the positive correction amount for the workpiece posture after amplitude limiting; For amplitude limiting operators; and These are the lower and upper limits of the positive correction amount, respectively; Based on the complete registration matrix, the pose correction amount in the robot trajectory matrix reverse compensation mode is determined as follows: ; in, This is the robot trajectory reverse compensation matrix, which is the pose correction amount in the robot trajectory matrix reverse compensation mode. For the complete registration matrix; Calculating the pose correction amount in the robot trajectory reverse compensation mode based on the pose deviation vector includes: The unlimited reverse compensation amount for the robot's subsequent trajectory is calculated based on the pose deviation vector and expressed as follows: ; in, This is the reverse compensation amount for the unlimited robot trajectory; This is the robot trajectory compensation ratio matrix; By limiting the unlimited reverse compensation amount of the robot's subsequent trajectory within an allowable range, the limited reverse compensation amount of the robot's subsequent trajectory is obtained, and this amount is used as the pose correction amount in the robot trajectory reverse compensation mode, expressed as: ; in, This is the amplitude-limiting reverse compensation amount for the robot's subsequent trajectory; and These represent the lower and upper limits of the reverse compensation amount for the robot's subsequent trajectory, respectively.
10. The pose correction method based on workpiece surface features according to claim 9, characterized in that, In S8, the output pre-quality judgment factor is expressed as: ; in, To output the pre-quality determination factor; Calculate the state factor for the pose; For characteristic functions, when the condition inside the parentheses is true... Values Otherwise, the value is The range of corrections that can be performed by the supporting mechanism or positioning fixture; The range of compensable parameters for the robot's subsequent trajectory; This defines the executable range for reverse compensation of the robot trajectory matrix.
Citation Information
Patent Citations
Mechanical arm machining track correction method based on three-dimensional vision
CN112223294A
Pose estimation method, pose estimation system, terminal, storage medium and application
CN114743259A