An adaptive compensation method for industrial robot machining trajectory

By aligning the workpiece CAD model with the point cloud and calculating the pose offset error of the workpiece processing features, adaptive compensation of the workpiece processing features in mass production is achieved, which improves the processing accuracy and quality and solves the problem of processing quality differences caused by inconsistent workpiece incoming materials.

CN115421446BActive Publication Date: 2025-09-16H&H TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211212708.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-09-16
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In batch production processing scenarios, due to inconsistent incoming features on the workpiece and inconsistent workpiece clamping, the robot's processing trajectory does not match the processing features on the workpiece, affecting the processing quality and yield rate.

Method used

By aligning the CAD model of the machined features and their neighborhood surfaces on the workpiece with the scanned point cloud of the actual workpiece, the pose offset error of the machined features on the actual workpiece is calculated, and the machining trajectory corresponding to the machined features is compensated. A step-by-step registration strategy including point cloud sampling, fast registration and precise registration is adopted to improve computing efficiency and accuracy.

Benefits of technology

It effectively improves the machining accuracy and quality of workpieces, solves the problem of adapting machining features when incoming workpieces are inconsistent in batch production, and meets the needs of real-time machining scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115421446B_ABST
    Figure CN115421446B_ABST
Patent Text Reader

Abstract

This invention provides a method for adaptively compensating machining trajectories for industrial robots. This method aligns the CAD model of the machined feature and its surrounding surfaces on a workpiece with a scanned point cloud of the actual workpiece, calculates the pose offset error of the machined feature on the actual workpiece, and then compensates for the machining trajectory corresponding to the machined feature. This method is suitable for adaptively compensating for machining trajectories corresponding to the machined features in mass production scenarios, where inconsistent workpiece incoming material and deviations in the workpiece's installation pose exist. By adapting the machining trajectory to the workpiece's machining features, this method can improve workpiece machining accuracy and quality, while also increasing computational efficiency to meet the needs of real-time machining scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of industrial robot adaptive machining, and in particular relates to an industrial robot machining trajectory adaptive compensation method. Background Art

[0002] In the field of industrial robot processing, the robot's processing trajectory is usually generated in two ways: one way is manual teaching to form a fixed processing trajectory for the robot. The other way is to use the feature calculation on the theoretical CAD (computer-aided design) model to generate the processing trajectory. After the processing trajectory is generated, the processing trajectory can be used to control the industrial robot to perform fixed actions in space. This working characteristic is sufficient for scenarios where the workpiece and processing features are fixed. However, in batch production processing scenarios, there are inconsistent incoming features and inconsistent clamping of workpieces in the same batch of workpieces. This will cause the robot's processing trajectory to not match the processing features on the workpiece, resulting in differences in the processing effect of the workpiece, poor processing quality, or difficulty in ensuring the yield rate.

[0003] Adaptive machining is a method of machining the workpiece by adjusting machining control parameters or machining trajectories based on the actual machining status of the equipment and the status of the workpiece. This method adapts the machining process to the machining equipment and the workpiece, achieving the best machining quality for the workpiece. To address the aforementioned issues of batch production machining, it is necessary to use an adaptive machining trajectory to improve machining quality and accuracy. Before machining each workpiece, the actual position of the machining features on the workpiece is obtained, and the machining trajectory is compensated based on the actual position of the machining features. The compensated machining trajectory is then used to control the industrial robot to perform machining of the machining features on the workpiece, thereby improving the machining accuracy and quality of the workpiece.

[0004] The core of the adaptive compensation solution for industrial robot machining trajectories lies in calculating the deviation between the workpiece CAD model and the machining features on the actual workpiece, and then compensating the machining trajectory corresponding to the machining features based on this deviation. To calculate the machining feature deviation, the present invention proposes a solution that uses the reference geometry of the machining features on the workpiece CAD model to align with the measured point cloud data of the actual workpiece. This solution calculates the actual position deviation of the machined features on the actual workpiece, and then uses this deviation calculation to compensate the theoretical machining trajectory to a position that matches the machining features. This solution is suitable for adaptively compensating the machining trajectory corresponding to the machining features in mass production scenarios, where inconsistent workpiece incoming materials exist and deviations in the workpiece installation posture exist. Summary of the Invention

