Method and system for determining dynamic spraying trajectory of a spraying robot

By establishing a dynamic workpiece coordinate system on the moving workpiece, offline planning of the spraying trajectory and real-time compensation, the problems of large calculation volume and poor real-time performance of spraying trajectory adjustment under fixed base coordinate system are solved, and the stability and accuracy of spraying quality are improved.

CN123129218APending Publication Date: 2026-11-20SHENZHEN HUACHENG IND CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611651227.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-23
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

When adjusting the spraying trajectory in real time under a fixed coordinate system, the existing method for spraying moving workpieces involves a large amount of calculation and poor real-time performance. Fluctuations in workpiece speed and deviations in the motion trajectory lead to a decrease in the relative positional accuracy between the spray gun and the workpiece, resulting in unstable dynamic spraying quality.

Method used

A dynamic workpiece coordinate system is established to move synchronously with the moving workpiece. The spraying trajectory is planned offline. Through real-time motion compensation and adaptive correction of the dynamic workpiece coordinate system, the actual spraying trajectory of the spraying robot in the robot base coordinate system is calculated, reducing the amount of real-time calculation and adapting to non-uniform workpiece motion and trajectory deviation.

Benefits of technology

It improves the stability of spraying quality, ensures the relative positional accuracy between the spray gun tip and the workpiece, reduces the amount of real-time calculation, and enhances the real-time performance and accuracy of dynamic spraying.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129218A_ABST
    Figure CN123129218A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot spraying track planning, and provides a dynamic spraying track determination method and system of a spraying robot. The method establishes a dynamic workpiece coordinate system that moves synchronously with a mobile workpiece by taking the mobile workpiece as a coordinate origin, acquires an offline spraying track that is pre-planned in the dynamic workpiece coordinate system, collects workpiece motion states including a real-time position, a real-time speed and a real-time posture of the workpiece, calculates a coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to a robot base coordinate system, uniformly converts the offline spraying track to obtain an actual spraying track under the robot base coordinate system, and reconverts the actual spraying track after performing adaptive correction on the dynamic workpiece coordinate system according to a real-time speed fluctuation amount and a track deviation amount, so that the spraying robot can perform a spraying operation according to the actual spraying track. The method reduces the calculation amount of a control cycle and improves the relative position accuracy of dynamic spraying.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of spraying trajectory planning technology, and in particular to a method and system for determining the dynamic spraying trajectory of a spraying robot. Background Technology

[0002] Current methods for spraying moving workpieces mostly involve real-time adjustment of the spraying trajectory in a fixed coordinate system. When the workpiece is in continuous motion, all trajectory points need to be recalculated repeatedly based on the workpiece position within the control cycle, resulting in a large computational load and poor real-time performance. When there are fluctuations in workpiece speed or deviations in the motion trajectory, the trajectory adjustment in the fixed coordinate system lags, the relative position accuracy between the spray gun and the workpiece decreases, and the dynamic spraying quality becomes unstable. Summary of the Invention

[0003] This application provides a method and system for determining the dynamic spraying trajectory of a spraying robot, aiming to solve the problems of existing mobile workpiece spraying where the spraying trajectory is adjusted in real time under a fixed base coordinate system, and when the workpiece is in continuous motion, all trajectory points need to be repeatedly recalculated according to the workpiece position within the control cycle, resulting in large computational load and poor real-time performance.

[0004] In a first aspect, embodiments of this application provide a method for determining the dynamic spraying trajectory of a spraying robot, applied to a spraying robot performing spraying operations on a moving workpiece, comprising: A dynamic workpiece coordinate system is established with the moving workpiece as the origin, and the workpiece moves synchronously with the moving workpiece. The offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system is obtained. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. The workpiece motion state is collected, including the real-time position, real-time speed and real-time posture of the workpiece. The coordinate system motion transformation of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot is calculated based on the workpiece motion state. The offline spraying trajectory under the dynamic workpiece coordinate system is converted according to the coordinate system motion transformation to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. The spraying robot follows the moving workpiece to perform spraying through real-time motion compensation of the dynamic workpiece coordinate system. Based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, the dynamic workpiece coordinate system is adaptively corrected, the coordinate system motion transformation is updated, and the actual spraying trajectory is recalculated. The actual spraying trajectory is then sent to the controller of the spraying robot, which controls the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

[0005] In some embodiments, establishing a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the origin, and obtaining the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, includes: identifying preset feature points on the moving workpiece using a vision sensor, and determining the preset feature points as the origin of the dynamic workpiece coordinate system; establishing a dynamic workpiece coordinate system with the conveyor belt movement direction as the first coordinate axis and the direction perpendicular to the conveyor belt movement direction and parallel to the workpiece surface as the second coordinate axis; the dynamic workpiece coordinate system synchronously translating and rotating with the moving workpiece during the conveyor belt movement; and obtaining a pre-stored offline spraying trajectory, where each trajectory point in the offline spraying trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system.

[0006] In some embodiments, the offline spraying trajectory is pre-planned in a dynamic workpiece coordinate system, including: acquiring the 3D model of the moving workpiece and the spraying process requirements, the spraying process requirements including coating thickness requirements and spraying path spacing requirements; using the 3D model of the workpiece as the planning object, planning the gun path of the spray gun in the dynamic workpiece coordinate system, the gun path including multiple parallel spraying trajectory lines and the connection path between the spraying trajectory lines; determining the position of each trajectory point on the gun path in the dynamic workpiece coordinate system, the spray gun movement speed and the spray gun posture; storing the offline spraying trajectory containing the trajectory point position, the spray gun movement speed and the spray gun posture to the spraying robot controller, and repeatedly calling the same set of offline spraying trajectories for the same type of moving workpiece.

[0007] In some embodiments, the acquisition of the workpiece motion state, including the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture, includes: acquiring workpiece images of the moving workpiece at a fixed sampling period using a vision sensor, identifying the image coordinates of preset feature points in the workpiece image, and converting the image coordinates to obtain the workpiece real-time position; acquiring the conveyor belt running speed using a conveyor belt encoder and determining the conveyor belt running speed as the workpiece real-time speed; determining the workpiece real-time posture based on the angle between the contour direction of the moving workpiece in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system; and synchronizing the acquisition data from the vision sensor and the conveyor belt encoder, and combining the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture at the same moment into the workpiece motion state.

[0008] In some embodiments, calculating the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the workpiece motion state includes: determining the coordinate system translation amount of the origin of the dynamic workpiece coordinate system in the base coordinate system of the painting robot based on the real-time position of the workpiece; determining the coordinate system rotation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the real-time attitude of the workpiece; predicting the expected translation amount of the origin of the dynamic workpiece coordinate system in the next control cycle based on the real-time speed of the workpiece; expressing the coordinate system translation amount, the coordinate system rotation amount, and the expected translation amount as a homogeneous coordinate transformation matrix of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot, and determining the homogeneous coordinate transformation matrix as the coordinate system motion transformation amount.

[0009] In some embodiments, the step of performing coordinate system transformation on the offline spraying trajectory in the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system includes: representing the trajectory point position, spray gun movement speed and spray gun attitude of each trajectory point in the offline spraying trajectory as a homogeneous trajectory vector in the dynamic workpiece coordinate system; performing matrix multiplication operation on the homogeneous trajectory vector and the coordinate system motion transformation amount to uniformly transform each trajectory point to the spraying robot base coordinate system; extracting the actual trajectory position, actual movement speed and actual spray gun attitude of each trajectory point in the spraying robot base coordinate system from the matrix multiplication operation result; re-performing the uniform transformation according to the updated coordinate system motion transformation amount in each control cycle, arranging the transformed trajectory points in chronological order to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system.

[0010] In some embodiments, the step of enabling the painting robot to follow the moving workpiece for painting through real-time motion compensation of the dynamic workpiece coordinate system includes: sending the actual painting trajectory calculated in each control cycle to the painting robot controller in real time; the painting robot controller controlling the end of the spray gun to move to the actual trajectory position corresponding to the actual painting trajectory; when the moving workpiece translates or rotates during the movement of the conveyor belt, the dynamic workpiece coordinate system moves synchronously with the moving workpiece, the coordinate system motion transformation is updated accordingly, and the actual painting trajectory shifts synchronously with the coordinate system motion transformation in the base coordinate system of the painting robot; controlling the relative position between the end of the spray gun and the moving workpiece to maintain the positional relationship planned by the offline painting trajectory, and completing the following painting of the moving workpiece through real-time motion compensation of the dynamic workpiece coordinate system; and not replanning the offline painting trajectory in the dynamic workpiece coordinate system during the following painting process.

[0011] In some embodiments, the step of adaptively correcting the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, updating the coordinate system motion transformation, and recalculating the actual spraying trajectory includes: comparing the workpiece's real-time speed with the conveyor belt's rated speed to obtain the fluctuation of the workpiece's real-time speed; comparing the workpiece's real-time position with the expected position of the workpiece extrapolated according to the conveyor belt's rated speed to obtain the deviation of the moving workpiece's trajectory; when the fluctuation of the workpiece's real-time speed exceeds a preset speed fluctuation limit, correcting the expected translation of the origin of the dynamic workpiece coordinate system based on the fluctuation; when the deviation of the moving workpiece's trajectory exceeds a preset trajectory deviation limit, correcting the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system based on the trajectory deviation; updating the coordinate system motion transformation based on the corrected dynamic workpiece coordinate system, and recalculating the offline spraying trajectory according to the updated coordinate system motion transformation to obtain the corrected actual spraying trajectory.

[0012] In some embodiments, sending the actual spraying trajectory to the controller of the spraying robot and controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory includes: performing inverse kinematics calculations on the actual trajectory position, actual movement speed, and actual spray gun posture of each trajectory point in the actual spraying trajectory to obtain joint position commands and joint speed commands for each joint of the spraying robot; sending the joint position commands and joint speed commands to the controller of the spraying robot according to the control cycle, so that the controller drives the movement of each joint of the spraying robot; when the end of the spray gun enters the spraying area of ​​the moving workpiece, controlling the spray gun to turn on and adjusting the paint flow rate according to the actual movement speed; when the end of the spray gun leaves the spraying area, controlling the spray gun to turn off; and controlling the spraying robot to perform spraying operations on the continuously arriving moving workpieces on the conveyor belt according to the actual spraying trajectory.

[0013] Secondly, this application provides a dynamic spraying trajectory determination system for a spraying robot, the system comprising: The status acquisition unit is used to establish a dynamic workpiece coordinate system with the moving workpiece as the coordinate origin, and to acquire the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. The workpiece motion state is acquired, including the real-time position, real-time speed and real-time posture of the workpiece. The spraying execution unit is used to calculate the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot according to the workpiece motion state, and to perform coordinate system one conversion on the offline spraying trajectory under the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. Through real-time motion compensation of the dynamic workpiece coordinate system, the spraying robot follows the moving workpiece to perform spraying. The job execution unit is used to adaptively correct the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, update the coordinate system motion transformation, and recalculate the actual spraying trajectory; it then sends the actual spraying trajectory to the controller of the spraying robot, controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

