An online perception-based interpolation queue synchronization and optimization method for robot gluing trajectories
The glue coating trajectory is optimized through timestamp calibration and sparse filtering algorithms, and the problem of mismatch between the line laser sensor and the robot position is solved, high accuracy and high synchronization of the glue coating trajectory is achieved, and the glue coating quality is improved.
Patent Information
- Application Number
- CN202510686084.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The image acquisition frequency of the linear laser sensor does not match the robot position transmission frequency, resulting in a cumulative deviation of the glue coating path, and sensor data transmission delay and environmental factors affect the measurement accuracy, resulting in a deviation of the glue coating trajectory.
Through timestamp calibration and delay compensation, a trajectory interpolation queue is constructed, combined with first-order linear or second-order acceleration interpolation computer robot position pose, and combined with sparse filtering algorithm to optimize the glue coating trajectory to generate a continuous and smooth glue coating trajectory.
It improves the accuracy and synchronization of the glue coating trajectory, enhances the quality of the glue coating, reduces the deviation of the glue coating, and improves the accuracy of the glue coating trajectory.
Smart Images

Figure CN120206539B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of high-precision trajectory control of industrial robots, and particularly to a method for synchronizing and optimizing a robot gluing trajectory interpolation queue based on online perception. Background Art
[0002] In the gluing operation of industrial robots, line laser sensors are widely used to scan the surface of workpieces in real time to generate three-dimensional point cloud data of the gluing path. However, the following key problems exist in the actual application of the prior art.
[0003] The image acquisition frequency of the line laser sensor does not match the robot pose transmission frequency, resulting in the sensor data at a certain moment not being directly corresponding to the real-time pose of the robot. For example, when the robot moves at a high speed (such as 50 mm / s), the displacement of the robot within adjacent image intervals is significant, and the traditional cyclic acquisition method will cause cumulative deviation of the gluing path due to data asynchronization.
[0004] There is a fixed delay when sensor data is transmitted through Ethernet, and the existing system usually directly uses the receiver timestamp without compensating for the actual acquisition time. This error will be further amplified in a dynamic scenario, resulting in coordinate mapping deviation in 3D reconstruction.
[0005] The line laser sensor has the characteristics of non-contact measurement, high precision and resolution, and adaptability to complex surfaces and environments. However, factors such as temperature, humidity, and air flow may affect the scattering or refraction of the laser beam, resulting in measurement errors. In addition, high-precision sensors need to operate in a stable environment. Due to the end effector carrying glue, if the serial robot has poor rigidity, it is prone to vibration interference during movement, resulting in problems such as deviation in the acquisition of the line laser sensor and difficulty in feature point extraction. Summary of the Invention
[0006] Aiming at the deficiencies of the prior art, the present invention provides a method for synchronizing and optimizing a robot gluing trajectory interpolation queue based on online perception, which solves the technical problem of gluing trajectory deviation caused by the mismatch between the data acquired by the sensor at the current moment and the robot pose.
[0007] To solve the above technical problems, the present invention provides the following technical solution: A method for synchronizing and optimizing a robot gluing trajectory interpolation queue based on online perception, the method comprising the following steps:
[0008] S1. Collect image data and point cloud data of the gluing gap at the current moment, and perform timestamp calibration and delay compensation on the image data to obtain the actual acquisition timestamp;
[0009] S2. The upper computer receives the pose data of the robot in real time and stores it in a circular buffer area in timestamp order to form a trajectory interpolation queue;
[0010] S3. Locate adjacent robot pose points in the trajectory interpolation queue according to the actual acquisition timestamp, and calculate the average movement speed of the robot based on the time interval and position difference between the robot pose points;
[0011] S4. Select to use first-order linear interpolation or second-order acceleration interpolation according to the average movement speed to obtain the robot pose corresponding to the acquisition image data time;
[0012] S5. Extract the points in the gluing gap from the point cloud data as feature points, and perform coordinate transformation on the feature points to obtain the gluing trajectory feature points in the robot base coordinate system;
[0013] S6. Sparsify the gluing trajectory feature points and perform fitting to generate the gluing trajectory.
[0014] Further, in step S2, it includes:
[0015] Attach the reception timestamp to the image data collected by the line laser sensor, and calculate the actual acquisition timestamp according to the transmission delay. The calculation method of the transmission delay is:
[0016] ;
[0017] And define the actual acquisition timestamp as: .
[0018] Further, in step S2, the pose data includes a timestamp , three-dimensional position and quaternion attitude ;
[0019] And the trajectory interpolation queue satisfies: the queue capacity is dynamically adjusted according to the maximum movement speed of the robot and the data frequency; adopt a lock-free circular buffer area structure to support multi-threaded concurrent reading and writing.
[0020] Further, in step S3, the calculation formula of the average movement speed is:
[0021] ;
[0022] ;
[0023] In the formula, is the average speed in the X, Y, and Z directions between time and ; and are the coordinates of adjacent robot pose points; represents the actual acquisition timestamp and the previous robot pose timestamp Difference
[0024] Furthermore, in step S4, it specifically includes:
[0025] Select the interpolation method according to the set speed threshold. When the average speed is less than or equal to the speed threshold, it is low speed, and the first-order linear interpolation is used to obtain the robot pose corresponding to the acquisition image data moment. The first-order linear interpolation formula is:
[0026] ;
[0027] In the formula, is The estimated values of the position in the X, Y, and Z directions corresponding to the moment; Is the coordinate of the robot pose point; Is the timestamp of the previous robot pose; Is the actual acquisition timestamp;
[0028] When the average speed is greater than the speed threshold, it is high speed, and the second-order acceleration interpolation is used to obtain the robot pose corresponding to the acquisition image data moment. The second-order acceleration interpolation formula is:
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] In the formula, , , Are the ratios of the position difference and time difference between two adjacent robot pose points respectively; , , Are the accelerations in the X, Y, and Z directions respectively, estimated by the speed change rate; Represents the actual acquisition timestamp And the previous robot pose timestamp Difference
[0034] Furthermore, the speed threshold is 10mm / s.
[0035] Furthermore, in step S5, the expression of the coordinate transformation matrix is:
[0036] ;
[0037] Among them, are the three-dimensional coordinates of the feature points of the glue application trajectory in the robot base coordinate system; After interpolation and the transformation matrix composed of the corresponding postures; is the hand-eye relationship matrix between the line laser sensor and the robot; are the three-dimensional coordinates of the feature points in the line laser sensor coordinate system.
[0038] Furthermore, in step S6, the specific process includes the following steps:
[0039] Obtain the three-dimensional trajectory data of the original glue application trajectory, including the position coordinates and the attitude parameters ;
[0040] Calculate the curvature characteristics of the original glue application trajectory through cubic spline interpolation, identify the key turning points in the original glue application trajectory based on the curvature threshold, and divide the original glue application trajectory into multiple sub-segments;
[0041] Perform multi-level filtering processing on each sub-segment respectively, and use a Butterworth low-pass filter to eliminate high-frequency noise;
[0042] Then apply a median filter to suppress pulse interference, perform linear fitting on each filtered sub-segment to generate a straight trajectory segment, and at the same time retain the relevance of the attitude parameters;
[0043] Finally, calculate the transition connection points of adjacent straight trajectory segments through a spatial geometric projection algorithm, and adjust the attitude direction in combination with the Euler angle rotation matrix to generate a continuous and smooth glue application trajectory.
[0044] By means of the above technical solutions, the present invention provides a method for interpolating queue synchronization and optimization of a robot glue application trajectory based on online perception, which has at least the following beneficial effects:
[0045] 1. The present invention effectively solves the trajectory deviation caused by the mismatch between the data collected by the sensor at the current moment and the robot pose, and improves the accuracy of the glue application trajectory in cooperation with the trajectory optimization algorithm.
[0046] 2. The present invention calculates the transmission delay of the sensor and calibrates the time stamp, and combines the trajectory interpolation calculation with the sparse filtering algorithm, which significantly improves the synchronization between the line laser sensor and the robot pose reading, thereby improving the accuracy of the glue application trajectory.
[0047] 3. The present invention significantly improves the accuracy of the trajectory during the glue application trajectory planning process, enhances the coincidence degree with the theoretical trajectory, and thus effectively improves the glue application quality. Description of the Drawings
[0048] The accompanying drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0049] Figure 1 is a flowchart of the interpolation queue synchronization and optimization method for the robot gluing trajectory in the present invention;
[0050] Figure 2 is a schematic diagram of the laser sensor scanning the gluing gap in the present invention;
[0051] Figure 3 is a schematic diagram of the trajectory interpolation in the present invention;
[0052] Figure 4 is a schematic diagram of the feature points of the gluing trajectory in the present invention;
[0053] Figure 5 is a schematic diagram of the feature points of the gluing trajectory after sparse filtering optimization in the present invention;
[0054] Figure 6 is a schematic diagram of the original gluing trajectory in the present invention;
[0055] Figure 7 is a schematic diagram of the gluing trajectory after sparse filtering optimization in the present invention. Detailed Embodiment
[0056] To make the above objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Thereby, a full understanding of how the present application applies technical means to solve technical problems and achieve technical effects can be obtained and implemented accordingly.
[0057] This embodiment proposes an interpolation queue synchronization and optimization method for the robot gluing trajectory based on online perception. The line laser sensor is used to scan the gluing gap, collect the image data at the current moment, and perform timestamp calibration and delay compensation; a trajectory interpolation queue is constructed, the interpolation interval is located by the binary search method, the speeds of adjacent positions are calculated, and finally the pose at the target moment is estimated by linear interpolation. The dense gluing trajectory points calculated by scanning are optimized and fitted to generate the final gluing trajectory. This method effectively solves the trajectory deviation caused by the mismatch between the data collected by the sensor at the current moment and the robot pose, and improves the gluing trajectory accuracy in cooperation with the trajectory optimization algorithm. As Figure 1 shown, this method includes the following steps:
[0058] S1. Collect the image data and point cloud data of the gluing gap at the current moment, and perform timestamp calibration and delay compensation on the image data to obtain the actual acquisition timestamp. In this embodiment, as Figure 2As shown in the figure, image data and point cloud data are collected by a line laser sensor. At the same time, a reception timestamp is attached to the image data collected by the line laser sensor, and the actual acquisition timestamp is calculated based on the transmission delay. It is known that the frequency of the line laser sensor used is 1280 points / line, and the frame rate is 30 FPS; the robot pose output frequency is 50 Hz, and the host computer, the robot, and the line laser sensor are connected by an Ethernet cable. Thus, the transmission delay of a single frame of the line laser sensor can be calculated as:
[0059] ;
[0060] Then the actual acquisition timestamp is:
[0061] ;
[0062] Thus, the calibration of the timestamp and the delay compensation are realized to obtain the actual acquisition timestamp.
[0063] S2. The host computer receives the pose data of the robot in real time and stores it in the circular buffer area in the order of timestamps to form a trajectory interpolation queue, as Figure 3 shown. The trajectory interpolation queue is sorted based on time and maintains the position data read from the robot controller within a certain period of time. Among them, the pose data includes a timestamp , three-dimensional position and quaternion attitude , and then it is stored in the circular buffer area with a capacity of 500, and the data is sorted in ascending order according to the timestamp for efficient binary search. And the trajectory interpolation queue satisfies: the queue capacity is dynamically adjusted according to the maximum movement speed of the robot and the data frequency; the lock-free circular buffer area structure is adopted to support multi-threaded concurrent reading and writing.
[0064] S3. Locate the adjacent robot pose points in the trajectory interpolation queue according to the actual acquisition timestamp, and calculate the average movement speed of the robot based on the time interval and position difference between the robot pose points. In this embodiment, according to the calibrated actual acquisition timestamp , the adjacent robot pose points are located in the trajectory interpolation queue through binary search, where the adjacent indexes that satisfy are located in the trajectory interpolation queue. Then, based on the time interval and position difference between the robot pose points, the average speed in the X, Y, and Z directions is calculated, and finally the average movement speed of the robot is obtained. The calculation formula for the average movement speed is:
[0065] ;
[0066] ;
[0067] In the formula, is time to The average velocity in the X, Y, and Z directions between and are the coordinates of adjacent robot pose points; represents the actual acquisition timestamp and the difference from the previous robot pose timestamp .
[0068] S4. Select to use first-order linear interpolation or second-order acceleration interpolation based on the average motion velocity to obtain the robot pose corresponding to the acquisition image data time, for the synchronous mapping of point cloud data and the robot coordinate system. In this embodiment, the velocity threshold is 10 mm / s, specifically including:
[0069] Select the interpolation method according to the set velocity threshold. When the average velocity is less than or equal to the velocity threshold, it is low speed, and first-order linear interpolation is used to obtain the robot pose corresponding to the acquisition image data time. The first-order linear interpolation formula is:
[0070] ;
[0071] In the formula, is the estimated values of the position in the X, Y, and Z directions corresponding to the time; are the coordinates of the robot pose point; is the timestamp of the previous robot pose; is the actual acquisition timestamp;
[0072] When the average velocity is greater than the velocity threshold, it is high speed, and second-order acceleration interpolation is used to obtain the robot pose corresponding to the acquisition image data time. The second-order acceleration interpolation formula is:
[0073] ;
[0074] ;
[0075] ;
[0076] ;
[0077] In the formula, , , are respectively the ratios of the position difference and time difference between two adjacent robot pose points; , , are respectively the accelerations in the X, Y, and Z directions, estimated by the velocity change rate; represents the actual acquisition timestamp and the previous robot pose timestamp The difference value.
[0078] S5. Collect the point cloud data collected by the line laser sensor each time. Based on synchronous mapping, it corresponds one-to-one with the robot pose. Extract the points in the gluing gap from the point cloud data as feature points, and convert the feature points in the sensor coordinate system to the robot base coordinate system through the hand-eye calibration matrix to obtain the gluing trajectory feature points. The expression is:
[0079] ;
[0080] Where, is the three-dimensional coordinate of the gluing trajectory feature point in the robot base coordinate system; is the transformation matrix composed of after interpolation and the corresponding attitude; is the hand-eye relationship matrix between the line laser sensor and the robot; is the three-dimensional coordinate of the feature point in the line laser sensor coordinate system.
[0081] S6. Sparsify the gluing trajectory feature points and perform fitting to generate the gluing trajectory. In this embodiment, the sparse filtering algorithm is used to process all the gluing trajectory feature points, sparsify and optimize the gluing trajectory feature points into the final gluing trajectory. The specific process includes the following steps:
[0082] Obtain the three-dimensional trajectory data of the original gluing trajectory, including the position coordinates and the attitude parameters , as Figure 6 shown, is the schematic diagram of the original gluing trajectory, Figure 4 is the gluing trajectory feature point in the original gluing trajectory as Figure 4 shown.
[0083] Calculate the curvature feature of the original gluing trajectory through cubic spline interpolation, identify the key turning points in the original gluing trajectory based on the curvature threshold, and divide the original gluing trajectory into multiple sub-segments; perform multi-level filtering processing on each sub-segment respectively, use the Butterworth low-pass filter to eliminate high-frequency noise, as Figure 5 shown, are the gluing trajectory feature points after sparse filtering optimization. Then apply the median filter to suppress pulse interference, perform linear fitting on each filtered sub-segment to generate a straight line trajectory segment, and retain the relevance of the attitude parameters at the same time; finally, calculate the transition connection points of adjacent straight line trajectory segments through the space geometric projection algorithm, and adjust the attitude direction by combining the Euler angle rotation matrix to generate a continuous and smooth gluing trajectory as Figure 7 shown.
[0084] Through the interpolation synchronization processing of the sensor and robot data acquisition, the present invention improves the trajectory synchronization and makes the identification of the starting and ending points of glue application more accurate. At the same time, the sparse filtering algorithm is adopted to filter, fit, and disperse the extracted trajectory feature points to generate the point information recognizable by the host computer as the final glue application trajectory, which significantly improves the accuracy of the trajectory during the glue application trajectory planning process, enhances its coincidence with the theoretical trajectory, and thus effectively improves the glue application quality.
[0085] Those of ordinary skill in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0086] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0087] The above embodiments have introduced the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for robot glue - applying trajectory interpolation queue synchronization and optimization based on online perception, characterized in that, The method includes the following steps: S1. Collect the image data and point cloud data of the glue application gap at the current moment, and perform timestamp calibration and delay compensation on the image data to obtain the actual acquisition timestamp; S2. The host computer receives the pose data of the robot in real time and stores it in the circular buffer area in timestamp order to form a trajectory interpolation queue; S3. Locate adjacent robot pose points in the trajectory interpolation queue according to the actual acquisition timestamp, and calculate the average motion speed of the robot based on the time interval and position difference of the robot pose points; S4. Select to use first-order linear interpolation or second-order acceleration interpolation according to the average motion speed to obtain the robot pose at the corresponding image data acquisition moment; S5. Extract the points in the glue application gap from the point cloud data as feature points, and perform coordinate transformation on the feature points to obtain the glue application trajectory feature points in the robot base coordinate system; S6. Perform sparsification processing on the glue application trajectory feature points and perform fitting to generate the glue application trajectory.
2. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, wherein In step S2, it includes: Attach the reception timestamp to the image data collected by the line laser sensor, and calculate the actual acquisition timestamp according to the transmission delay. The calculation method of the transmission delay is: ; And define the actual acquisition timestamp as: .
3. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, wherein In step S2, the pose data includes a timestamp , a three-dimensional position and a quaternion attitude ; And the trajectory interpolation queue satisfies: the queue capacity is dynamically adjusted according to the maximum motion speed of the robot and the data frequency; adopt a lock-free circular buffer area structure, supporting multi-threaded concurrent reading and writing.
4. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, characterized in that In step S3, the calculation formula of the average motion speed is: ; ; In the formula, is the average velocity in the X, Y, and Z directions between and ; and are the coordinates of adjacent robot pose points; represents the actual acquisition timestamp and the difference from the previous robot pose timestamp .
5. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, wherein In step S4, it specifically includes: Select the interpolation method according to the set speed threshold. When the average motion speed is less than or equal to the speed threshold, it is low speed, and first-order linear interpolation is used to obtain the robot pose at the corresponding image data acquisition moment. The first-order linear interpolation formula is: ; In the formula, is the estimated values in the X, Y, and Z directions corresponding to the position at the moment; is the coordinate of the robot pose point; is the timestamp of the previous robot pose; is the actual acquisition timestamp; ; ; ; ; In the formula, , , are respectively the ratios of the position difference and the time difference between two adjacent robot pose points; , , are respectively the accelerations in the X, Y, and Z directions, estimated by the rate of change of velocity; represents the actual acquisition timestamp and the difference from the previous robot pose timestamp .
6. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 5, characterized in that 7. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, characterized in that ; Among them, is the three-dimensional coordinate of the glue application trajectory feature point in the robot base coordinate system; After interpolation and the transformation matrix composed of the corresponding attitude; is the hand-eye relationship matrix between the line laser sensor and the robot; is the three-dimensional coordinate of the feature point in the line laser sensor coordinate system.
8. The interpolation queue synchronization and optimization method for the robot gluing trajectory according to claim 1, characterized in that Obtain the three-dimensional trajectory data of the original glue application trajectory, including position coordinates and attitude parameters ; 9. A robot gluing system, characterized in that, 10. A computer-readable storage medium, characterized in that, A computer program is stored, which, when executed by a processor, implements the method for synchronizing and optimizing the interpolation queue of the robot gluing trajectory according to any one of claims 1-8.
Citation Information
Patent Citations
Industrial robot demonstration track recurrence method and system and robot
CN109648571A
Method and system for sampling and filtering track of health care robot based on Euclidean space distance
CN116728437A