[0005] In response to the problems existing in the prior art, the present invention aligns the CAD model of the machined features and their neighborhood surfaces on the workpiece with the scanned point cloud of the actual workpiece, calculates the pose offset error of the machined features on the actual workpiece, and then compensates for the machining trajectory corresponding to the machining features. The purpose is to adapt the machining trajectory to the machining features of the workpiece, improve the machining accuracy and quality of the workpiece, and improve the computing efficiency to meet real-time machining scenarios.

[0006] The present invention adopts the following technical solutions to solve the problems existing in the prior art:

[0007] An industrial robot machining trajectory adaptive compensation method, characterized by comprising the following steps:

[0008] Step S1, control the robot to execute the scanning trajectory, drive the point cloud camera to scan and obtain the workpiece measurement point cloud data Q1;

[0009] Step S2, preprocessing the workpiece measurement point cloud data Q1 to remove noise points in the point cloud to obtain preprocessed workpiece measurement point cloud data Q2;

[0010] Step S3: constructing a kd-tree (k-dimensional tree) data structure Kd(Q2) using the pre-processed workpiece measurement point cloud data Q2;

[0011] Step S4: quickly register the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T1 of the workpiece CAD model to the workpiece measurement point cloud;

[0012] Step S5: precisely registering the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T2 of the workpiece CAD model to the workpiece measurement point cloud;

[0013] Step S6: Accurately align the machining feature reference contours and local curved surfaces on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T3 of the machining feature reference contours on the workpiece CAD model to the workpiece measurement cloud;

[0014] Step S7: Calculate the position offset error T = T3·T2·T1 of the machining feature on the workpiece, compensate the machining trajectory C corresponding to the machining feature, and obtain the compensated trajectory C′ = T·C.

[0015] Step S1 specifically involves establishing a transformation relationship between the camera's measurement coordinate system and the robot's base coordinate system through hand-eye calibration before the point cloud camera acquires workpiece point cloud data. During point cloud data acquisition, the measured point cloud is converted to a coordinate space using the robot's base coordinate system as the reference coordinate system. A scanning trajectory is established using a teaching robot. As the robot executes the scanning trajectory, it drives the point cloud camera to scan the complete point cloud data of the machining features. The point cloud camera is a Keyence LJ-X8000 line laser scanner camera.

[0016] The step S2 specifically includes: using the existing outlier filtering algorithm to remove isolated noise point clouds in the measurement point cloud, thereby eliminating the interference of the noise point clouds on the registration calculation.

[0017] The step S3 specifically comprises: constructing a kd-tree data structure using the workpiece measurement point cloud data Q2, limiting the number of points in the leaf nodes of the kd-tree data structure to 1, and recording the enclosing box information of the point cloud construction contained in each kd-tree node to obtain the kd-tree data structure Kd(Q2) of Q2; after Kd(Q2) is constructed, customizing the point cloud sampling strategy based on the kd-tree data structure to provide a point cloud sampling function for subsequent point cloud and workpiece CAD model registration calculations.

[0018] The specific construction process of the kd-tree data structure Kd(Q2) of Q2 is as follows: construct the cubic enclosing box B1 of Q2 in a direction parallel to the three coordinate axes of the Q2 reference coordinate system, take the longest side of the enclosing box, and divide the enclosing box into two sub-enclosing boxes B2 and B3 in the direction of the longest side. At the same time, based on the point cloud computing within the enclosing boxes B2 and B3, the sizes of the enclosing boxes B2 and B3 are updated. After the splitting is completed, B1 is used as the root node of the kd-tree, and B2 and B3 are used as the two child nodes of B1. Then, the point clouds within B2 and B3 are split step by step according to the aforementioned splitting method until the number of points in the sub-enclosing box nodes is 1, and the kd-tree data structure Kd(Q2) of Q2 is constructed.