[0014] The method provided in this application has the following beneficial effects: 1. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. During the control cycle, only coordinate system motion compensation and unified conversion are performed, reducing the amount of real-time calculation. 2. The coordinate system of the dynamic workpiece is adaptively corrected based on the real-time speed fluctuation and trajectory deviation of the workpiece to adapt to the non-uniform motion and trajectory offset of the moving workpiece. 3. Ensure the relative positional accuracy between the spray gun tip and the moving workpiece to improve the stability of dynamic spraying quality.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic flowchart illustrating the steps of a method for determining the dynamic spraying trajectory of a spraying robot according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the principle of a method for determining the dynamic spraying trajectory of a spraying robot according to an embodiment of this application; Figure 3 This is a schematic block diagram of a dynamic spraying trajectory determination system for a spraying robot provided in one embodiment of this application; Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0021] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0022] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0023] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0024] Current methods for spraying moving workpieces mostly involve real-time adjustment of the spraying trajectory in a fixed coordinate system. When the workpiece is in continuous motion, all trajectory points need to be recalculated repeatedly based on the workpiece position within the control cycle, resulting in a large computational load and poor real-time performance. When there are fluctuations in workpiece speed or deviations in the motion trajectory, the trajectory adjustment in the fixed coordinate system lags, the relative position accuracy between the spray gun and the workpiece decreases, and the dynamic spraying quality becomes unstable.

[0025] To solve the above problem, please refer to Figure 1 and Figure 2This application provides a method for determining the dynamic spraying trajectory of a spraying robot, applicable to a spraying robot performing spraying operations on moving workpieces. The spraying robot system includes a spraying robot, a conveyor belt, a vision sensor, a conveyor belt encoder, and a spraying robot controller. The spraying robot controller includes a processor and a memory. The memory stores offline spraying trajectories, coordinate transformation programs, and trajectory calculation programs. The processor executes the programs to implement the method steps provided in this application. It should be noted that all information involved in the method provided in this application is extracted with the authorization of the relevant users and in accordance with relevant regulations, and will not infringe on user privacy.

[0026] Please refer to Figure 2 The dynamic spraying trajectory determination system involved in this application includes a robot base coordinate system, a dynamic workpiece coordinate system, a workpiece motion state acquisition module, an offline spraying trajectory planning module, a coordinate system motion transformation calculation module, a coordinate system conversion module, an actual spraying trajectory output module, and a spraying robot controller module. The robot base coordinate system is a stationary coordinate system fixed to the spraying robot base; the dynamic workpiece coordinate system uses the moving workpiece as its origin and moves synchronously with the moving workpiece; the workpiece motion state acquisition module acquires the real-time position, real-time speed, and real-time attitude of the workpiece; the offline spraying trajectory planning module is located within the dynamic workpiece coordinate system, and the offline spraying trajectory is pre-planned within the dynamic workpiece coordinate system; the coordinate system motion transformation calculation module calculates the coordinate system motion transformation of the dynamic workpiece coordinate system relative to the robot base coordinate system; the coordinate system conversion module converts the offline spraying trajectory into the actual spraying trajectory under the robot base coordinate system; the actual spraying trajectory output module sends the actual spraying trajectory to the spraying robot controller module; the workpiece speed fluctuation and trajectory deviation are fed back to the spraying robot controller module for adaptive correction of the dynamic workpiece coordinate system.

[0027] The provided method for determining the dynamic spraying trajectory of the spraying robot includes steps S101 to S103. Details are as follows: Please refer to Figure 1 The dynamic spraying trajectory determination method for a spraying robot provided in this application includes steps S101 to S103. The technical details and specific implementation methods of steps S101 to S103 are described below.

[0028] Step S101. Establish a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the origin. Obtain the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. Collect the workpiece motion state of the moving workpiece, which includes the real-time position, real-time speed and real-time posture of the workpiece.

[0029] Specifically, step S101 is the stage of establishing a dynamic workpiece coordinate system, acquiring offline trajectory, and collecting workpiece motion status. Unlike the method of recalculating all trajectory points in real time under a fixed base coordinate system, this application transfers the planning reference of the spraying trajectory from the static space to a dynamic workpiece coordinate system that moves with the workpiece: the vision sensor identifies preset feature points on the moving workpiece, determines the preset feature points as the origin of the dynamic workpiece coordinate system, and establishes a dynamic workpiece coordinate system with the direction of the conveyor belt movement as the first coordinate axis and the direction perpendicular to the direction of the conveyor belt movement and parallel to the workpiece surface as the second coordinate axis. The dynamic workpiece coordinate system translates and rotates synchronously with the moving workpiece during the movement of the conveyor belt.

[0030] The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system using the workpiece's 3D model as the object before the spraying operation. The offline spraying trajectory includes multiple parallel spraying trajectory segments and connecting paths. Each trajectory point records its position, spray gun speed, and spray gun posture in the dynamic workpiece coordinate system. The same set of offline spraying trajectories is repeatedly used for the same model of moving workpiece, and the offline spraying trajectory does not change during the workpiece conveying process. After the workpiece enters the spraying station, the vision sensor acquires workpiece images at a fixed sampling period and identifies preset feature points to obtain the workpiece's real-time position. The conveyor belt encoder acquires the conveyor belt speed as the workpiece's real-time speed. The real-time posture of the workpiece is determined by the angle between the workpiece contour direction in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system. The three data sources are synchronized in time and synthesized into the workpiece motion state. Since the spraying trajectory is fixed in the following coordinate system, the controller does not need to repeatedly recalculate the trajectory shape based on the workpiece position; it only needs to calculate the motion transformation of the coordinate system itself.

[0031] Step S102. Calculate the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot according to the workpiece motion state. Perform coordinate system transformation on the offline spraying trajectory under the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. Through real-time motion compensation of the dynamic workpiece coordinate system, the spraying robot follows the moving workpiece to perform spraying.

[0032] Specifically, step S102 is the stage of calculating coordinate system motion transformation and trajectory unification. The painting robot controller determines the coordinate system translation of the origin of the dynamic workpiece coordinate system in the robot base coordinate system based on the real-time position of the workpiece, determines the coordinate system rotation of the dynamic workpiece coordinate system relative to the robot base coordinate system based on the real-time posture of the workpiece, and predicts the expected translation of the origin of the coordinate system in the next control cycle based on the real-time speed of the workpiece. The coordinate system translation, coordinate system rotation, and expected translation are expressed as a homogeneous coordinate transformation matrix of the dynamic workpiece coordinate system relative to the robot base coordinate system. The homogeneous coordinate transformation matrix is ​​the coordinate system motion transformation.

[0033] The spraying robot controller represents the position of each trajectory point, the speed of the spray gun, and the attitude of the spray gun in the offline spraying trajectory as a homogeneous trajectory vector in the dynamic workpiece coordinate system. The homogeneous trajectory vector and the coordinate system motion transformation are subjected to matrix multiplication. Each trajectory point is uniformly transformed to the robot base coordinate system through one matrix multiplication. The actual trajectory position, actual speed, and actual spray gun attitude are extracted from the matrix multiplication result. In each control cycle, the uniform transformation is re-performed according to the updated coordinate system motion transformation. The trajectory points obtained by the transformation are arranged in chronological order to form the actual spraying trajectory.

[0034] The actual spraying trajectory shifts synchronously with the coordinate system's motion transformation in the robot's base coordinate system: when the workpiece translates, the actual spraying trajectory translates along with the workpiece; when the workpiece rotates, the actual spraying trajectory rotates along with the workpiece. The spraying robot controller sends the actual spraying trajectory to the robot controller cycle by cycle, controlling the spray gun tip to move to the actual trajectory position. The relative position between the spray gun tip and the moving workpiece always maintains the positional relationship planned by the offline spraying trajectory. This is equivalent to the dynamic workpiece coordinate system moving together with the offline spraying trajectory. The spraying robot completes the following spraying of the moving workpiece through real-time motion compensation of the dynamic workpiece coordinate system. During the following spraying process, the offline spraying trajectory in the dynamic workpiece coordinate system is not replanned. The trajectory shape calculation is decoupled from the workpiece motion compensation, resulting in small single-cycle calculation and good real-time performance.

[0035] Step S103. Based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, perform adaptive correction on the dynamic workpiece coordinate system, update the coordinate system motion transformation, and recalculate the actual spraying trajectory; send the actual spraying trajectory to the controller of the spraying robot, and control the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

[0036] Specifically, step S103 is the dynamic coordinate system adaptive correction and spraying execution stage. During the conveyor belt's operation, speed fluctuations occur, and the workpiece may slip or deviate on the conveyor belt, causing a deviation between the actual workpiece movement and its rated movement. The spraying robot controller compares the workpiece's real-time speed with the conveyor belt's rated speed to obtain the workpiece's real-time speed fluctuation, and compares the workpiece's real-time position with the expected position extrapolated from the conveyor belt's rated speed to obtain the workpiece's trajectory deviation.

[0037] When the real-time speed fluctuation of the workpiece exceeds the preset speed fluctuation limit, the painting robot controller corrects the expected translation of the origin of the dynamic workpiece coordinate system based on the fluctuation, ensuring that the predicted speed term in the coordinate system motion transformation tracks the actual speed. When the trajectory deviation of the moving workpiece exceeds the preset trajectory deviation limit, the painting robot controller corrects the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system based on the trajectory deviation, eliminating coordinate system deviations caused by workpiece slippage or offset. The painting robot controller updates the coordinate system motion transformation based on the corrected dynamic workpiece coordinate system and recalculates the offline painting trajectory according to the updated coordinate system motion transformation to obtain the corrected actual painting trajectory. Each trajectory point in the corrected actual painting trajectory is calculated using inverse kinematics to obtain joint position and joint speed commands, which are sent to the painting robot controller according to the control cycle to drive the movement of each joint. When the end of the spray gun enters the painting area of ​​the moving workpiece, the spray gun is turned on and the paint flow rate is adjusted in conjunction with the actual movement speed. When it leaves the painting area, the spray gun is turned off. The painting robot sequentially performs painting operations on the continuously arriving moving workpieces on the conveyor belt.

[0038] In some embodiments, establishing a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the origin, and obtaining the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, includes: identifying preset feature points on the moving workpiece using a vision sensor, and determining the preset feature points as the origin of the dynamic workpiece coordinate system; establishing a dynamic workpiece coordinate system with the conveyor belt movement direction as the first coordinate axis and the direction perpendicular to the conveyor belt movement direction and parallel to the workpiece surface as the second coordinate axis; the dynamic workpiece coordinate system synchronously translating and rotating with the moving workpiece during the conveyor belt movement; and obtaining a pre-stored offline spraying trajectory, where each trajectory point in the offline spraying trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system.

