A method and device for trajectory generation and reproduction control of a painting robot
By generating robot trajectories through remote data acquisition and cubic Bezier curve interpolation, the problem of low production efficiency under traditional teaching methods is solved, and trajectory recording and high-precision motion without stopping the machine are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HUACHENG IND CONTROL
- Filing Date
- 2026-06-08
- Publication Date
- 2026-07-31
AI Technical Summary
Current robot trajectory planning relies on manual teaching, resulting in low production efficiency and an inability to quickly adapt to product changes, requiring the robot to stop and record its trajectory.
By remotely acquiring the coordinates and attitude of the moving points, a motion trajectory is generated, and interpolation points are calculated using cubic Bezier curves and tangent vectors, enabling trajectory recording and reproduction without stopping the machine.
It reduces the switching time between different motion trajectories, improves motion accuracy and speed consistency, and enhances production efficiency.
Smart Images

Figure CN122488656A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to a method and apparatus for generating and reproducing the trajectory of a painting robot. Background Technology
[0002] Industrial automation refers to the process of achieving measurement, manipulation, and other information processing and process control in accordance with expected goals without the need for direct human intervention in machinery, equipment, or production processes.
[0003] However, current robot trajectory planning heavily relies on manual on-site teaching, where operators guide the robot's end effector along a predetermined path using a handheld teach pendant, recording key position points to form a motion program. This teaching method requires long downtime on the robot production line, severely impacting production efficiency. Furthermore, with increasing product quality requirements and expanding application scope, traditional teaching methods cannot adapt to rapid product switching and changes. Summary of the Invention
[0004] Based on this, the purpose of the present invention is to reduce the switching time between different motion trajectories and improve motion accuracy, and to provide a method for generating and reproducing the trajectory of a teachless painting robot.
[0005] A method for generating and reproducing the trajectory of a painting robot includes the following steps:
[0006] S1: Periodically collect the coordinates and orientation of the moving points relative to the reference coordinate system during the movement process to obtain the coordinates and orientation of each key point; the key points are arranged according to the collection time. S2: Calculate the control points between each adjacent key point; calculate each control point using a cubic Bezier curve. S3: Interpolate between adjacent key points based on each control point to obtain interpolation points; perform the interpolation using tangent vector calculation; S4: Select each of the interpolation points to obtain the motion trajectory; S5: Calculate the end-effector posture of the painting robot at each of the key points in the motion trajectory.
[0007] Compared to existing technologies, this invention collects and generates motion trajectories remotely, eliminating the need for the robot to stop and record trajectories, thus reducing the switching time between different motion trajectories. At the same time, by processing the key point data of the collected motion trajectory, a more detailed robot motion trajectory is obtained, ensuring that the robot maintains a consistent speed at all positions during its movement along the trajectory, thereby improving accuracy.
[0008] Furthermore, the formula for calculating the tangent vector is: , , , , , , , in, The tangent vector at the interpolation point. The direction vector formed by two adjacent interpolation points. is the length of the vectors of two adjacent nodes, and n is the length of the vector at the nth key point.
[0009] Furthermore, the expression for selecting the interpolation point is: , in, For the elements of the vector at the k-th interpolation point, For the first interpolation point, This is the second interpolation point.
[0010] Furthermore, the expression for the transformation matrix of the new pose is: , in, This serves as the reference position for initiating remote control. The posture for initiating remote control. This refers to the location of key points during remote operation. The posture of key points during remote control. This refers to the end-effector posture of the painting robot at key points.
[0011] Furthermore, let the absolute values of the first derivatives of the three Beziers all be equal to the same value, that is: .
[0012] Furthermore, the reference coordinate system is composed of reference points arranged in a triangle at the three vertices, and the coordinates of the key point are its position relative to each of the reference points.
[0013] Furthermore, the aforementioned reference points are arranged in an equilateral triangle.
[0014] Furthermore, the coordinates of the moving point are represented as follows: , , , , , , in, , and Let a represent the distances from reference points A, B, and C to the moving point, respectively, where a is the length of BC, b is the length of AC, and c is the length of AB.
[0015] Based on the same inventive concept, the present invention also includes a control device for generating and reproducing the trajectory of a painting robot, comprising: Three wire encoders are arranged in a triangle and vertically upward. The remote control module has its bottom connected to each of the pull-wire encoders via pull ropes. When the remote control module moves, it pulls each of the pull-wire encoders. The remote control module also has a gyroscope for collecting the attitude of the remote control module. The controller acquires data from each of the wire encoders and gyroscopes at a certain frequency. S1: Collect the coordinates of the moving points relative to the reference coordinate system at a certain frequency to obtain the coordinates of each key point; the key points are arranged on the left side according to time. S2: Calculate the control points between each key point and its next adjacent key point; S3: Interpolate between each of the control points and each of the adjacent key points to obtain each interpolation point; wherein the interpolation is performed using tangent vector calculation; S4: Select each of the interpolation points to obtain the motion trajectory; S5: Calculate the new posture of the robot's end effector based on the motion trajectory.
[0016] Compared to existing technologies, this invention collects and generates motion trajectories remotely, allowing the robot to record trajectories without stopping it. The generated motion trajectory can be input during use. Furthermore, by processing the key point data of the collected motion trajectory, a more detailed robot motion trajectory is obtained, ensuring that the robot maintains a consistent speed at all positions while moving along the trajectory, thus improving accuracy.
[0017] Based on the same inventive concept, the present invention also includes an electronic device comprising a processor; a memory for storing a computer program executed by the processor; wherein, when the processor executes the computer program, it implements the U-NET network for orthogonal phase gradient prediction and / or the training method for the U-NET network for orthogonal phase gradient prediction as described above.
[0018] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0019] Figure 1 This is a structural diagram of the control device of the present invention; Figure 2 This is a flowchart of the control method of the present invention.
[0020] The components include: 1. Base; 11. Cable encoder; 2. Remote control module; 21. Grip; 3. Controller. Detailed Implementation
[0021] This invention addresses the challenge of traditional teaching methods for robots, which struggle to adapt to rapid product switching and changes, as well as situations requiring downtime. It proposes a trajectory generation and reproduction control method for a painting robot. This method collects and generates complete motion trajectories via remote control, which can then be reproduced by inputting the motion trajectory into the robot. This reduces the switching time between different motion trajectories and improves motion accuracy.
[0022] Specifically, please refer to Figure 1 , Figure 1 This is a structural diagram of the control device of the present invention. The present invention also provides a control device for generating and reproducing the trajectory of a painting robot, which collects and reproduces the trajectory of remote-controlled motion. It includes a base 1, a remote-controlled module 2, and a controller 3.
[0023] The base 1 is a square platform with a horizontal upper surface and three vertically mounted pull-wire encoders 11 arranged in an equilateral triangle. Its lower surface is larger than its upper surface and has vertically penetrating screw holes for mounting and fixing. Each pull-wire encoder 11 detects and outputs the distance pulled by its pull rope 12. The three pull-wire encoders 11 form a reference coordinate system and are all connected to the remote control module 2. The coordinates of the remote control gun 2 are recorded by detecting the distance from the remote control module 2 to each pull-wire encoder 11.
[0024] The remote control module 2 is a remote control gun, with a handle 21 extending towards the base 1. The remote control gun simulates the end effector of a robot, facilitating remote operation by the user. The handle 21 contains a gyroscope; the bottom of the handle 21 is connected to three pull-wire encoders 11 via three pull cords 12, and is connected to the controller 3.
[0025] The controller 3 is connected to each of the pull-wire encoders 11 and the remote control module 2, respectively, to supply power to the pull-wire encoders 11 and the remote control module 2, and to acquire the distance encoding data of the remote control module 2 detected by each of the pull-wire encoders 11 and the data of the gyroscope in the remote control module 2.
[0026] Please see Figure 1 , Figure 1 This is a flowchart of the control method of the present invention. The spraying robot trajectory generation and reproduction control device executes the spraying robot trajectory generation and reproduction control method of the present invention, including the following specific steps: S1: Periodically collect the coordinates and orientation of the moving points relative to the reference coordinate system during the movement process to obtain the coordinates and orientation of each key point. The key points arranged in the order of collection time represent the movement process of the moving points; the coordinates of the key points represent the orientation of the end effector of the painting robot, which indicates the orientation of the end effector at that point. The reference coordinate system is composed of reference points set at the three vertices of a triangle, and the coordinates of reference point A are set as follows: The coordinates of reference point B are The coordinates of the reference point C are That is, in this triangle, BC has length a, AC has length b, and AB has length c. From this, we can obtain the coordinates of the moving point P. They are respectively: , , , , , , in, , and Let a represent the distances from each reference point of AP, BP, and CP to the moving point, and let a be the length of BC, b be the length of AC, and c be the length of AB. In this embodiment, the vertices are arranged in an equilateral triangle. In this embodiment, the key point coordinates of the moving point are acquired at a frequency of 200Hz. When the remote control module 2 is used as the moving point for remote control, as the remote control module 2 pulls each of the pull-wire encoders 11, the coordinates of the key point in the reference coordinate system are acquired; simultaneously, the angle of the remote control module is detected by the gyroscope to acquire the posture at the key point.
[0027] S2: Calculate control points between each adjacent keypoint. These control points are used to control the curve of the motion trajectory between the keypoints, and each keypoint is connected to its next adjacent keypoint by at least one control point. Each control point is calculated using a cubic Bezier curve. (The last sentence appears to be incomplete and possibly refers to a different keypoint.) And the next key point mentioned below For example, the key point is... and Calculating one intermediate control point yields two intermediate control points. Therefore, two adjacent key points determine four control points in total: the two intermediate control points and the two key points themselves. ,in, That is the key point , That is the key point , and They are respectively composed of key points and The intermediate control points are obtained. The polynomial form of the cubic Bezier curve is: , Its first derivative is: , To ensure that the velocities at the start, middle, and end points of the trajectory are equal, the absolute values of the first derivatives of the cubic Bezier curves are all equal to the same value 'a', i.e.: , The calculation yielded the following result: , , And further by The calculation yielded: , get: , Take the positive root as The value of is obtained, and further calculation is performed. and This yields four control points for the key points in this group. Then, the control points for adjacent key points in each group are calculated.
[0028] S3: Interpolate between adjacent keypoints based on each control point to obtain interpolation points. Generate a B-spline curve based on the control points between each keypoint and its next adjacent keypoint, and perform interpolation on this B-spline curve. In this step, tangent vector calculation is used for interpolation, which interpolates between adjacent keypoints to increase the point density. Each keypoint and the interpolation points form the point sequence. The calculation method for the tangent vector calculation is as follows: , , , , , , , in, The tangent vector at the interpolation point. The direction vector formed by two adjacent interpolation points. is the length of the vectors of two adjacent nodes, and n is the length of the vector at the nth key point.
[0029] S4: Select each interpolation point to obtain the motion trajectory. The selected interpolation points and the key points together form the motion trajectory. During movement, the robot moves between key points and interpolation points adjacent to each key point according to this trajectory, moving from one key point, through an intermediate interpolation point, to the next adjacent key point. Simultaneously, the posture at each interpolation point remains the same as at the previous key point, until the next key point, at which point the posture changes to the next posture. The formula for selecting the interpolation points is: , in, For the elements of the vector at the k-th interpolation point, For the first interpolation point, This is the second interpolation point.
[0030] S5: Calculate the end-effector posture of the painting robot at each of the key points in the motion trajectory. The end-effector posture is obtained by processing the current posture of the painting robot with a transformation matrix. The transformation matrix is obtained by the transformation matrix of the robot end-effector relative to the base coordinate system and the incremental transformation matrix of the motion point. The incremental transformation matrix of the motion point is: , The transformation matrix of the robot end effector relative to the base coordinate system is:
[0031] The expression for the transformation matrix of the new posture is: , in, This serves as the reference position for initiating remote control. The posture for initiating remote control. This refers to the location of key points during remote operation. The posture of key points during remote control. This refers to the end-effector posture of the painting robot at key points.
[0032] Before use, the trajectory generation and reproduction control device for the painting robot is used to move the remote control module 2 to taut the pull ropes connected to each of the pull-wire encoders 11. Then, the controller 3 supplies power to each pull-wire encoder 11 and the remote control module 2, and moves the remote control module 2 according to the desired trajectory, maintaining tautness between it and the pull ropes of the pull-wire encoders 11 during movement. As the pull-wire encoders 11 continuously collect distance data, they transmit this distance data to the controller 3 at a certain frequency for processing. The controller 3 executes this method to process the data and obtain the movement trajectory and the end effector posture of the painting robot.
[0033] Compared to existing technologies, this invention collects and generates motion trajectories remotely, eliminating the need for the robot to stop and record trajectories, thus reducing the switching time between different motion trajectories. At the same time, by processing the key point data of the collected motion trajectory, a more detailed robot motion trajectory is obtained, ensuring that the robot maintains a consistent speed at all positions during its movement along the trajectory, thereby improving accuracy.
[0034] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments and claims of this application are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that, unless otherwise stated, “a plurality” means two or more; the terms “first,” “second,” “third,” etc., are used only to distinguish and not to describe a particular order or sequence, nor should they be construed as indicating or implying relative importance. The term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items. When the above description relates to drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. In the description of this application, those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0035] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A method for generating and reproducing the trajectory of a painting robot, characterized in that, Includes the following steps: S1: Periodically collect the coordinates and orientation of the moving points relative to the reference coordinate system during the movement process to obtain the coordinates and orientation of each key point; The key points mentioned are arranged according to the time of collection; S2: Calculate the control points between each adjacent key point; calculate each control point using a cubic Bezier curve. S3: Interpolate between adjacent key points based on each control point to obtain interpolation points; perform the interpolation using tangent vector calculation; S4: Select each of the interpolation points to obtain the motion trajectory; S5: Calculate the end-effector posture of the painting robot at each of the key points in the motion trajectory.
2. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, The formula for calculating the tangent vector is: , , , , , , , in, The tangent vector at the interpolation point. The direction vector formed by two adjacent interpolation points. is the length of the vectors of two adjacent nodes, and n is the length of the vector at the nth key point.
3. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, The expression for selecting the interpolation point is: , in, For the elements of the vector at the k-th interpolation point, For the first interpolation point, This is the second interpolation point.
4. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, The expression for the transformation matrix of the new posture is: , in, This serves as the reference position for initiating remote control. The posture for initiating remote control. This refers to the location of key points during remote operation. The posture of key points during remote control. This refers to the end-effector posture of the painting robot at key points.
5. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, Let the absolute values of the first derivatives of the three Beziers all be equal to the same value, that is: 。 6. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, The reference coordinate system is composed of reference points arranged in a triangle at the three vertices, and the coordinates of the key point are its position relative to each of the reference points.
7. The method for generating and reproducing the trajectory of a painting robot according to claim 6, characterized in that, The reference points are arranged in an equilateral triangle.
8. The method for generating and reproducing the trajectory of a painting robot according to claim 1, characterized in that, The coordinates of the moving point are represented as follows: , , , , , , in, , and Let a represent the distances from reference points A, B, and C to the moving point, respectively, where a is the length of BC, b is the length of AC, and c is the length of AB.
9. A control device for generating and reproducing the trajectory of a painting robot, characterized in that, include: Three wire encoders are arranged in a triangle and vertically upward. The remote control module has its bottom connected to each of the pull-wire encoders via pull ropes. When the remote control module moves, it pulls each of the pull-wire encoders. The remote control module also has a gyroscope for collecting the attitude of the remote control module. The controller acquires data from each of the draw-wire encoders and gyroscopes at a certain frequency, and processes the data from the draw-wire encoders as follows: S1: Periodically collect the coordinates and orientation of the moving points relative to the reference coordinate system during the movement process to obtain the coordinates and orientation of each key point; the key points are arranged on the left side in order of time; S2: Calculate the control points between each key point and its next adjacent key point; S3: Interpolate between each of the control points and each of the adjacent key points to obtain each interpolation point; wherein the interpolation is performed using tangent vector calculation; S4: Select each of the interpolation points to obtain the motion trajectory; S5: Calculate the end-effector posture of the painting robot at each of the key points in the motion trajectory.
10. An electronic device, characterized in that, processor; Memory for storing computer programs executed by the processor; When the processor executes the computer program, it implements the spraying robot trajectory generation and reproduction control method according to any one of claims 1-8.