[0019] The specific process of customizing the point cloud sampling strategy based on the kd-tree data structure is as follows: After Kd(Q2) is constructed, the kd-tree point cloud sampling function is customized according to the construction principle of the kd-tree data structure. First, according to the number of points N in the point cloud and the number of specified sampling reference points M, the maximum number of points contained in the kd-tree enclosing box node where the sampling point is located is calculated. Where ceil means rounding up; then, from the root node of the kd-tree, find the node whose number of points in the child node enclosing box is less than K for the first time, and use this node as the kd-tree sampling node for sampling; finally, use the center point of the kd-tree sampling node enclosing box as the reference point P c, find the distance P in the point cloud contained in the kd-tree sampling node c The nearest point P s As sampling points, the sampling points obtained in all kd-tree sampling nodes constitute a kd-tree sampling point set.

[0020] The step S4 specifically includes: registering the reference surface on the workpiece CAD model with the workpiece measurement point cloud enclosing box, and calculating the OBB (Oriented Bounding Box) enclosing box of the workpiece CAD model reference surface and the workpiece measurement point cloud, respectively. The workpiece CAD model reference surface is the area covered by the workpiece measurement point cloud, which is selected by the user on the CAD model based on the processing characteristics and the actual workpiece measurement situation; and constructing the enclosing box reference coordinate system T of the CAD model reference surface. w and the reference coordinate system T of the enclosing box of the workpiece measurement point cloud Q , based on T w to T Q The transformation relationship T 11 =T w -1 T Q , transform the workpiece CAD model to a position near the workpiece measurement point cloud;

[0021] The reference surface of the workpiece CAD model is registered with the sampled point cloud of the workpiece measurement point cloud. The kd-tree point cloud sampling function is used. According to the number of sampling points set for fast registration, N1=a1·N, where a1 is the fast registration sampling coefficient 0<a1≤1, and N is the number of points in the point cloud, point cloud sampling is performed in Kd(Q2) to obtain the workpiece sampling point cloud Q3. The reference surface F on the workpiece CAD model is used to align with the workpiece sampling point cloud Q3. The workpiece CAD model is transformed to a position close to the workpiece measurement point cloud, and the transformation matrix T from the workpiece CAD model to the workpiece sampling point cloud Q3 is calculated. 12 ;

[0022] The registration transformation matrix T1=T between the workpiece CAD model and the workpiece measurement point cloud is obtained through the enclosing box registration and sampling point registration calculation. 12 ·T 11 .

[0023] The step S5 specifically includes: using the kd-tree point cloud sampling function, setting the number of sampling points N2=a2·N according to the precise registration of the workpiece CAD model and the workpiece measurement point cloud, where a2 is the precise registration sampling coefficient a1<a2≤1, performing point cloud sampling in Kd(Q2) to obtain the workpiece sampling point cloud Q4, using the reference surface F on the workpiece CAD model to accurately align with the workpiece sampling point cloud Q4, further transforming the workpiece CAD model to a position close to the workpiece measurement point cloud, and calculating the transformation matrix T2 from the workpiece CAD model to the workpiece sampling point cloud Q4.

[0024] The step S6 specifically includes: after the workpiece CAD model and the workpiece measurement point cloud are aligned and fitted in steps S4 and S5, a point set {q} whose distance from the machining feature reference contour line {e} on the workpiece CAD model is less than a threshold ε is found in the workpiece measurement point cloud Q2; a matching relationship between q and the CAD model reference surface and reference contour line is established based on the geometric characteristics of q and its neighborhood points; then, {q} is used to align with the matched CAD model reference surface and reference contour line, and a registration coordinate transformation matrix T3 for aligning the machining feature reference contour line on the workpiece CAD model to the workpiece measurement cloud is calculated.

[0025] The specific steps of step S7 are as follows: based on the registration transformation matrix calculated in steps S4-S6, the processing feature posture offset error matrix T=T3·T2·T1 on the workpiece is calculated, and then the processing trajectory C corresponding to the processing feature is transformed and compensated as a whole according to the processing feature posture offset error matrix T to obtain the compensated trajectory C′=T·C.

[0026] The present invention has the following advantages:

[0027] (1) The present invention provides an adaptive compensation method for industrial robot machining trajectories. This method uses a step-by-step registration strategy to calculate the offset error of workpiece machining features. In the registration step, a point cloud sampling method is first used to obtain a sampled point cloud. This sampled point cloud is then registered with the workpiece CAD model, thereby improving the algorithm's computational efficiency and meeting the requirements for real-time machining scenarios. Furthermore, each step works collaboratively and is gradually refined, effectively improving the accuracy of the algorithm's computation.