[0039] Specifically, after the moving workpiece enters the field of view of the vision sensor, the vision sensor acquires an image of the workpiece. The spraying robot controller performs feature recognition on the workpiece image. The preset feature points can be the center of the positioning hole, the positioning corner point, the process reference point, or the center of a specially set positioning mark on the workpiece surface. When multiple preset feature points are set on the workpiece, the coordinate axis direction is determined by connecting two preset feature points with the main feature point as the origin. The first coordinate axis of the dynamic workpiece coordinate system is taken in the direction of the conveyor belt movement (longitudinal), the second coordinate axis is taken in the direction perpendicular to the direction of the conveyor belt movement and parallel to the workpiece surface (lateral), and the third coordinate axis is determined by the right-hand rule and is perpendicular to the workpiece surface. When the workpiece has a posture deflection on the conveyor belt, the coordinate axes of the dynamic workpiece coordinate system rotate synchronously with the workpiece contour direction. That is, the dynamic workpiece coordinate system maintains a rigid posture relationship with the workpiece. When the workpiece translates, the coordinate system translates; when the workpiece rotates, the coordinate system rotates.

[0040] The process of establishing the dynamic workpiece coordinate system is as follows: The painting robot controller converts the image coordinates of preset feature points into spatial coordinates in the robot base coordinate system based on the calibration parameters of the vision sensor, which serves as the initial position of the origin of the dynamic workpiece coordinate system. Based on the direction vector of the conveyor belt's movement direction in the robot base coordinate system and the workpiece contour direction, the direction vectors of the three coordinate axes of the dynamic workpiece coordinate system in the robot base coordinate system are determined. The initial pose of the dynamic workpiece coordinate system is formed by the origin position and the coordinate axis directions. Subsequently, the pose of the dynamic workpiece coordinate system is updated in each control cycle based on the workpiece's motion state. The painting robot controller retrieves pre-stored offline painting trajectories from its memory. These offline painting trajectories are stored in association with the workpiece model, and each trajectory point in the offline painting trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system (including three-dimensional position coordinates and attitude parameters). After visually recognizing the workpiece model, the corresponding offline painting trajectory is automatically retrieved. The dynamic workpiece coordinate system separates "where the workpiece is and how it moves" from "how the spray gun paints relative to the workpiece" into two independent questions. The offline painting trajectory only describes relative motion, while the coordinate system motion describes the absolute motion of the workpiece.

[0041] In some embodiments, the offline spraying trajectory is pre-planned in a dynamic workpiece coordinate system, including: acquiring the 3D model of the moving workpiece and the spraying process requirements, the spraying process requirements including coating thickness requirements and spraying path spacing requirements; using the 3D model of the workpiece as the planning object, planning the gun path of the spray gun in the dynamic workpiece coordinate system, the gun path including multiple parallel spraying trajectory lines and the connection path between the spraying trajectory lines; determining the position of each trajectory point on the gun path in the dynamic workpiece coordinate system, the spray gun movement speed and the spray gun posture; storing the offline spraying trajectory containing the trajectory point position, the spray gun movement speed and the spray gun posture to the spraying robot controller, and repeatedly calling the same set of offline spraying trajectories for the same type of moving workpiece.

[0042] Specifically, the offline spraying trajectory is completed during the process planning stage before spraying production. The spraying robot controller or upstream process planning equipment acquires the 3D model of the moving workpiece, which includes the geometry, boundaries, and feature positions of the workpiece surface to be sprayed; at the same time, it acquires the spraying process requirements, including parameters such as the target coating thickness and allowable thickness deviation (coating thickness requirements), the spraying path spacing between the center lines of adjacent spraying trajectories, the spray gun height, the spray gun spray angle, the paint flow rate, and the spray width.

[0043] The trajectory planning uses the 3D model of the workpiece as the planning object and is performed within a dynamic workpiece coordinate system. Based on the boundary of the surface to be coated and the distance between the spray path, the planning equipment arranges multiple parallel spray trajectory segments in the coordinate plane of the dynamic workpiece coordinate system. These spray trajectory segments cover the entire surface to be coated, and adjacent spray trajectory segments maintain a set overlap rate. Connection paths are planned between the ends of the spray trajectory segments. These connection paths can use straight transitions, circular transitions, or gun-lifting jump paths. On the connection paths, the spray gun is closed or maintains a low flow rate. For curved workpieces, the gun path unfolds along the surface parameter lines, and the spray gun posture is determined point-by-point according to the target angle between the spray gun's spray axis and the normal to the workpiece surface.

[0044] The planning equipment discretizes the spray gun path according to a fixed trajectory point spacing, determining the position (x, y, z) of each trajectory point in the dynamic workpiece coordinate system, the spray gun speed (the speed of the spray gun relative to the workpiece; the speed is uniform for straight sections and varies according to process requirements for corners and curved sections), and the spray gun attitude (the attitude angle of the spray gun relative to the workpiece surface). The trajectory points also include the spray gun on / off status and paint flow command. The complete offline spraying trajectory is stored in the memory of the spraying robot controller after being verified by process simulation (collision check, coating thickness simulation, and accessibility check). The offline spraying trajectory is associated with the workpiece model and the workpiece 3D model version. When mass-producing the same model of moving workpiece, the same set of offline spraying trajectories is repeatedly called, without replanning due to differences in the position and speed of the workpiece on the conveyor belt. Process consistency is guaranteed by the same offline spraying trajectory, and all differences in workpiece movement are absorbed by the motion transformation of the dynamic workpiece coordinate system.

[0045] In some embodiments, the acquisition of the workpiece motion state, including the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture, includes: acquiring workpiece images of the moving workpiece at a fixed sampling period using a vision sensor, identifying the image coordinates of preset feature points in the workpiece image, and converting the image coordinates to obtain the workpiece real-time position; acquiring the conveyor belt running speed using a conveyor belt encoder and determining the conveyor belt running speed as the workpiece real-time speed; determining the workpiece real-time posture based on the angle between the contour direction of the moving workpiece in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system; and synchronizing the acquisition data from the vision sensor and the conveyor belt encoder, and combining the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture at the same moment into the workpiece motion state.

[0046] Specifically, the real-time position acquisition method for the workpiece is as follows: the vision sensor continuously images the tracking area of ​​the conveyor belt at a fixed sampling period (the frame rate corresponds to the period). The spraying robot controller identifies the image coordinates of preset feature points in each frame of the workpiece image. Based on the intrinsic parameters of the vision sensor, the pixel coordinates are converted into normalized image plane coordinates. Then, based on the calibration extrinsic parameters of the vision sensor relative to the robot base coordinate system (installation position and attitude) and the equation of the workpiece surface plane, the image coordinates are converted into three-dimensional coordinates in the robot base coordinate system by intersecting the ray and the plane. These three-dimensional coordinates are the real-time position of the workpiece at the origin of the dynamic workpiece coordinate system. For workpieces with multiple feature points, a more stable origin position is obtained by jointly adjusting the coordinates of multiple feature points.

[0047] The real-time workpiece speed acquisition method is as follows: The conveyor belt encoder is installed on the drive wheel or driven roller shaft of the conveyor belt. The conveyor belt encoder outputs a pulse sequence. The painting robot controller counts the pulses and converts them into the conveyor belt running speed according to the diameter of the drive wheel and the number of pulses per revolution. The conveyor belt running speed when there is no relative slippage between the workpiece and the surface of the conveyor belt is determined as the real-time workpiece speed. The real-time workpiece speed is provided according to the control cycle, and the time resolution is higher than the visual frame rate. The real-time workpiece posture acquisition method is as follows: The painting robot controller extracts the contour direction of the moving workpiece (e.g., the edge straight line direction of the two positioning edges of the workpiece) from the workpiece image, calculates the angle between the contour direction and the coordinate axis of the dynamic workpiece coordinate system (or the direction of conveyor belt movement), and this angle is the deflection angle of the workpiece relative to the standard placement direction, which constitutes the real-time posture of the workpiece. For workpieces with identifiable three-dimensional posture, the pitch and tilt components of the workpiece can also be calculated by combining the spatial distribution of multiple feature points.

[0048] The time synchronization and state synthesis method is as follows: The painting robot controller performs time synchronization on the data collected by the vision sensor and the conveyor encoder based on the control cycle. The vision data is aligned to the control cycle according to the image timestamp, and encoder speed interpolation is used between the vision positions of two adjacent frames. The conveyor encoder data is updated frequently within the vision cycle. The painting robot controller synthesizes the real-time position, real-time speed, and real-time posture of the workpiece at the same moment into a set of workpiece motion states. The workpiece motion states are stored and output in sequence according to the control cycle. For cycles where the vision frame rate is lower than the control cycle, the real-time position of the workpiece is calculated from the previous frame's vision position and the workpiece's real-time speed. After the next frame's vision position arrives, the calculated position is corrected to ensure that the workpiece motion state is updated in each control cycle.

[0049] In some embodiments, calculating the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the workpiece motion state includes: determining the coordinate system translation amount of the origin of the dynamic workpiece coordinate system in the base coordinate system of the painting robot based on the real-time position of the workpiece; determining the coordinate system rotation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the real-time attitude of the workpiece; predicting the expected translation amount of the origin of the dynamic workpiece coordinate system in the next control cycle based on the real-time speed of the workpiece; expressing the coordinate system translation amount, the coordinate system rotation amount, and the expected translation amount as a homogeneous coordinate transformation matrix of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot, and determining the homogeneous coordinate transformation matrix as the coordinate system motion transformation amount.

[0050] Specifically, the coordinate system translation is determined as follows: the real-time position coordinates (X0, Y0, Z0) of the workpiece at the origin (preset feature point) of the dynamic workpiece coordinate system in the robot base coordinate system is the coordinate system translation. The coordinate system translation describes the spatial offset of the dynamic workpiece coordinate system relative to the origin of the robot base coordinate system, and is updated with each control cycle as the workpiece is transported. The coordinate system rotation is determined as follows: a rotation matrix of the dynamic workpiece coordinate system relative to the robot base coordinate system is constructed based on the deflection angle (and pitch and tilt components) in the real-time posture of the workpiece. When the workpiece is in standard orientation, the rotation matrix only includes the fixed installation angle between the conveyor belt movement direction and the coordinate axes of the robot base coordinate system. When the workpiece undergoes posture deflection, the rotation matrix is ​​superimposed with the workpiece deflection angle on top of the fixed installation angle. The coordinate system rotation describes the direction of the coordinate axes of the dynamic workpiece coordinate system.

[0051] The prediction method for the expected translation is as follows: Let the position of the origin of the coordinate system in the current control cycle be P(t), the real-time velocity vector of the workpiece be v(t), and the control cycle duration be Δt. Then, the expected translation of the origin of the coordinate system in the next control cycle is P(t+Δt) = P(t) + v(t). Δt; When the workpiece's real-time speed experiences acceleration or deceleration, an acceleration term is further introduced to correct the expected translation. The expected translation is used to calculate the coordinate system position one control cycle in advance, compensating for the total delay introduced by visual sampling, coordinate conversion, and robot servo response, so that the actual arrival time of the spray gun's end effector is aligned with the expected position in the coordinate system.

[0052] The coordinate system motion transformation is represented as follows: The painting robot controller assembles the coordinate system translation, rotation, and expected translation into a 4x4 homogeneous coordinate transformation matrix. The top 3x3 columns of the homogeneous coordinate transformation matrix represent the coordinate system rotation, the first 3 elements of the fourth column represent the coordinate system translation (or predicted position when using expected translation), and the fourth row contains fixed values. This homogeneous coordinate transformation matrix completely describes the pose and motion of the dynamic workpiece coordinate system relative to the robot's base coordinate system, and is thus defined as the coordinate system motion transformation. Since the dynamic workpiece coordinate system is fixed relative to the workpiece, a single homogeneous coordinate transformation matrix can describe the entire motion of the workpiece coordinate system without any adjustment to the shape of the offline painting trajectory. The coordinate system motion transformation is recalculated once per control cycle and output to the coordinate system conversion module.

[0053] In some embodiments, the step of performing coordinate system transformation on the offline spraying trajectory in the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system includes: representing the trajectory point position, spray gun movement speed and spray gun attitude of each trajectory point in the offline spraying trajectory as a homogeneous trajectory vector in the dynamic workpiece coordinate system; performing matrix multiplication operation on the homogeneous trajectory vector and the coordinate system motion transformation amount to uniformly transform each trajectory point to the spraying robot base coordinate system; extracting the actual trajectory position, actual movement speed and actual spray gun attitude of each trajectory point in the spraying robot base coordinate system from the matrix multiplication operation result; re-performing the uniform transformation according to the updated coordinate system motion transformation amount in each control cycle, arranging the transformed trajectory points in chronological order to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system.

[0054] Specifically, the homogeneous trajectory vector is constructed as follows: the position (x, y, z) of each trajectory point in the offline spraying trajectory in the dynamic workpiece coordinate system is represented as the transpose of the four-dimensional homogeneous position vector [x, y, z, 1]. The spray gun attitude is represented by the attitude rotation matrix or attitude angle in the dynamic workpiece coordinate system, and the spray gun speed is the relative travel speed vector in the dynamic workpiece coordinate system. The coordinate system conversion method is as follows: the spraying robot controller performs a matrix multiplication operation on the position homogeneous vector and the coordinate system motion transformation quantity. The first three elements of the matrix multiplication result are the actual trajectory position of the trajectory point in the robot base coordinate system. The spray gun attitude rotation matrix is ​​compositely transformed through the rotation part of the coordinate system motion transformation quantity to obtain the actual spray gun attitude. The actual movement speed is composed of two parts: one part is the relative movement speed of the spray gun relative to the dynamic workpiece coordinate system in the offline spraying trajectory, which is transformed to the base coordinate system through the rotation matrix; the other part is the entrainment movement speed of the dynamic workpiece coordinate system itself (i.e., the real-time speed of the workpiece). The two speed vectors are added together to obtain the actual movement speed of the spray gun end in the robot base coordinate system.

[0055] The unified conversion execution rhythm is as follows: the number and shape of trajectory points in the offline spraying trajectory are fixed, but the dynamic workpiece coordinate system pose is different in each control cycle. Therefore, in each control cycle, the spraying robot controller re-performs the unified conversion for one or more trajectory points that need to be executed, based on the updated coordinate system motion transformation. That is, the same offline trajectory point obtains different base coordinate system positions as the coordinate system moves during the conversion in different control cycles. The controller sequentially takes the offline spraying trajectory points according to the spraying time rhythm, and arranges the converted actual trajectory position, actual motion speed, and actual spray gun posture in chronological order to obtain the actual spraying trajectory in the robot's base coordinate system. Compared with replanning all trajectories point by point according to the workpiece position in a fixed coordinate system, this method only requires one homogeneous matrix multiplication and velocity synthesis in each cycle. The computational load is independent of the number of offline trajectory points and only related to the number of trajectory points currently being executed. The computational delay is determined, meeting the real-time requirements of high-speed conveying conditions.

[0056] In some embodiments, the step of enabling the painting robot to follow the moving workpiece for painting through real-time motion compensation of the dynamic workpiece coordinate system includes: sending the actual painting trajectory calculated in each control cycle to the painting robot controller in real time; the painting robot controller controlling the end of the spray gun to move to the actual trajectory position corresponding to the actual painting trajectory; when the moving workpiece translates or rotates during the movement of the conveyor belt, the dynamic workpiece coordinate system moves synchronously with the moving workpiece, the coordinate system motion transformation is updated accordingly, and the actual painting trajectory shifts synchronously with the coordinate system motion transformation in the base coordinate system of the painting robot; controlling the relative position between the end of the spray gun and the moving workpiece to maintain the positional relationship planned by the offline painting trajectory, and completing the following painting of the moving workpiece through real-time motion compensation of the dynamic workpiece coordinate system; and not replanning the offline painting trajectory in the dynamic workpiece coordinate system during the following painting process.

[0057] Specifically, the painting robot controller sends the actual painting trajectory (actual trajectory position, actual movement speed, and actual spray gun posture) calculated in each control cycle to the motion control layer of the painting robot controller in real time. The motion control layer controls the end of the spray gun to move to the actual trajectory position through inverse kinematics calculation and trajectory interpolation. When the moving workpiece translates during the movement of the conveyor belt, the origin of the dynamic workpiece coordinate system translates with the workpiece, the translation amount of the coordinate system is updated, and the homogeneous coordinate transformation matrix is ​​updated accordingly. The calculated actual painting trajectory is translated synchronously as a whole in the robot base coordinate system. When the moving workpiece rotates (attitude deflection), the rotation amount of the coordinate system is updated, and the actual painting trajectory rotates synchronously around the origin of the dynamic workpiece coordinate system. When the workpiece translates and rotates at the same time, the actual painting trajectory completes a synchronous translation and rotation composite offset with the coordinate system motion transformation amount.

[0058] The effect of real-time motion compensation is as follows: Although the absolute trajectory of the spray gun tip in the robot's base coordinate system changes continuously with the workpiece, the coordinates of the spray gun tip in the dynamic workpiece coordinate system are always equal to the trajectory point position planned in the offline spraying trajectory. The relative position, relative attitude, and relative motion relationship between the spray gun tip and the moving workpiece remain unchanged, maintaining the positional relationship planned in the offline spraying trajectory. The spray gun motion seen on the workpiece surface is completely consistent with spraying a stationary workpiece according to the offline spraying trajectory. The spraying path spacing, overlap rate, and gun speed of the multi-segment spraying trajectory do not change due to workpiece transport, and the dynamic spraying quality is equivalent to static spraying. During the follow-up spraying process, the offline spraying trajectory itself remains unchanged. The controller does not replan the offline spraying trajectory in the dynamic workpiece coordinate system. All changes caused by workpiece movement are absorbed through real-time updates of coordinate system motion transformations. The trajectory planning calculation and motion compensation calculation are completely decoupled, avoiding the problems of large calculation volume and adjustment lag caused by repeatedly recalculating all trajectory points in the fixed coordinate system scheme.

[0059] In some embodiments, the step of adaptively correcting the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, updating the coordinate system motion transformation, and recalculating the actual spraying trajectory includes: comparing the workpiece's real-time speed with the conveyor belt's rated speed to obtain the fluctuation of the workpiece's real-time speed; comparing the workpiece's real-time position with the expected position of the workpiece extrapolated according to the conveyor belt's rated speed to obtain the deviation of the moving workpiece's trajectory; when the fluctuation of the workpiece's real-time speed exceeds a preset speed fluctuation limit, correcting the expected translation of the origin of the dynamic workpiece coordinate system based on the fluctuation; when the deviation of the moving workpiece's trajectory exceeds a preset trajectory deviation limit, correcting the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system based on the trajectory deviation; updating the coordinate system motion transformation based on the corrected dynamic workpiece coordinate system, and recalculating the offline spraying trajectory according to the updated coordinate system motion transformation to obtain the corrected actual spraying trajectory.

[0060] Specifically, the calculation and correction method for speed fluctuation is as follows: The rated speed of the conveyor belt is the standard conveying speed set by the production line. The spraying robot controller compares the real-time speed of the workpiece collected by the conveyor belt encoder with the rated speed of the conveyor belt in each control cycle. The difference between the two is the fluctuation of the real-time speed of the workpiece. The fluctuation includes the fluctuation amplitude and the fluctuation direction. When the fluctuation exceeds the preset speed fluctuation limit (i.e., the speed deviation is continuously greater than the allowable value), it is determined that the conveyor belt is in an acceleration, deceleration or speed adjustment state. The controller corrects the expected translation of the origin of the dynamic workpiece coordinate system according to the fluctuation. The speed term in the calculation of the expected translation uses the real-time speed of the workpiece instead of the rated speed of the conveyor belt, and introduces the prediction of speed change trend so that the coordinate system movement follows the actual conveying rhythm and avoids the spray gun end relative to the workpiece in the conveying direction being ahead or behind.

[0061] The calculation and correction method for trajectory deviation is as follows: The painting robot controller takes the position of the workpiece at the previous visual sampling moment as the starting point and extrapolates the expected position of the workpiece at the current moment according to the rated speed (or rated motion trajectory) of the conveyor belt. The real-time position of the workpiece measured by vision is compared with the expected position of the workpiece, and the difference between the two positions is the trajectory deviation of the moving workpiece. The trajectory deviation is decomposed into longitudinal deviation (slippage in the conveying direction), lateral deviation (offset in the vertical conveying direction), and attitude deviation (placement angle error). When the trajectory deviation exceeds the preset trajectory deviation limit, the controller corrects the dynamic workpiece coordinate system according to the trajectory deviation: the longitudinal and lateral deviations are used to correct the position of the coordinate origin, and the attitude deviation is used to correct the coordinate axis direction (coordinate system rotation), so that the dynamic workpiece coordinate system is re-aligned with the actual position and posture of the workpiece. Small-amplitude, high-frequency deviation components are filtered and do not trigger correction to prevent coordinate system jitter caused by measurement noise; the deviation correction amount is applied gradually according to the control cycle.

[0062] The update and recalculation method is as follows: The painting robot controller reassembles the homogeneous coordinate transformation matrix based on the corrected coordinate origin position, coordinate axis direction, and expected translation amount, updates the coordinate system motion transformation, and recalculates the offline painting trajectory for unexecuted trajectory points according to the updated coordinate system motion transformation to obtain the corrected actual painting trajectory; the corrected actual painting trajectory replaces the original trajectory and is issued for execution from the next control cycle. Adaptive correction replaces "trajectory replanning" with "coordinate system correction." Regardless of workpiece speed fluctuations or trajectory deviations, it is achieved by adjusting a homogeneous coordinate transformation matrix, resulting in low computational load and no disruption to the process shape of the offline painting trajectory.