[0028] (2) The present invention provides an adaptive compensation method for industrial robot machining trajectories, which comprehensively considers the workpiece machining features and their local geometric characteristics for deviation calculation, and uses the workpiece machining feature reference contour line and the surface of the contour line neighborhood with the workpiece measurement point cloud for registration calculation. The local offset deviation of the machining features on the actual workpiece relative to the workpiece CAD model can be calculated, which is helpful for solving the problem of machining when the incoming materials of the workpiece machining features are inconsistent during batch production. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flowchart of the method for adaptively compensating the machining trajectory of an industrial robot provided by an embodiment of the present invention;

[0030] Figure 2 A schematic diagram of the system composition of an industrial robot machining trajectory adaptive compensation processing device provided by an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of a workpiece and contour feature machining trajectory provided by an embodiment of the present invention;

[0032] Figure 4 A schematic diagram of a workpiece measurement point cloud provided by an embodiment of the present invention;

[0033] Figure 5 and Figure 6 A schematic diagram of a boundary contour line measurement point pair matching solution provided by an embodiment of the present invention;

[0034] Figure 7 A schematic diagram of a matching solution for boundary contour line measurement points provided by an embodiment of the present invention;

[0035] Among them: 1-industrial robot, 2-laser processing equipment, 3-point cloud camera, 4-workpiece to be processed, 5-workpiece positioning block, 6-workbench, 7-workpiece contour feature processing trajectory. DETAILED DESCRIPTION

[0036] The following is a further detailed description of the technical solution of the present invention through embodiments and in conjunction with the accompanying drawings. The schematic diagram of the laser welding processing workstation in this embodiment is shown in FIG. Figure 2 As shown, the laser processing equipment 2 and the point cloud camera 3 are fixedly connected to the flange end of the industrial robot 1, and the robot is driven to perform point cloud scanning or laser welding on the workpiece 4 to be processed. In this embodiment, the workpiece point cloud scanning trajectory is generated by teaching, ensuring that the camera can measure the complete laser welding area on the workpiece when measuring along the scanning trajectory. The laser welding processing trajectory is calculated and generated using the reference surface and reference contour line on the selected workpiece CAD model. The generated processing trajectory schematic is shown in Figure 3 When the workpiece is mounted, it is positioned by the workpiece positioning block 5 on the workbench 6. There will be a certain amount of clamping and positioning error each time it is mounted.

[0037] See also Figure 1 The method for adaptively compensating the machining trajectory of an industrial robot provided in this embodiment mainly includes the following steps:

[0038] Step S1: Control the robot to execute the scanning trajectory and drive the point cloud camera to scan and obtain the workpiece measurement point cloud data Q1.

[0039] Before collecting workpiece point cloud data, hand-eye calibration is used to establish the transformation relationship between the camera measurement coordinate system and the robot base coordinate system. When collecting point cloud data, the measured point cloud is converted to the coordinate space with the robot base coordinate system as the reference coordinate system. The scanning trajectory is constructed by teaching the robot. When the robot executes the scanning trajectory, it drives the point cloud camera to scan the complete processing feature point cloud data. The point cloud data diagram is shown in the figure below. Figure 4 shown.

[0040] Step S2: pre-process the workpiece measurement cloud data to remove noise points in the point cloud to obtain pre-processed workpiece measurement point cloud data Q2.

[0041] This embodiment uses statistical filtering to find isolated outliers and remove them from the workpiece measurement point cloud, eliminating interference from the noisy point cloud on the registration calculation. The statistical filtering method calculates the average distance between each point in the point cloud and its neighboring points. The average distances of all points form a Gaussian distribution. Points outside a specified threshold within the Gaussian distribution are considered outliers and removed.

[0042] Step S3: Use the workpiece measurement point cloud data Q2 to construct a kd-tree data structure Kd(Q2).