[0063] In some embodiments, sending the actual spraying trajectory to the controller of the spraying robot and controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory includes: performing inverse kinematics calculations on the actual trajectory position, actual movement speed, and actual spray gun posture of each trajectory point in the actual spraying trajectory to obtain joint position commands and joint speed commands for each joint of the spraying robot; sending the joint position commands and joint speed commands to the controller of the spraying robot according to the control cycle, so that the controller drives the movement of each joint of the spraying robot; when the end of the spray gun enters the spraying area of ​​the moving workpiece, controlling the spray gun to turn on and adjusting the paint flow rate according to the actual movement speed; when the end of the spray gun leaves the spraying area, controlling the spray gun to turn off; and controlling the spraying robot to perform spraying operations on the continuously arriving moving workpieces on the conveyor belt according to the actual spraying trajectory.

[0064] Specifically, the spraying robot controller performs inverse kinematics calculations point-by-point on the actual spraying trajectory: based on the linkage parameters and joint configuration of the spraying robot, it inversely solves the joint angles from the actual trajectory position and the actual spray gun posture to obtain joint position commands; it obtains joint speed commands from the actual motion speed through Jacobian matrix mapping; the joint position commands and joint speed commands are sent to the spraying robot controller (servo drive layer) according to the control cycle, and the controller drives the servo motors of each joint to move in a coordinated manner, and the end of the spray gun reproduces the actual spraying trajectory. During the calculation, it simultaneously checks whether the joint angles are within the mechanical limit boundaries and whether the joint speed exceeds the limit value, and provides early warning for trajectory points that exceed the limit value.

[0065] The spray gun and flow control method is as follows: The spraying robot controller determines whether the end of the spray gun has entered the spraying area of ​​the moving workpiece based on the spray gun on / off status of each trajectory point in the offline spraying trajectory and the actual trajectory position after conversion by the dynamic coordinate system. When the end of the spray gun enters the spraying area (reaches the spraying start point), the controller controls the spray gun to turn on. The spray gun adjusts the paint flow according to the actual movement speed. Since the actual movement speed includes the workpiece's dragging speed and the relative gun movement speed, the coating deposition calculation is based on the relative speed of the spray gun relative to the workpiece surface. The controller adjusts the paint flow according to the relative gun movement speed and the coating thickness requirements to keep the paint deposition amount per unit area constant. When the end of the spray gun leaves the spraying area (reaches the spraying end point or enters the gun lifting connection path), the controller controls the spray gun to turn off to avoid dry spraying and paint waste.

[0066] The continuous operation mode is as follows: moving workpieces on the conveyor belt continuously arrive at the spraying station. The spraying robot controller establishes a dynamic workpiece coordinate system for each workpiece and calls the corresponding offline spraying trajectory. According to the order in which the workpieces enter the tracking area, the controller performs status acquisition, coordinate transformation, trajectory calculation and spraying in sequence. After the previous workpiece is sprayed, the spray gun is turned off and removed, the controller resets the dynamic workpiece coordinate system of the workpiece, and the robot end returns to the waiting position or directly switches to following the next workpiece. The spraying operation is performed on the continuously arriving moving workpieces in sequence to realize batch continuous production under dynamic conveying conditions.

[0067] In some embodiments, please refer to Figure 2 The robot's base coordinate system is a stationary coordinate system fixed to the base of the painting robot. The coordinate axes of the robot's base coordinate system remain unchanged from the origin during the production process. The dynamic workpiece coordinate system uses the preset feature points of the moving workpiece on the conveyor belt as the origin, and the coordinate axes of the dynamic workpiece coordinate system are determined according to the workpiece's placement direction. Figure 2 The dynamic workpiece coordinate system is shown in the form of a dashed coordinate system and moves synchronously with the conveyor belt. When the moving workpiece moves, the origin of the dynamic workpiece coordinate system is located on the moving workpiece.

[0068] Please refer to Figure 2The workpiece motion state acquisition module continuously collects the workpiece's real-time position, real-time speed, and real-time posture during its movement: the real-time position is obtained by a vision sensor recognizing preset feature points, the real-time speed is obtained by a conveyor belt encoder, and the real-time posture is obtained by the angle between the workpiece's contour direction and the coordinate axes. These three types of data are output after time synchronization. Please refer to... Figure 2 The offline spraying trajectory planning module is located within the dynamic workpiece coordinate system. The offline spraying trajectory is planned using the 3D model of the workpiece as the object before the spraying operation. All trajectory points output by the offline spraying trajectory planning module are represented by coordinate values ​​in the dynamic workpiece coordinate system. Figure 2 The dashed loop in the middle represents the subordinate relationship between the offline spraying trajectory and the dynamic workpiece coordinate system.

[0069] Please refer to Figure 2 In the middle processing link, the workpiece motion state is sent to the coordinate system motion transformation calculation module. The coordinate system motion transformation calculation module calculates the homogeneous coordinate transformation matrix, which includes coordinate system translation, coordinate system rotation, and expected translation, based on the workpiece's real-time position, real-time posture, and real-time velocity. The homogeneous coordinate transformation matrix and the offline spraying trajectory are sent to the coordinate system conversion module. The coordinate system conversion module converts the offline spraying trajectory in the dynamic workpiece coordinate system to the robot base coordinate system through matrix multiplication of the homogeneous trajectory vector and the coordinate system motion transformation. The conversion result is sent to the actual spraying trajectory output module to obtain the actual spraying trajectory.

[0070] Please refer to Figure 2 The actual spraying trajectory output module sends the actual spraying trajectory to the spraying robot controller module. The spraying robot controller module, through inverse kinematics calculation and servo control, drives the spraying robot to move, ensuring the spray gun tip maintains a relative positional relationship with the moving workpiece according to the offline spraying trajectory plan, thus completing the following spraying. Please refer to... Figure 2 The feedback loop below shows that the painting robot controller module continuously collects the workpiece speed fluctuation and trajectory deviation. The fluctuation of the workpiece's real-time speed relative to the conveyor belt's rated speed and the trajectory deviation of the workpiece's real-time position relative to the rated extrapolated position are fed back to the painting robot controller module. Based on this, the controller performs adaptive correction to the dynamic workpiece coordinate system, updates the coordinate system motion transformations, and recalculates the actual painting trajectory. Please refer to... Figure 2 On the right, the commands from the spraying robot controller module are ultimately output to the spraying robot controller, and the spraying robot performs spraying operations on the continuously arriving moving workpieces on the conveyor belt. Figure 2 The dynamic coordinate system establishment, offline trajectory follow-up conversion and coordinate system adaptive correction link shown means that the controller does not need to recalculate the trajectory shape when the workpiece is in continuous motion. It can achieve high-precision following spraying by only updating the coordinate system motion transformation in real time. It has low calculation load, good real-time performance, and stable dynamic spraying quality under speed fluctuation and trajectory deviation conditions.

[0071] In some embodiments, the dynamic workpiece coordinate system rotates synchronously with the attitude deflection of the moving workpiece, and the coordinate system conversion performs complete rotational compensation for workpiece yaw and tilt.

[0072] Specifically, when a workpiece is placed on a conveyor belt, it may have a yaw angle relative to the standard direction. Curved or irregularly shaped workpieces may also have pitch and roll attitude deviations. Compensating only for translation will cause the offline spraying trajectory direction to be misaligned with the actual contour of the workpiece. In some embodiments, the workpiece motion state acquisition module calculates the yaw angle of the workpiece in the conveyor belt plane by the position of two or more preset feature points in the workpiece image. For vision sensors that can acquire three-dimensional information (stereo vision or structured light sensor), the pitch and roll angles of the workpiece relative to the conveyor belt plane are further calculated to obtain the complete three-dimensional real-time attitude of the workpiece. The coordinate system motion transformation calculation module constructs a complete three-dimensional rotation matrix with the coordinate origin as the rotation center, based on the yaw angle, pitch angle, and roll angle. The three coordinate axes of the dynamic workpiece coordinate system rotate synchronously with the workpiece.

[0073] During coordinate system transformation, both the position and attitude vectors of the offline spraying trajectory undergo a composite transformation using a rotation matrix: multiple parallel spraying trajectory segments rotate as a whole with the workpiece yaw angle, always maintaining the designed parallel relationship with the actual edge of the workpiece; the spray gun attitude is adjusted synchronously with the workpiece tilt, and the angle between the spray gun's spray axis and the workpiece surface normal remains at the offline planned value. Rotation compensation and translation compensation are completed in one step within the same homogeneous coordinate transformation matrix, without adding any additional calculation steps. For workpieces whose attitude deflection exceeds the allowable range (e.g., workpiece tilting or severely angled), the controller determines them as abnormally placed workpieces, does not perform spraying on them, and outputs a rejection prompt to prevent the robot from colliding due to moving along an incorrect attitude trajectory.

[0074] In some embodiments, the painting robot controller establishes a dynamic workpiece coordinate system instance for each moving workpiece on the conveyor belt, and performs parallel maintenance and switching scheduling on multiple dynamic workpiece coordinate systems.

[0075] Specifically, when the conveyor belt is continuously conveying materials, multiple workpieces exist simultaneously near the tracking area of ​​the painting robot. A single dynamic workpiece coordinate system cannot describe the individual movements of these workpieces. In some embodiments, the painting robot controller assigns a unique workpiece identifier to each visually recognized moving workpiece and establishes a dynamic workpiece coordinate system instance. Each dynamic workpiece coordinate system instance independently maintains the coordinate origin position, coordinate axis direction, real-time workpiece speed, and corresponding offline painting trajectory. The controller maintains a workpiece queue, which records each workpiece identifier, workpiece model, dynamic workpiece coordinate system parameters, and the workpiece's position in the tracking area.

[0076] The painting robot performs painting on only one workpiece at a time. The controller schedules dynamic workpiece coordinate system instances according to the order in which the workpieces arrive at the starting position of the painting process: activating the dynamic workpiece coordinate system of the currently being painted workpiece and performing coordinate transformation and trajectory calculation cycle by cycle; updating the coordinate system position of workpieces that have not yet entered the painting area in the background at a low frequency (trajectory pre-aiming); and deregistering the dynamic workpiece coordinate system instance of workpieces that have been painted and left the tracking area. When the distance between two workpieces is small, the controller calculates the motion transformation of multiple coordinate systems in parallel within the same control cycle. After the spray gun leaves the previous workpiece, it directly switches to the dynamic workpiece coordinate system output of the next workpiece, and performs a smooth transition on the idle movement trajectory of the spray gun end at the switching point. Parallel management of multiple workpieces and multiple coordinate systems ensures that the trajectory calculation of each workpiece is independent and does not interfere with each other, adapting to the production line conditions of mixed conveying of different types of workpieces and uneven workpiece spacing.

[0077] In some embodiments, the spraying robot controller performs state estimation and control delay prediction compensation for the workpiece motion state, and the coordinate system motion transformation is calculated using the workpiece pose at the predicted time.

[0078] Specifically, visual sampling, coordinate transformation, command issuance, and servo response all involve time delays. If the coordinate system motion transformation only uses the current measured pose, the workpiece will have already moved to a new position when the spray gun end actually arrives, resulting in a systematic following lag. In some embodiments, the painting robot controller establishes the workpiece motion state equation, and the state vector includes the workpiece position, velocity, and acceleration. Using the visual position and encoder velocity as observations, Kalman filtering is used to perform fusion state estimation on the multi-source observations, outputting smooth position, velocity, and acceleration estimates. The controller calculates the total control delay from image sampling to the actual movement of the spray gun end, and uses the predicted time of the total control delay after the current time as the target. The workpiece position and orientation at the predicted time are extrapolated according to the estimated velocity and acceleration. The translation and rotation in the coordinate system motion transformation are calculated using the predicted pose, so that the actual arrival time of the spray gun end and the predicted position of the workpiece are aligned in time.

[0079] When workpiece speed fluctuates, the acceleration estimation term allows the predicted position to reflect the acceleration and deceleration trends in advance, and the prediction error is corrected by the measured position in each vision cycle. State estimation also filters visual jump points and encoder pulse noise, resulting in smoother motion of the dynamic workpiece coordinate system and preventing the spray gun tip from vibrating due to single measurement anomalies. For situations where control delay changes with robot posture, the controller estimates the delay time in real time based on the current joint speed and servo dynamics, and adaptively adjusts the prediction time domain. State estimation and prediction compensation elevate the "follow-up" of the dynamic coordinate system to "predictive follow-up," further improving the relative position accuracy under high-speed conveying conditions.

[0080] In some embodiments, the painting robot controller sets the activation window of the dynamic workpiece coordinate system according to the robot tracking stroke constraints, and coordinates speed adjustment with the conveyor belt control system when the workpiece speed exceeds the feasible range.

[0081] Specifically, the working space of the painting robot along the conveyor belt is limited, and the dynamic workpiece coordinate system is only executable within the robot's reachable stroke. In some embodiments, the controller calculates the activation window of the dynamic workpiece coordinate system for each workpiece based on the robot's effective tracking stroke along the conveyor belt, the longitudinal length of the offline painting trajectory, and the real-time speed of the workpiece. The activation window includes the coordinate system activation start point (the position where the workpiece enters the robot's reachable range and a catch-up distance is reserved) and the endpoint that must be deactivated (the workpiece reaches the tracking stroke boundary). When the workpiece enters the activation window, the controller activates its dynamic workpiece coordinate system and begins trajectory conversion. Before the workpiece reaches the endpoint, it must complete all painting trajectory segments and lift the gun to detach.

[0082] Before activating the starting point of the window, the controller pre-verifies feasibility: it calculates the minimum tracking stroke required for the robot to complete the offline painting trajectory based on the workpiece's real-time speed. When the minimum tracking stroke exceeds the effective tracking stroke (workpiece moving too fast), the controller sends a deceleration request to the conveyor belt control system to adjust the workpiece's real-time speed to within the feasible speed range before activating the coordinate system. When the conveyor belt cannot be speed-adjusted, the controller outputs an out-of-range warning for workpieces exceeding its capacity and skips painting, allowing downstream stations to complete the painting. For situations where workpieces are too closely spaced or the painting time for a single piece is insufficient, the controller sends an intermittent conveying suggestion to the conveyor belt control system, causing the workpiece to slow down or pause briefly within the painting window and be conveyed quickly during painting gaps. Activation window management and coordinated speed adjustment ensure that the actual painting trajectory calculated by the dynamic coordinate system is always within the robot's workspace, avoiding joint over-limits and tracking failures.

[0083] In some embodiments, the spraying robot controller integrates visual position, encoder speed and workpiece feature observation to perform online calibration of the origin of the dynamic workpiece coordinate system, and automatically detects and compensates for coordinate system drift caused by conveyor belt slippage.

[0084] Specifically, the conveyor belt encoder measures the surface speed of the conveyor belt. When slippage occurs between the workpiece and the conveyor belt surface, the encoder speed is no longer equal to the actual workpiece speed, and the origin of the dynamic workpiece coordinate system extrapolated from the encoder speed will gradually drift relative to the workpiece. In some embodiments, the controller uses the workpiece feature point positions measured by the vision sensor as the direct observation of the workpiece position and the integral displacement of the conveyor belt encoder as the indirect observation to perform fusion calibration on the origin position of the dynamic workpiece coordinate system: each vision cycle calculates the deviation between the visually measured position and the encoder-calculated position. When the deviation continues to increase unidirectionally and exceeds the slippage judgment threshold, the workpiece is judged to be slipping. The controller forcibly corrects the origin position of the dynamic workpiece coordinate system to the visually measured position and applies a slippage correction coefficient to the encoder speed. When the deviation is within the normal range, a fusion algorithm is used to weight the two types of observations, with the visual data providing an absolute position reference and the encoder data providing a high-frequency smoothed speed.

[0085] The controller can also select one or more verification feature points on the workpiece, excluding the coordinate origin. Using the known geometric relationship between the origin and the verification feature points, it simultaneously verifies the position of the coordinate system origin and the direction of the coordinate axes. When the measured relationships of multiple feature points do not match the workpiece model, it identifies workpiece deformation or feature recognition errors and provides a warning. Online calibration ensures that the dynamic workpiece coordinate system is always locked to the actual workpiece pose. Factors such as conveyor belt slippage, roller wear, and long-term calibration drift will not accumulate in the actual spraying trajectory, extending the system's calibration-free operating cycle.

[0086] In some embodiments, the coordinate system conversion performs a composite verification on the traction motion speed and the relative gun travel speed, and coordinates and allocates the dynamic workpiece coordinate system motion and offline trajectory motion when the joint space constraints are not met.

[0087] Specifically, the actual speed of the spray gun tip in the robot's base coordinate system is the vector sum of the speed of the dynamic workpiece coordinate system and the relative speed of the offline spraying trajectory. When the workpiece conveying speed is high and the relative gun movement direction is consistent with the conveying direction, the composite speed may exceed the robot joint speed or Cartesian speed limit. In some embodiments, after the coordinate system conversion module calculates the composite actual speed at each trajectory point, it maps the composite speed to the speed of each joint and performs joint limit verification: when the speed of a certain joint exceeds the limit, the controller coordinates and adjusts the direction and magnitude of the relative gun movement speed of that trajectory segment in the offline spraying trajectory. For example, the gun movement along the conveying direction is arranged to reduce the relative speed when it is in the same direction as the conveying motion, and the conveying motion is used to complete part of the gun movement displacement. The gun movement in the opposite conveying direction is arranged during the period when the workpiece speed is low or the conveyor belt is requested to slow down. The coordination adjustment only changes the time allocation and speed direction of the relative gun movement, and does not change the spatial shape of the spraying trajectory line segment and the spraying path spacing in the dynamic workpiece coordinate system.

[0088] The controller also performs acceleration verification on the synthesized trajectory. The superposition of the entanglement acceleration caused by workpiece speed fluctuations and the relative gun movement acceleration must not exceed the joint acceleration limit. If this is not met, smoothing is applied to the update of the coordinate system motion transformation (limiting the single-cycle pose change of the dynamic coordinate system). This is equivalent to the spray gun end applying appropriate filtering to follow high-frequency small-amplitude fluctuations of the workpiece and maintaining accurate tracking of low-frequency large-amplitude displacements. The speed synthesis verification and coordinated allocation ensure that the actual spraying trajectory obtained by dynamic calculation is not only geometrically correct, but also can be executed smoothly within the robot's motion capabilities, avoiding joint overspeed, increased tracking error, and coating thickness fluctuations in high-speed dynamic spraying.

[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0090] Please see Figure 3 As shown, Figure 3 This is a schematic diagram of the structure of a dynamic spraying trajectory determination system 200 for a spraying robot provided in this application embodiment. The dynamic spraying trajectory determination system 200 for a spraying robot is used to execute the steps of the dynamic spraying trajectory determination method for a spraying robot shown in the above embodiments. The dynamic spraying trajectory determination system 200 for a spraying robot can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, a laptop computer, a wearable device, or a robot.

[0091] like Figure 3 As shown, the dynamic spraying trajectory determination system 200 for the spraying robot includes: The status acquisition unit 201 is used to establish a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the coordinate origin, to acquire the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, the offline spraying trajectory being pre-planned in the dynamic workpiece coordinate system; and to acquire the workpiece motion state of the moving workpiece, including the real-time position, real-time speed and real-time posture of the workpiece. The spraying execution unit 202 is used to calculate the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot according to the workpiece motion state, and to perform coordinate system one conversion on the offline spraying trajectory under the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. Through real-time motion compensation of the dynamic workpiece coordinate system, the spraying robot follows the moving workpiece to perform spraying. The job execution unit 203 is used to perform adaptive correction on the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, update the coordinate system motion transformation, and recalculate the actual spraying trajectory; and send the actual spraying trajectory to the controller of the spraying robot to control the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

[0092] In some embodiments, establishing a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the origin, and obtaining the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, includes: identifying preset feature points on the moving workpiece using a vision sensor, and determining the preset feature points as the origin of the dynamic workpiece coordinate system; establishing a dynamic workpiece coordinate system with the conveyor belt movement direction as the first coordinate axis and the direction perpendicular to the conveyor belt movement direction and parallel to the workpiece surface as the second coordinate axis; the dynamic workpiece coordinate system synchronously translating and rotating with the moving workpiece during the conveyor belt movement; and obtaining a pre-stored offline spraying trajectory, where each trajectory point in the offline spraying trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system.

[0093] In some embodiments, the offline spraying trajectory is pre-planned in a dynamic workpiece coordinate system, including: acquiring the 3D model of the moving workpiece and the spraying process requirements, the spraying process requirements including coating thickness requirements and spraying path spacing requirements; using the 3D model of the workpiece as the planning object, planning the gun path of the spray gun in the dynamic workpiece coordinate system, the gun path including multiple parallel spraying trajectory lines and the connection path between the spraying trajectory lines; determining the position of each trajectory point on the gun path in the dynamic workpiece coordinate system, the spray gun movement speed and the spray gun posture; storing the offline spraying trajectory containing the trajectory point position, the spray gun movement speed and the spray gun posture to the spraying robot controller, and repeatedly calling the same set of offline spraying trajectories for the same type of moving workpiece.

[0094] In some embodiments, the acquisition of the workpiece motion state, including the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture, includes: acquiring workpiece images of the moving workpiece at a fixed sampling period using a vision sensor, identifying the image coordinates of preset feature points in the workpiece image, and converting the image coordinates to obtain the workpiece real-time position; acquiring the conveyor belt running speed using a conveyor belt encoder and determining the conveyor belt running speed as the workpiece real-time speed; determining the workpiece real-time posture based on the angle between the contour direction of the moving workpiece in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system; and synchronizing the acquisition data from the vision sensor and the conveyor belt encoder, and combining the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture at the same moment into the workpiece motion state.

[0095] In some embodiments, calculating the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the workpiece motion state includes: determining the coordinate system translation amount of the origin of the dynamic workpiece coordinate system in the base coordinate system of the painting robot based on the real-time position of the workpiece; determining the coordinate system rotation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the real-time attitude of the workpiece; predicting the expected translation amount of the origin of the dynamic workpiece coordinate system in the next control cycle based on the real-time speed of the workpiece; expressing the coordinate system translation amount, the coordinate system rotation amount, and the expected translation amount as a homogeneous coordinate transformation matrix of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot, and determining the homogeneous coordinate transformation matrix as the coordinate system motion transformation amount.

[0096] In some embodiments, the step of performing coordinate system transformation on the offline spraying trajectory in the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system includes: representing the trajectory point position, spray gun movement speed and spray gun attitude of each trajectory point in the offline spraying trajectory as a homogeneous trajectory vector in the dynamic workpiece coordinate system; performing matrix multiplication operation on the homogeneous trajectory vector and the coordinate system motion transformation amount to uniformly transform each trajectory point to the spraying robot base coordinate system; extracting the actual trajectory position, actual movement speed and actual spray gun attitude of each trajectory point in the spraying robot base coordinate system from the matrix multiplication operation result; re-performing the uniform transformation according to the updated coordinate system motion transformation amount in each control cycle, arranging the transformed trajectory points in chronological order to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system.

[0097] In some embodiments, the step of enabling the painting robot to follow the moving workpiece for painting through real-time motion compensation of the dynamic workpiece coordinate system includes: sending the actual painting trajectory calculated in each control cycle to the painting robot controller in real time; the painting robot controller controlling the end of the spray gun to move to the actual trajectory position corresponding to the actual painting trajectory; when the moving workpiece translates or rotates during the movement of the conveyor belt, the dynamic workpiece coordinate system moves synchronously with the moving workpiece, the coordinate system motion transformation is updated accordingly, and the actual painting trajectory shifts synchronously with the coordinate system motion transformation in the base coordinate system of the painting robot; controlling the relative position between the end of the spray gun and the moving workpiece to maintain the positional relationship planned by the offline painting trajectory, and completing the following painting of the moving workpiece through real-time motion compensation of the dynamic workpiece coordinate system; and not replanning the offline painting trajectory in the dynamic workpiece coordinate system during the following painting process.

[0098] In some embodiments, the step of adaptively correcting the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, updating the coordinate system motion transformation, and recalculating the actual spraying trajectory includes: comparing the workpiece's real-time speed with the conveyor belt's rated speed to obtain the fluctuation of the workpiece's real-time speed; comparing the workpiece's real-time position with the expected position of the workpiece extrapolated according to the conveyor belt's rated speed to obtain the deviation of the moving workpiece's trajectory; when the fluctuation of the workpiece's real-time speed exceeds a preset speed fluctuation limit, correcting the expected translation of the origin of the dynamic workpiece coordinate system based on the fluctuation; when the deviation of the moving workpiece's trajectory exceeds a preset trajectory deviation limit, correcting the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system based on the trajectory deviation; updating the coordinate system motion transformation based on the corrected dynamic workpiece coordinate system, and recalculating the offline spraying trajectory according to the updated coordinate system motion transformation to obtain the corrected actual spraying trajectory.

[0099] In some embodiments, sending the actual spraying trajectory to the controller of the spraying robot and controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory includes: performing inverse kinematics calculations on the actual trajectory position, actual movement speed, and actual spray gun posture of each trajectory point in the actual spraying trajectory to obtain joint position commands and joint speed commands for each joint of the spraying robot; sending the joint position commands and joint speed commands to the controller of the spraying robot according to the control cycle, so that the controller drives the movement of each joint of the spraying robot; when the end of the spray gun enters the spraying area of ​​the moving workpiece, controlling the spray gun to turn on and adjusting the paint flow rate according to the actual movement speed; when the end of the spray gun leaves the spraying area, controlling the spray gun to turn off; and controlling the spraying robot to perform spraying operations on the continuously arriving moving workpieces on the conveyor belt according to the actual spraying trajectory.

[0100] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the dynamic spraying trajectory determination system and each module of the spraying robot described above can be referred to the corresponding content in the various embodiments of the dynamic spraying trajectory determination method of the spraying robot, and will not be repeated here.

[0101] The aforementioned method for determining the dynamic spraying trajectory of a spraying robot can be implemented as a computer program, which can be used in various ways, such as... Figure 3 It runs on the system shown.

[0102] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.

[0103] The storage medium can store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any method for determining the dynamic spraying trajectory of a spraying robot.

[0104] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0105] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any method for determining the dynamic spraying trajectory of a spraying robot.