[0043] Construct Q2's cubic enclosing box B1 in a direction parallel to the three coordinate axes of Q2's reference coordinate system. Take the longest side of the enclosing box and divide it into two sub-enclosing boxes B2 and B3 in the direction of the longest side. At the same time, update the sizes of enclosing boxes B2 and B3 based on the point cloud computing within enclosing boxes B2 and B3. After the split is completed, use B1 as the root node of the kd-tree, and B2 and B3 as the two child nodes of B1. Then, split the point clouds within B2 and B3 step by step according to the above splitting method until the number of points in the sub-enclosing box nodes is 1, and construct Q2's kd-tree data structure Kd(Q2).

[0044] After Kd(Q2) is constructed, the kd-tree point cloud sampling function is customized according to the construction principle of the kd-tree data structure. First, according to the number of points N in the point cloud and the specified number of sampling reference points M, the maximum number of points contained in the kd-tree enclosing box node where the sampling point is located is calculated. Where ceil means rounding up. Then, from the root node of the kd-tree, find the node where the number of points in the child node enclosing box is less than K for the first time, and use this node as the kd-tree sampling node for sampling. Finally, use the center point of the kd-tree sampling node enclosing box as the reference point P c , find the distance P in the point cloud contained in the kd-tree sampling node c The nearest point P sAs sampling points, the sampling points obtained in all kd-tree sampling nodes constitute a kd-tree sampling point set.

[0045] Step S4: Rapidly align the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain the registration coordinate transformation matrix T1 of the workpiece CAD model to the workpiece measurement point cloud. Rapid registration includes two steps, as follows:

[0046] Step 1: Align the workpiece CAD model reference surface with the workpiece measurement point cloud enclosing box. First, calculate the OBB enclosing box of the workpiece CAD model reference surface and the workpiece measurement point cloud respectively, where the workpiece CAD model reference surface is the area covered by the workpiece measurement point cloud. Then, construct the local reference coordinate system of the workpiece CAD model enclosing box and the workpiece measurement point cloud enclosing box, specifically with the center point of the enclosing box as the origin, the longest side direction of the enclosing box as the X-axis, the second longest side direction of the enclosing box as the Y-axis, and the shortest side direction of the OBB enclosing box as the Z-axis. Finally, according to the workpiece CAD model enclosing box reference coordinate system T w To the workpiece measurement point cloud OBB enclosing box reference coordinate system T Q The transformation relationship T 11 =T w -1 T Q Transform the workpiece CAD model to the vicinity of the workpiece measurement point cloud.

[0047] The second step is to align the reference surface of the workpiece CAD model with the sampled point cloud of the workpiece measurement point cloud. Use the kd-tree point cloud sampling function and the number of sampling points set according to the fast registration. Perform point cloud sampling in Kd(Q2) to obtain the workpiece sampling point cloud Q3. Use the reference surface F on the workpiece CAD model to align with the workpiece sampling point cloud Q3. The alignment algorithm uses the workpiece CAD model and point cloud alignment method described in the patent "A Method and System for Analyzing Positioning Errors in Industrial Robot Measurement Trajectory" (Patent No. 201910110299.9). After alignment, transform the workpiece CAD model to a position close to the workpiece measurement point cloud, and calculate the transformation matrix T from the workpiece CAD model to the workpiece sampling point cloud Q3. 12 .

[0048] After the above two steps, the registration transformation matrix T1=T 12 ·T 11 .

[0049] Step S5: precisely align the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T2 of the workpiece CAD model to the workpiece measurement point cloud.

[0050] Use the kd-tree point cloud sampling function to set the number of sampling points according to the precise registration between the workpiece CAD model and the workpiece measurement point cloud. Point cloud sampling is performed in Kd(Q2) to obtain the workpiece sampling point cloud Q4. The reference surface F on the workpiece CAD model is used to accurately align with the workpiece sampling point cloud Q4. The workpiece CAD model is further transformed to a position close to the workpiece measurement point cloud. At the same time, the transformation matrix T2 from the workpiece CAD model to the workpiece sampling point cloud Q4 is calculated.

[0051] Step S6: accurately align the machining feature reference contours and local surfaces on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T3 of the machining feature reference contours on the workpiece CAD model to the workpiece measurement cloud.

[0052] First, after the workpiece CAD model and the workpiece measurement point cloud are aligned in steps S4 and S5, a point set {q} whose distance from the machining feature reference contour line {e} on the CAD model is less than a threshold ε = 0.5 mm is found in the workpiece measurement point cloud Q2.

[0053] Then, based on the geometric characteristics of q and its neighborhood points, a matching relationship is constructed between q and the reference surface and reference contour line on the CAD model. For each q, the contour line e closest to q and the nearest point p on e are found to form a neighboring point pair (p, q) of the reference contour line. Among them, there are two types of contour lines e where p is located: one is that e is a boundary contour line, characterized by a surface on one side of e and an empty space on the other side; the other is that e is a boundary contour line between two surfaces, characterized by both sides of e being surfaces, and the surfaces on both sides of e have different normals near e. For these two types of contour lines, the matching relationship is constructed using the following methods:

[0054] For the case where the curve e corresponding to q is the boundary contour line, the matching relationship is evaluated using the similarity of the neighborhood circle blank rate between the points on the boundary contour line and the points on the boundary point cloud, where the blank rate is defined as the ratio of the area of ​​the empty surface and empty point cloud area on the circle to the total area of ​​the circle. For p, calculate the tangent plane of the adjacent surface f of e where p is located at point p, and construct a circle with p as the center and r as the radius on the tangent plane. Divide the circle into m = 360 parts according to the method of dividing the central angle equally, and obtain m points on the circle {v p} and m sector areas, such as Figure 5 As shown. If v p Project along the normal direction of the surface at point p, and the projection point falls on the surface adjacent to e, then it is considered that p Two adjacent fan-shaped areas are located on the surface side. If the projection point falls on e, then v p The adjacent sector area close to the surface is located on the surface side, and the sector area away from the surface is located on the blank side. In addition, it is considered that vp The two adjacent sectors are located on the blank side. Calculate the number k of sectors located on the curved side. p Ratio to m For q, the local tangent plane and normal at q are calculated by the neighborhood point cloud of q. A circle with q as the center and r as the radius is constructed on the tangent plane. The circle is divided into m = 360 parts according to the central angle, and m sector areas are obtained, such as Figure 6 As shown. Project the neighborhood points of q along the normal of point q onto the circular plane. If the projected point falls within the sector area, then the sector area is considered to be on the surface side, otherwise it is considered to be on the blank side. Calculate the number of sector areas k on the surface side q Ratio to m Given an error threshold σ, if u p <1,u q <1 and |u p -u q |<σ, then q is considered as a point on the contour line, and the corresponding relationship between q and the contour line e on the workpiece CAD model is recorded; otherwise, q is considered as a point on the surface, and the corresponding relationship between q and the surface f on the workpiece CAD model is recorded.

[0055] For the case where the contour line e where q corresponds to p is the boundary curve, the matching relationship is evaluated using the parallelism between the normals of the surfaces on both sides of p and the normal of q. Calculate the unit normal vectors n of the surfaces f1 and f2 on both sides of the contour line e at point q respectively. p1 With n p2 At the same time, calculate the local tangent plane unit normal vector n constructed by the neighborhood point cloud of q q ,like Figure 7 As shown. Given the error threshold σ, if |n q ·n p1 -1|<σ, then q is considered as a point on the surface f1, and the corresponding relationship between q and the surface f1 on the workpiece CAD model is recorded. If |n q ·n p2 If -1|<σ, then q is considered to be a point on the surface f2, and the corresponding relationship between q and the surface f2 on the workpiece CAD model is recorded. If neither condition is satisfied, then q is considered to be a point on the contour line e, and the corresponding relationship between q and the curve e on the workpiece CAD model is recorded.

[0056] Finally, the registration calculation is performed based on the matching relationship between q and the workpiece CAD model surface and contour line. q is only registered with the CAD model surface or contour line it matches, and the registration coordinate transformation matrix T3 is calculated when the reference contour line of the machining feature on the workpiece CAD model is registered to the workpiece measurement cloud.

[0057] Step S7, calculate the offset error T = T3·T2·T1 of the machining feature on the workpiece, compensate the machining trajectory C corresponding to the machining feature, and perform an offset transformation on the entire machining trajectory C according to T to obtain the compensated trajectory C′ = T·C.