[0106] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0107] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0108] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: A dynamic workpiece coordinate system is established with the moving workpiece as the origin, and the workpiece moves synchronously with the moving workpiece. The offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system is obtained. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. The workpiece motion state is collected, including the real-time position, real-time speed and real-time posture of the workpiece. The coordinate system motion transformation of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot is calculated based on the workpiece motion state. The offline spraying trajectory under the dynamic workpiece coordinate system is converted according to the coordinate system motion transformation to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. The spraying robot follows the moving workpiece to perform spraying through real-time motion compensation of the dynamic workpiece coordinate system. Based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, the dynamic workpiece coordinate system is adaptively corrected, the coordinate system motion transformation is updated, and the actual spraying trajectory is recalculated. The actual spraying trajectory is then sent to the controller of the spraying robot, which controls the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

[0109] In some embodiments, establishing a dynamic workpiece coordinate system that moves synchronously with the moving workpiece, with the moving workpiece as the origin, and obtaining the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, includes: identifying preset feature points on the moving workpiece using a vision sensor, and determining the preset feature points as the origin of the dynamic workpiece coordinate system; establishing a dynamic workpiece coordinate system with the conveyor belt movement direction as the first coordinate axis and the direction perpendicular to the conveyor belt movement direction and parallel to the workpiece surface as the second coordinate axis; the dynamic workpiece coordinate system synchronously translating and rotating with the moving workpiece during the conveyor belt movement; and obtaining a pre-stored offline spraying trajectory, where each trajectory point in the offline spraying trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system.

[0110] In some embodiments, the offline spraying trajectory is pre-planned in a dynamic workpiece coordinate system, including: acquiring the 3D model of the moving workpiece and the spraying process requirements, the spraying process requirements including coating thickness requirements and spraying path spacing requirements; using the 3D model of the workpiece as the planning object, planning the gun path of the spray gun in the dynamic workpiece coordinate system, the gun path including multiple parallel spraying trajectory lines and the connection path between the spraying trajectory lines; determining the position of each trajectory point on the gun path in the dynamic workpiece coordinate system, the spray gun movement speed and the spray gun posture; storing the offline spraying trajectory containing the trajectory point position, the spray gun movement speed and the spray gun posture to the spraying robot controller, and repeatedly calling the same set of offline spraying trajectories for the same type of moving workpiece.

[0111] In some embodiments, the acquisition of the workpiece motion state, including the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture, includes: acquiring workpiece images of the moving workpiece at a fixed sampling period using a vision sensor, identifying the image coordinates of preset feature points in the workpiece image, and converting the image coordinates to obtain the workpiece real-time position; acquiring the conveyor belt running speed using a conveyor belt encoder and determining the conveyor belt running speed as the workpiece real-time speed; determining the workpiece real-time posture based on the angle between the contour direction of the moving workpiece in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system; and synchronizing the acquisition data from the vision sensor and the conveyor belt encoder, and combining the workpiece real-time position, workpiece real-time speed, and workpiece real-time posture at the same moment into the workpiece motion state.

[0112] In some embodiments, calculating the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the workpiece motion state includes: determining the coordinate system translation amount of the origin of the dynamic workpiece coordinate system in the base coordinate system of the painting robot based on the real-time position of the workpiece; determining the coordinate system rotation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot based on the real-time attitude of the workpiece; predicting the expected translation amount of the origin of the dynamic workpiece coordinate system in the next control cycle based on the real-time speed of the workpiece; expressing the coordinate system translation amount, the coordinate system rotation amount, and the expected translation amount as a homogeneous coordinate transformation matrix of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot, and determining the homogeneous coordinate transformation matrix as the coordinate system motion transformation amount.

[0113] In some embodiments, the step of performing coordinate system transformation on the offline spraying trajectory in the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system includes: representing the trajectory point position, spray gun movement speed and spray gun attitude of each trajectory point in the offline spraying trajectory as a homogeneous trajectory vector in the dynamic workpiece coordinate system; performing matrix multiplication operation on the homogeneous trajectory vector and the coordinate system motion transformation amount to uniformly transform each trajectory point to the spraying robot base coordinate system; extracting the actual trajectory position, actual movement speed and actual spray gun attitude of each trajectory point in the spraying robot base coordinate system from the matrix multiplication operation result; re-performing the uniform transformation according to the updated coordinate system motion transformation amount in each control cycle, arranging the transformed trajectory points in chronological order to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system.

[0114] In some embodiments, the step of enabling the painting robot to follow the moving workpiece for painting through real-time motion compensation of the dynamic workpiece coordinate system includes: sending the actual painting trajectory calculated in each control cycle to the painting robot controller in real time; the painting robot controller controlling the end of the spray gun to move to the actual trajectory position corresponding to the actual painting trajectory; when the moving workpiece translates or rotates during the movement of the conveyor belt, the dynamic workpiece coordinate system moves synchronously with the moving workpiece, the coordinate system motion transformation is updated accordingly, and the actual painting trajectory shifts synchronously with the coordinate system motion transformation in the base coordinate system of the painting robot; controlling the relative position between the end of the spray gun and the moving workpiece to maintain the positional relationship planned by the offline painting trajectory, and completing the following painting of the moving workpiece through real-time motion compensation of the dynamic workpiece coordinate system; and not replanning the offline painting trajectory in the dynamic workpiece coordinate system during the following painting process.