[0058] The compensated machining trajectory is transformed to a position that matches the machining features on the actual workpiece, and then the compensated machining trajectory is used to drive the robot to perform the laser welding process.

[0059] The scope of protection of the present invention is not limited to the above-described embodiments. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the scope and spirit of the present invention. If such modifications and variations fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such modifications and variations.

Claims

1. An adaptive compensation method for industrial robot machining trajectory, characterized in that: The following steps are involved: Step S1, control the robot to execute the scanning trajectory, drive the point cloud camera to scan and obtain the workpiece measurement point cloud data Q1; Step S2, preprocessing the workpiece measurement point cloud data Q1 to remove noise points in the point cloud to obtain preprocessed workpiece measurement point cloud data Q2; Step S3, constructing a kd-tree data structure Kd(Q2) using the preprocessed workpiece measurement point cloud data Q2; Step S4: quickly register the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T1 of the workpiece CAD model to the workpiece measurement point cloud; Step S5: precisely registering the reference surface on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T2 for registering the workpiece CAD model to the workpiece measurement point cloud; Step S6: Accurately align the machining feature reference contours and local curved surfaces on the workpiece CAD model with the workpiece measurement point cloud to obtain a registration coordinate transformation matrix T3 of the machining feature reference contours on the workpiece CAD model to the workpiece measurement cloud; Step S7, calculating the offset error T of the machining feature on the workpiece = T3·T2·T1, compensating the machining trajectory C corresponding to the machining feature, and obtaining the compensated trajectory C′ = T·C; The step S3 specifically comprises: constructing a kd-tree data structure using the workpiece measurement point cloud data Q2, limiting the number of points in the leaf nodes of the kd-tree data structure to 1, and recording the enclosing box information of the point cloud construction contained in each kd-tree node to obtain the kd-tree data structure Kd(Q2) of Q2; after Kd(Q2) is constructed, customizing the point cloud sampling strategy based on the kd-tree data structure to provide a point cloud sampling function for subsequent point cloud and workpiece CAD model registration calculations; The specific construction process of the kd-tree data structure Kd(Q2) of Q2 is as follows: constructing a cubic enclosing box B1 of Q2 in a direction parallel to the three coordinate axes of the reference coordinate system of Q2, taking the longest side of the enclosing box, and dividing the enclosing box into two sub-enclosing boxes B2 and B3 in the direction of the longest side, and updating the sizes of the enclosing boxes B2 and B3 based on the point cloud computing within the enclosing boxes B2 and B3; after the splitting is completed, B1 is used as the root node of the kd-tree, and B2 and B3 are used as the two child nodes of B1; then, the point clouds within B2 and B3 are split level by level according to the aforementioned splitting method until the number of points in the sub-enclosing box nodes is 1, thereby constructing the kd-tree data structure Kd(Q2) of Q2; The specific process of customizing the point cloud sampling strategy based on the kd-tree data structure is as follows: After Kd(Q2) is constructed, the kd-tree point cloud sampling function is customized according to the construction principle of the kd-tree data structure. First, according to the number of points N in the point cloud and the number of specified sampling reference points M, the maximum number of points contained in the kd-tree enclosing box node where the sampling point is located is calculated. Where ceil means rounding up; then, from the root node of the kd-tree, find the node whose number of points in the child node enclosing box is less than K for the first time, and use this node as the kd-tree sampling node for sampling; finally, use the center point of the kd-tree sampling node enclosing box as the reference point P c , find the distance P in the point cloud contained in the kd-tree sampling node c The nearest point P s As sampling points, the sampling points obtained in all kd-tree sampling nodes constitute the kd-tree sampling point set; The step S4 specifically includes: registering the reference surface on the workpiece CAD model with the workpiece measurement point cloud enclosing box, and calculating the OBB enclosing box of the workpiece CAD model reference surface and the workpiece measurement point cloud, respectively. The workpiece CAD model reference surface is the area covered by the workpiece measurement point cloud, which is selected by the user on the CAD model according to the processing characteristics and the actual workpiece measurement situation; constructing the enclosing box reference coordinate system T of the CAD model reference surface w and the reference coordinate system T of the enclosing box of the workpiece measurement point cloud Q , based on T w to T Q The transformation relationship T 11 =T w -1 T Q , transform the workpiece CAD model to a position near the workpiece measurement point cloud; Register the reference surface of the workpiece CAD model with the sampled point cloud of the workpiece measurement point cloud. Use the kd-tree point cloud sampling function to sample the point cloud in Kd(Q2) according to the number of sampled points N1 = a1·N set for fast registration, where a1 is the fast registration sampling coefficient 0 < a1 ≤ 1 and N is the number of points in the point cloud, obtaining the workpiece sampled point cloud Q3. Register the reference surface F on the workpiece CAD model with the workpiece sampled point cloud Q3, transform the workpiece CAD model to a position close to the workpiece measurement point cloud, and calculate the transformation matrix T from the workpiece CAD model to the workpiece sampled point cloud Q3 12 ; The registration transformation matrix T1=T between the workpiece CAD model and the workpiece measurement point cloud is obtained through the enclosing box registration and sampling point registration calculation. 12 ·T 11 .

2. The method for adaptively compensating an industrial robot machining trajectory according to claim 1, wherein: The step S1 is specifically as follows: before the point cloud camera collects the workpiece point cloud data, the transformation relationship between the camera measurement coordinate system and the robot base coordinate system is established through hand-eye calibration; when collecting point cloud data, the measured point cloud is converted into a coordinate space with the robot base coordinate system as the reference coordinate system; the scanning trajectory is constructed by teaching the robot, and when the robot executes the scanning trajectory, it drives the point cloud camera to scan the complete processing feature point cloud data.

3. The method for adaptively compensating the machining trajectory of an industrial robot according to claim 1, wherein The specific steps of step S2 are as follows: Use the existing outlier filtering algorithm to remove the isolated noise point clouds in the measurement point cloud, and eliminate the interference of the noise point clouds on the registration calculation.

4. The method for adaptively compensating the machining trajectory of an industrial robot according to claim 1, wherein The specific steps of step S5 are as follows: Use the kd-tree point cloud sampling function, and sample the point cloud in Kd(Q2) according to the number of sampling points N2 = a2·N set for the fine registration of the workpiece CAD model and the workpiece measurement point cloud, where a2 is the fine registration sampling coefficient and a1 < a2 ≤ 1, to obtain the workpiece sampled point cloud Q4. Use the reference surface F on the workpiece CAD model to perform precise registration with the workpiece sampled point cloud Q4, further transform the workpiece CAD model to a position close to the workpiece measurement point cloud, and calculate the transformation matrix T2 from the workpiece CAD model to the workpiece sampled point cloud Q4.

5. The method for adaptively compensating the machining trajectory of an industrial robot according to claim 4, characterized in that The specific steps of step S6 are as follows: After registering and fitting the workpiece CAD model and the workpiece measurement point cloud in step S4 and step S5, find the point set {q} in the workpiece measurement point cloud Q2 whose distance from the machining feature reference contour line {e} on the workpiece CAD model is less than the threshold ε. Based on the geometric characteristics of q and its neighborhood points, construct the matching relationship between q and the CAD model reference surface and reference contour line. Then, use {q} to perform registration with the matched CAD model reference surface and reference contour line, and calculate the registration coordinate transformation matrix T3 from the machining feature reference contour line on the workpiece CAD model to the workpiece measurement cloud.

6. The method for adaptively compensating the machining trajectory of an industrial robot according to claim 5, characterized in that The specific steps of step S7 are as follows: Based on the registration transformation matrices calculated in steps S4 - S6, calculate the machining feature pose offset error matrix T = T3·T2·T1 for the workpiece. Then, transform and compensate the entire machining trajectory C corresponding to the machining feature according to the machining feature pose offset error matrix T, and obtain the compensated trajectory C′ = T·C.

Citation Information

Patent Citations

  • A method and system for analyzing the positioning error of an industrial robot's measurement trajectory.

    CN109895094B

  • An accurate registration method of point cloud based on an adaptive threshold

    CN108986149A

  • Digital twin modeling method oriented to mobile robot milling processing

    WO2022007753A1