[0115] In some embodiments, the step of adaptively correcting the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, updating the coordinate system motion transformation, and recalculating the actual spraying trajectory includes: comparing the workpiece's real-time speed with the conveyor belt's rated speed to obtain the fluctuation of the workpiece's real-time speed; comparing the workpiece's real-time position with the expected position of the workpiece extrapolated according to the conveyor belt's rated speed to obtain the deviation of the moving workpiece's trajectory; when the fluctuation of the workpiece's real-time speed exceeds a preset speed fluctuation limit, correcting the expected translation of the origin of the dynamic workpiece coordinate system based on the fluctuation; when the deviation of the moving workpiece's trajectory exceeds a preset trajectory deviation limit, correcting the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system based on the trajectory deviation; updating the coordinate system motion transformation based on the corrected dynamic workpiece coordinate system, and recalculating the offline spraying trajectory according to the updated coordinate system motion transformation to obtain the corrected actual spraying trajectory.

[0116] In some embodiments, sending the actual spraying trajectory to the controller of the spraying robot and controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory includes: performing inverse kinematics calculations on the actual trajectory position, actual movement speed, and actual spray gun posture of each trajectory point in the actual spraying trajectory to obtain joint position commands and joint speed commands for each joint of the spraying robot; sending the joint position commands and joint speed commands to the controller of the spraying robot according to the control cycle, so that the controller drives the movement of each joint of the spraying robot; when the end of the spray gun enters the spraying area of ​​the moving workpiece, controlling the spray gun to turn on and adjusting the paint flow rate according to the actual movement speed; when the end of the spray gun leaves the spraying area, controlling the spray gun to turn off; and controlling the spraying robot to perform spraying operations on the continuously arriving moving workpieces on the conveyor belt according to the actual spraying trajectory.

[0117] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the dynamic spraying trajectory determination method for a spraying robot as provided in any embodiment of this application.

[0118] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0119] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for determining the dynamic spraying trajectory of a spraying robot, applied to a spraying robot performing spraying operations on a moving workpiece, characterized in that, include: A dynamic workpiece coordinate system is established with the moving workpiece as the origin, and the workpiece moves synchronously with the moving workpiece. The offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system is obtained. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. The workpiece motion state is collected, including the real-time position, real-time speed and real-time posture of the workpiece. The coordinate system motion transformation of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot is calculated based on the workpiece motion state. The offline spraying trajectory under the dynamic workpiece coordinate system is converted according to the coordinate system motion transformation to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. The spraying robot follows the moving workpiece to perform spraying through real-time motion compensation of the dynamic workpiece coordinate system. Based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, the dynamic workpiece coordinate system is adaptively corrected, the coordinate system motion transformation is updated, and the actual spraying trajectory is recalculated. The actual spraying trajectory is then sent to the controller of the spraying robot, which controls the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.

2. The method according to claim 1, characterized in that, The process of establishing a dynamic workpiece coordinate system with the moving workpiece as the origin and moving synchronously with the moving workpiece, and obtaining the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system, includes: Preset feature points on the moving workpiece are identified by a vision sensor, and these preset feature points are determined as the origin of the dynamic workpiece coordinate system. A dynamic workpiece coordinate system is established with the direction of the conveyor belt movement as the first coordinate axis and the direction perpendicular to the direction of the conveyor belt movement and parallel to the workpiece surface as the second coordinate axis. The dynamic workpiece coordinate system translates and rotates synchronously with the moving workpiece as it moves along the conveyor belt. Obtain the pre-stored offline spraying trajectory. Each trajectory point in the offline spraying trajectory is represented by coordinate values ​​in the dynamic workpiece coordinate system.

3. The method according to claim 2, characterized in that, The offline spraying trajectory is pre-planned within the dynamic workpiece coordinate system, including: Obtain the 3D model of the moving workpiece and the spraying process requirements, including coating thickness requirements and spraying path spacing requirements; Using the 3D model of the workpiece as the planning object, the gun path of the spray gun is planned in the dynamic workpiece coordinate system. The gun path includes multiple parallel spray trajectory segments and the connection path between the spray trajectory segments. Determine the position of each trajectory point on the gun path in the dynamic workpiece coordinate system, the gun movement speed, and the gun attitude; The offline spraying trajectory, which includes the location of the trajectory points, the speed of the spray gun movement, and the attitude of the spray gun, is stored in the spraying robot controller. The same set of offline spraying trajectories is repeatedly called for the same type of moving workpiece.

4. The method according to claim 1, characterized in that, The acquisition of the workpiece motion state includes the workpiece's real-time position, real-time velocity, and real-time attitude, including: The visual sensor acquires images of the moving workpiece at a fixed sampling period, identifies the image coordinates of preset feature points in the workpiece image, and converts the image coordinates to obtain the real-time position of the workpiece. The conveyor belt speed is collected by the conveyor belt encoder and determined as the real-time speed of the workpiece. The real-time posture of the workpiece is determined based on the angle between the contour direction of the moving workpiece in the workpiece image and the coordinate axes of the dynamic workpiece coordinate system. The data collected by the vision sensor and the conveyor encoder are synchronized in time, and the real-time position, speed and posture of the workpiece at the same moment are combined into the workpiece motion state.

5. The method according to claim 1, characterized in that, The calculation of the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot based on the workpiece motion state includes: The translation amount of the origin of the dynamic workpiece coordinate system in the base coordinate system of the spraying robot is determined based on the real-time position of the workpiece. The amount of rotation of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot is determined based on the real-time posture of the workpiece. Predict the expected translation amount of the origin of the dynamic workpiece coordinate system in the next control cycle based on the real-time speed of the workpiece. The coordinate system translation, coordinate system rotation, and expected translation are expressed as homogeneous coordinate transformation matrices of the dynamic workpiece coordinate system relative to the base coordinate system of the painting robot. The homogeneous coordinate transformation matrix is ​​then defined as the coordinate system motion transformation.

6. The method according to claim 5, characterized in that, The step of performing coordinate system transformation on the offline spraying trajectory in the dynamic workpiece coordinate system according to the coordinate system motion transformation to obtain the actual spraying trajectory of the spraying robot in the robot base coordinate system includes: The position of each trajectory point, the speed of the spray gun, and the attitude of the spray gun in the offline spraying trajectory are represented as homogeneous trajectory vectors in the dynamic workpiece coordinate system. Perform matrix multiplication on the homogeneous trajectory vector and the coordinate system motion transformation, and uniformly convert each trajectory point to the base coordinate system of the painting robot; The actual trajectory position, actual motion speed, and actual spray gun posture of each trajectory point in the base coordinate system of the spraying robot are extracted from the matrix multiplication operation results. Each control cycle re-executes a unified conversion based on the updated coordinate system motion transformation, and arranges the converted trajectory points in chronological order to obtain the actual spraying trajectory of the spraying robot in the robot's base coordinate system.

7. The method according to claim 6, characterized in that, The method of enabling the painting robot to follow the moving workpiece and perform painting through real-time motion compensation of the dynamic workpiece coordinate system includes: The actual spraying trajectory calculated for each control cycle is sent to the spraying robot controller in real time. The spraying robot controller controls the end of the spray gun to move to the actual trajectory position corresponding to the actual spraying trajectory. When the moving workpiece translates or rotates during the movement of the conveyor belt, the dynamic workpiece coordinate system moves synchronously with the moving workpiece, and the coordinate system motion transformation is updated accordingly. The actual spraying trajectory shifts synchronously with the coordinate system motion transformation in the base coordinate system of the spraying robot. The relative position between the spray gun tip and the moving workpiece is controlled to maintain the positional relationship of the offline spraying trajectory planning. The following spraying of the moving workpiece is completed through real-time motion compensation of the dynamic workpiece coordinate system. During the spraying process, the offline spraying trajectory within the dynamic workpiece coordinate system is not replanned.

8. The method according to claim 1, characterized in that, The process of adaptively correcting the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, updating the coordinate system motion transformation, and recalculating the actual spraying trajectory includes: The real-time speed of the workpiece is compared with the rated speed of the conveyor belt to obtain the fluctuation of the real-time speed of the workpiece. The trajectory deviation of the moving workpiece is obtained by comparing the real-time position of the workpiece with the expected position of the workpiece extrapolated according to the rated speed of the conveyor belt. When the fluctuation of the real-time speed of the workpiece exceeds the preset speed fluctuation limit, the expected translation of the origin of the dynamic workpiece coordinate system is corrected according to the fluctuation. When the trajectory deviation of the moving workpiece exceeds the preset trajectory deviation limit, the position of the origin and the direction of the coordinate axes of the dynamic workpiece coordinate system are corrected according to the trajectory deviation. The coordinate system motion transformation is updated based on the corrected dynamic workpiece coordinate system. The offline spraying trajectory is then recalculated according to the updated coordinate system motion transformation to obtain the corrected actual spraying trajectory.

9. The method according to claim 1, characterized in that, The step of sending the actual spraying trajectory to the controller of the spraying robot, and controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory, includes: The inverse kinematics calculation is performed on the actual trajectory position, actual motion speed and actual spray gun posture of each trajectory point in the actual spraying trajectory to obtain the joint position command and joint speed command of each joint of the spraying robot. The joint position and joint speed commands are sent to the controller of the painting robot according to the control cycle, and the controller drives the movement of each joint of the painting robot. When the tip of the spray gun enters the spraying area of ​​the moving workpiece, the spray gun is turned on and the paint flow rate is adjusted according to the actual movement speed. When the tip of the spray gun leaves the spraying area, the spray gun is turned off. The control system allows the painting robot to sequentially perform painting operations on the moving workpieces that arrive continuously on the conveyor belt, following the actual painting trajectory.

10. A dynamic spraying trajectory determination system for a spraying robot, used to implement the method as described in any one of claims 1-9, applied to a spraying robot performing spraying operations on a moving workpiece, characterized in that, include: The status acquisition unit is used to establish a dynamic workpiece coordinate system with the moving workpiece as the coordinate origin, and to acquire the offline spraying trajectory of the moving workpiece in the dynamic workpiece coordinate system. The offline spraying trajectory is pre-planned in the dynamic workpiece coordinate system. The workpiece motion state is acquired, including the real-time position, real-time speed and real-time posture of the workpiece. The spraying execution unit is used to calculate the coordinate system motion transformation amount of the dynamic workpiece coordinate system relative to the base coordinate system of the spraying robot according to the workpiece motion state, and to perform coordinate system one conversion on the offline spraying trajectory under the dynamic workpiece coordinate system according to the coordinate system motion transformation amount to obtain the actual spraying trajectory of the spraying robot under the robot base coordinate system. Through real-time motion compensation of the dynamic workpiece coordinate system, the spraying robot follows the moving workpiece to perform spraying. The job execution unit is used to adaptively correct the dynamic workpiece coordinate system based on the fluctuation of the workpiece's real-time speed and the deviation of the moving workpiece's trajectory, update the coordinate system motion transformation, and recalculate the actual spraying trajectory; it then sends the actual spraying trajectory to the controller of the spraying robot, controlling the spraying robot to perform spraying operations on the moving workpiece according to the actual spraying trajectory.