Embedded robot joint motor synchronous control method

By compiling nodes for robot joints in the ROS2 system and burning ROS2 programs in an embedded microprocessor, using DDS protocol and timestamp asynchronous control technology, the time error caused by physical differences in data lines in the synchronization control of traditional robot joint motors is solved. Problem, achieving higher synchronous control accuracy and flexibility.

CN119407790AActive Publication Date: 2025-02-11CHONGQING CITY MANAGEMENT COLLEGE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411777283.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-02-11
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

In traditional robot joint motor synchronization control technology, due to physical differences between data lines, the data transmission rate is inconsistent, and the physical time of the motor receiving command information is not synchronized, resulting in time errors, reducing the synchronization control effect, and increasing the number of joints. , the greater the impact of time error.

Method used

Adopt embedded robot joint motor synchronization control method, by compiling joint nodes for robot joints in the computer ROS2 system, and burning ROS2 programs in the embedded microprocessor, using DDS protocol for information transmission, setting QoS policies, and realizing clocks Synchronous and timestamp asynchronous control technology ensures that the time when each joint motor receives command information is consistent.

Benefits of technology

The time synchronization accuracy of the synchronous control of the robot joint motor is improved, time error is reduced, and the effect of synchronization control is enhanced. Compared with traditional serial and parallel bus control, this method is more flexible, which is convenient for maintenance and upgrades and reduces hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119407790A_ABST
    Figure CN119407790A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded robot joint motor synchronous control method, and belongs to the technical field of robot joint motor synchronous control, and the method specifically comprises the steps: setting a main clock in a computer, operating an ROS2 system, compiling a joint node 1 to a joint node N for each joint of a robot to collect the feedback information of a sensor and a motor, and generating command information; the ROS2 system carries out information transmission between joint nodes based on a DDS (Direct Digital Synthesizer) protocol; setting a communication index by using a QoS policy; pTPv2 services are configured in the computer and the embedded microprocessor, and clock synchronization is executed on a local clock of the embedded microprocessor; rOS2 codes are burnt in the embedded microprocessor to achieve wireless communication with the joint nodes, command information is sent to the embedded microprocessor through the timestamp asynchronous technology, and the microprocessor controls a motor to operate; according to the invention, the time synchronization precision during robot joint motor synchronization control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of robot joint motor synchronization, and in particular to an embedded robot joint motor synchronization control method. Background Art

[0002] Nowadays, various types of robots are gradually replacing humans to complete tasks with high repetitiveness and high work intensity. Using robots to replace work can avoid the damage to human health caused by harsh working environments, and robots can work continuously and uninterruptedly, greatly improving production efficiency. With the increasing demand for production and life, people expect robots to be able to perform more complex and precise operations, which requires synchronous control of the motors of each joint of the robot to ensure that the joints can operate in coordination when the robot is working and accurately complete the command.

[0003] The current robot joint motor synchronization control technology generally uses a serial bus or a parallel bus to connect the main control system with each joint motor. The main control system simultaneously issues commands to each joint motor through the bus to ensure that each joint motor can operate at the same time point, thereby achieving the purpose of synchronous movement of the robot joints.

[0004] However, this traditional joint motor synchronous control technology has some shortcomings. For example, in serial buses and parallel buses, there are natural physical differences between the data lines responsible for connecting the main control system and the joint motors, including differences in line length and material quality. These will affect the transmission speed of the data lines, resulting in the physical time when each joint motor receives the command information is not synchronized, causing time errors and reducing the synchronous control effect of the joint motors; and this type of time error will continue to accumulate with the increase in the number of robot joints. The more the robot needs to operate multiple joints synchronously, the greater the impact of this accumulated time error on the robot's working accuracy. Summary of the invention

[0005] The purpose of the present invention is to provide an embedded robot joint motor synchronization control method to solve the following technical problems:

[0006] In traditional robot joint motor synchronous control technology, there are natural physical differences between the data lines connecting the main control system and the joint motors, which affects the data transmission rate. As a result, the physical time when each joint motor receives the command information is not synchronized, causing time errors and reducing the joint motor synchronous control effect. The impact of this time error will become more serious as the number of joints that need synchronous control increases.

[0007] The purpose of the present invention can be achieved through the following technical solutions:

[0008] An embedded robot joint motor synchronization control method comprises the following steps:

[0009] The internal clock of the computer is set as the main clock, the ROS2 system is run in the computer, and joint nodes 1, joint nodes 2, ..., joint nodes N are compiled for each joint of the robot, where N is a positive integer. The joint nodes collect sensor information and motor operation feedback information in the corresponding robot joints, and generate command information for controlling the operation of the joint motors after calculation and processing;

[0010] The information content of each joint node is uploaded to the ROS2 system and a corresponding information topic is created. The types of information content include sensor information, motor operation feedback information and command information. The ROS2 system transmits information between joint nodes based on the DDS protocol. The joint node sends the information content to the information topic based on the DDS protocol. The ROS2 system then forwards the information content to all joint nodes that have subscribed to the corresponding information topic through the DDS protocol.

[0011] Use the QoS policy provided by DDS to set the communication indicators of joint nodes during information transmission, including: information sending mode, information storage method, information queue, and information existence time limit;

[0012] Perform clock synchronization on the embedded microprocessor in the robot joint, configure the PTPv2 service in the computer and embedded microprocessor and set the clock synchronization interval SI = 2 -m seconds, where m is a natural number. After the configuration is complete, the PTPv2 service is started, and the local clock of the embedded microprocessor is corrected according to the clock synchronization interval to synchronize the local clock with the master clock.

[0013] Burn the ROS2 program code in the embedded microprocessor to realize wireless communication with the joint nodes in the ROS2 system, start the nodes in the ROS2 system, and the joint nodes use the timestamp asynchronous control technology to send the generated command information to the corresponding embedded microprocessor. After the embedded microprocessor recognizes the command information, it controls the operation of the joint motor.

[0014] As a further solution of the present invention: the ROS2 system uses an asynchronous process to transmit information between joint nodes based on the DDS protocol. For any joint node, the joint node will timestamp the information content to be published and upload it to the information topic of the corresponding information type, and then directly calculate and process it to generate command information for controlling the operation of the joint motor. There is no need to wait for all other joint nodes that have subscribed to the information topic to receive the information content. At the same time, any joint node only receives information content when the ROS2 system forwards the information content to the joint node.

[0015] As a further solution of the present invention: the process of setting the QoS policy is:

[0016] According to the weight of the information content to be sent, the information sending mode is set for each joint node. The information sending mode includes a reliable mode and an effort mode. The reliable mode ensures that the information content of the information topic of each joint node is always fully received by other joint nodes that have subscribed to the information topic. When the information content is not fully received, the information content is re-uploaded to the ROS2 system; the effort mode only uploads the information content to the ROS2 system once;

[0017] The information saving modes include the last saving mode and the all saving mode. The reliable mode corresponds to the all saving mode, and the effort mode corresponds to the last saving mode. The last saving mode only retains the latest M pieces of information uploaded locally at the joint node, where M is a positive integer. The all saving mode saves all uploaded information at the joint node.

[0018] Obtain the data volume of information content that the joint node cannot process temporarily, set an information queue of corresponding length, cache the information content that cannot be processed temporarily into the information queue, and wait for the joint node to process it in sequence;

[0019] Set the information existence time limit K. When the joint node receives sensor information and motor feedback information, it calculates the difference between the current master clock and the timestamp of the information content. When the difference exceeds K, the information content is regarded as timed out information, and the joint node gives up processing the information content.

[0020] As a further solution of the present invention: when the local clock of the embedded microprocessor is corrected, the average delay of the link between each local clock and the master clock is first calculated:

[0021] A clock synchronization interval SI is set in the PTP service of the computer and the embedded microprocessor. After starting the PTP service, the following operations are performed within the clock synchronization interval SI:

[0022] The embedded microprocessor sends a Pdelay_Req message to the computer and generates a sending timestamp T1 of the message;

[0023] The computer receives the Pdelay_Req message and generates a receiving timestamp T2 of the message;

[0024] The computer sends a Pdelay_Resp message and generates a sending timestamp T3 of the message;

[0025] The embedded microprocessor receives the Pdelay_Resp message and generates a T4 timestamp locally; finally, a set of timestamps (T1, T2, T3, T4) is obtained;

[0026] Mark the transmission link delay from the embedded microprocessor to the computer as t-req, and the transmission link delay from the computer to the embedded microprocessor as t-res, and obtain the total link round-trip delay t from the embedded microprocessor to the computer 总 It is:

[0027] t 总 = t-req + t-res = (T4 - T1) - (T3 - T2)

[0028] The average link delay AverageDelay between the embedded microprocessor and the computer is:

[0029] AverageDelay = [(T4 - T1) - (T3 - T2)] / 2

[0030] The above calculation process is executed once within each clock synchronization period SI.

[0031] As a further solution of the present invention: The process of performing local clock correction according to the average link delay obtained above is:

[0032] After calculating the average link delay, the computer sends a Sync message to the embedded microprocessor, and generates a transmission timestamp T5 for this message;

[0033] The embedded microprocessor receives the Sync message and generates a reception timestamp T6 for this message;

[0034] The clock deviation Offset between the local clock of the embedded microprocessor and the master clock of the computer is:

[0035] Offset = T6 - T5 - AverageDelay

[0036] The embedded microprocessor performs clock synchronization correction once within each clock synchronization period SI according to the value of Offset, so as to keep the local clock of the embedded microprocessor synchronized with the master clock of the computer.

[0037] As a further solution of the present invention: The process by which the embedded microprocessor receives command information to control the operation of the joint motor is:

[0038] The joint node uses the timestamp asynchronous technology to package a transmission timestamp a and an execution timestamp b in the command information sent to the embedded microprocessor, where a < b;

[0039] After receiving the command information, the embedded microprocessor compares the transmission timestamp a and the execution timestamp b with the local clock. When a < local clock < b, the embedded microprocessor waits for the local clock to reach b before executing the command information to control the operation of the joint motor;

[0040] When b≦local clock, the embedded microprocessor immediately executes the command information to control the operation of the joint motor.

[0041] As a further solution of the present invention: different joint groups are divided according to the attributes between the joints of the robot, and corresponding joint group nodes are compiled for each joint group, wherein the attributes include: joint function, joint sensor type, and joint motor drive mode.

[0042] As a further solution of the present invention: by modifying the code of the joint node or the joint group node in the ROS2 system, the function of the corresponding joint is adjusted, and when any joint node or joint group node is added or deleted, the information topic of the joint node or joint group node is synchronously created or deleted in the ROS2 system.

[0043] Beneficial effects of the present invention:

[0044] The present invention provides an embedded robot joint motor synchronization control method, which realizes wireless control of the robot joint by compiling corresponding joint nodes for the robot joint in the computer's ROS2 system and burning the ROS2 program in the embedded microprocessor that controls the operation of the joint motor; using the PTPv2 service to synchronize the local clock of the embedded microprocessor with the computer's main clock; using the timestamp asynchronous technology to send command information to the embedded microprocessor, solves the problem that when the traditional serial parallel bus is used to synchronize the robot's joint motor, the physical differences between the data lines cause time errors when each embedded microprocessor receives the command, thereby reducing the effect of the synchronous control of the joint motor. The present invention improves the time synchronization accuracy when the robot joint motor is synchronized. Compared with the traditional serial parallel bus control method, the method is more flexible in the synchronous control mode of the joint motor, which is conducive to the subsequent maintenance and upgrade of the robot and reduces the hardware cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The present invention will be further described below in conjunction with the accompanying drawings.

[0046] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] See also Figure 1As shown, the present invention is an embedded robot joint motor synchronization control method, comprising the following steps:

[0049] Set the computer's internal clock as the master clock, and the command sent to the robot and the robot's joint movement are based on the time of this master clock. Run the ROS2 system in the computer and compile joint nodes 1, joint nodes 2, ..., joint nodes N for each joint of the robot. N is a positive integer. The joint nodes collect sensor information and motor operation feedback information in the corresponding robot joints, and generate command information to control the operation of the joint motor after calculation and processing. The code in the joint node that controls the operation of the corresponding joint motor is the main code and needs to be written manually, while other functions, such as: node initialization and shutdown, node message publishing and subscription, node service call, node information processing, node loop, etc. can be called directly in the ROS2 system.

[0050] The information content of each joint node is uploaded to the ROS2 system and a corresponding information topic is created. The types of information content include sensor information, motor operation feedback information and command information. The ROS2 system transmits information between joint nodes based on the DDS protocol. The joint node sends the information content to the information topic based on the DDS protocol. The ROS2 system then forwards the information content to all joint nodes that have subscribed to the corresponding information topic through the DDS protocol. This DDS-based information transmission method allows each joint node to serve as both an information transmitter and receiver, reducing the coupling between joint nodes, and thus reducing the coupling between robot joints, but will improve the robustness of the overall process of robot joint synchronization control.

[0051] Use the quality of service QoS policy provided by DDS to set the communication indicators of joint nodes when transmitting information, including: information sending mode, information storage method, information queue, and information existence time limit.

[0052] Perform clock synchronization on the embedded microprocessor in the robot joint, configure PTPv2 service in the computer and embedded microprocessor, note that the computer needs to support Linux operating system, and select embedded microprocessor that supports PTPv2 service. Set clock synchronization interval SI = 2 -m Seconds, m is a natural number. For example, when m=3, it means that the local clock of the microprocessor is corrected three times within one second. The actual value is selected according to the needs. After the configuration is completed, the PTPv2 service is started, and the local clock of the embedded microprocessor is corrected according to the clock synchronization interval to synchronize the local clock with the master clock. The purpose of correcting the local clock of the microprocessor is to make all microprocessors work with reference to a clock standard to ensure the time synchronization of multiple joint motors when they cooperate.

[0053] Burn the ROS2 program code in the embedded microprocessor to realize wireless communication with the joint nodes in the ROS2 system. It supports the use of Bluetooth or WI-FI to start the nodes in the ROS2 system. The joint nodes use the timestamp asynchronous control technology to send the generated command information to the corresponding embedded microprocessor. After the embedded microprocessor recognizes the command information, it controls the operation of the joint motor.

[0054] In a preferred embodiment of the present invention, the ROS2 system uses the DDS protocol to perform information transmission between joint nodes as an asynchronous process. For any joint node, the joint node will timestamp the information content to be published and upload it to the information topic of the corresponding information type, and then directly calculate and process it to generate command information to control the operation of the joint motor, without waiting for all other joint nodes that have subscribed to the information topic to receive the information content. At the same time, any joint node only receives information content when the ROS2 system forwards the information content to the joint node. This information transmission mode can improve the working efficiency of the joint node and avoid the redundant time when the joint node waits for other joint nodes to respond.

[0055] In a preferred case of this embodiment, the process of setting the QoS policy is:

[0056] The information sending mode is set for the joint nodes according to the weight of the information content sent. The weight of the information content is divided by the importance of the task actually undertaken by the robot joint corresponding to the joint node. For example, for a welding robot, the wrist joint and the welding gun rotation joint that control the welding gun to perform the welding task undertake the most important tasks in the welding task, so the information sent by the nodes corresponding to these two joints has the highest weight. The information sending mode includes a reliable mode and an effort mode. The reliable mode ensures that the information content of the information topic of each joint node is always fully received by other joint nodes that have subscribed to the information topic. When it is not fully received, the information content is re-uploaded to the ROS2 system; the effort mode only uploads the information content to the ROS2 system once.

[0057] The information saving method includes the save last method and the save all method. The reliable mode corresponds to the save all method, and the effort mode corresponds to the save last method. The save last method will only retain the M latest uploaded information locally at the joint node, where M is a positive integer. The save all method will save all uploaded information at the joint node. Selecting different information saving methods for information of different importance can avoid unnecessary waste of computing power and improve node response speed.

[0058] Get the data volume of the information content that the joint node cannot process temporarily, set the corresponding length of the information queue, cache the information content that cannot be processed temporarily into the information queue, and wait for the joint node to process it in sequence. When setting the length of the information queue, it is also based on the weight of the information content. For the joint nodes that subscribe to important information, the length of its information queue can be appropriately increased. In addition, for the joint nodes with large information processing volume, the length of its information queue can also be appropriately increased. It should be noted that the length of the information queue cannot be set too long or too short. Too long will lead to waste of memory space and increase of information processing delay. Too short will cause the information queue to be quickly filled and cause the loss of subsequent messages.

[0059] Set the information existence time limit K. When the joint node receives sensor information and motor feedback information, it calculates the difference between the current master clock and the timestamp of the information content. When the difference exceeds K, the information content is regarded as timeout information, and the joint node gives up processing the information content. The purpose of this practice is to ensure that the commands generated by the joint node are real-time. For example, joint node A sends a sensor image information at a certain moment, and joint node B first stores the information in the information queue. If when B starts to process the image information, the current time is far away from the time sent by A, then B cannot generate the next command based on the image information and needs to give up processing.

[0060] In another preferred embodiment of the present invention, when the local clock of the embedded microprocessor is corrected, the average delay of the link between each local clock and the master clock is first calculated:

[0061] A clock synchronization interval SI is set in the PTP service of the computer and the embedded microprocessor. After starting the PTP service, the following operations are performed within the clock synchronization interval SI:

[0062] The embedded microprocessor sends a Pdelay_Req message to the computer and generates a sending timestamp T1 of the message;

[0063] The computer receives the Pdelay_Req message and generates a receiving timestamp T2 of the message;

[0064] The computer sends a Pdelay_Resp message and generates a sending timestamp T3 of the message;

[0065] The embedded microprocessor receives the Pdelay_Resp message and generates a T4 timestamp locally; finally, a set of timestamps (T1, T2, T3, T4) is obtained;

[0066] Mark the transmission link delay from the embedded microprocessor to the computer as t-req, and the transmission link delay from the computer to the embedded microprocessor as t-res, to obtain the total link round-trip delay t from the embedded microprocessor to the computer 总 as follows:

[0067] t 总 = t-req + t-res = (T4 - T1) - (T3 - T2)

[0068] The average link delay AverageDelay between the embedded microprocessor and the computer is:

[0069] AverageDelay = [(T4 - T1) - (T3 - T2)] / 2

[0070] The above calculation process is executed once within each clock synchronization period SI.

[0071] In a preferred case of this embodiment, the process of local clock correction based on the calculated average link delay is as follows:

[0072] After calculating the average link delay, the computer sends a Sync message to the embedded microprocessor, generating a transmission timestamp T5 for this message;

[0073] The embedded microprocessor receives the Sync message, generating a reception timestamp T6 for this message;

[0074] The clock deviation Offset between the local clock of the embedded microprocessor and the master clock of the computer is:

[0075] Offset = T6 - T5 - AverageDelay

[0076] The embedded microprocessor performs clock synchronization correction once within each clock synchronization period SI according to the value of Offset, to keep the local clock of the embedded microprocessor synchronized with the master clock of the computer.

[0077] In another preferred embodiment of the present invention, the process of the embedded microprocessor receiving command information to control the operation of the joint motor is as follows:

[0078] The joint node uses timestamp asynchronous technology, and packs a transmission timestamp a and an execution timestamp b in the command information sent to the embedded microprocessor, where a < b;

[0079] After receiving the command information, the embedded microprocessor compares the transmission timestamp a and the execution timestamp b with the local clock. When a < local clock < b, the embedded microprocessor waits for the local clock to reach b before executing the command information to control the operation of the joint motor;

[0080] When b≦local clock, the embedded microprocessor immediately executes the command information to control the operation of the joint motor. The use of this timestamp asynchronous technology for the joint can reduce the impact of network delay on joint synchronization control and effectively solve the time synchronization problem between multiple joint motors. In addition, this method makes the action of the joint motor predictable, which is conducive to the subsequent optimization of the joint motor operation.

[0081] In another preferred embodiment of the present invention, different joint groups are divided according to the properties between the joints of the robot, and corresponding joint group nodes are compiled for each joint group. The properties include: joint function, joint sensor type, and joint motor drive mode. By packaging some joints to directly create corresponding joint group nodes, the number of nodes created can be reduced and the system can be streamlined.

[0082] In a preferred case of the present embodiment, the function of the corresponding joint is adjusted by modifying the code of the joint node or the joint group node in the ROS2 system. When any joint node or joint group node is added or deleted, the information topic of the joint node or joint group node is synchronously created or deleted in the ROS2 system. This method does not require the entire robot control system to be modified when the robot is upgraded and maintained. Only the parts that need to be adjusted need to be modified separately, which greatly reduces the difficulty of upgrade and maintenance.

[0083] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. An embedded robot joint motor synchronization control method, characterized in that: The following steps are involved: The internal clock of the computer is set as the main clock, the ROS2 system is run in the computer, and joint nodes 1, joint nodes 2, ..., joint nodes N are compiled for each joint of the robot, where N is a positive integer. The joint nodes collect sensor information and motor operation feedback information in the corresponding robot joints, and generate command information for controlling the operation of the joint motors after calculation and processing; The information content of each joint node is uploaded to the ROS2 system and a corresponding information topic is created. The types of information content include sensor information, motor operation feedback information and command information. The ROS2 system transmits information between joint nodes based on the DDS protocol. The joint node sends the information content to the information topic based on the DDS protocol. The ROS2 system then forwards the information content to all joint nodes that have subscribed to the corresponding information topic through the DDS protocol. Use the QoS policy provided by DDS to set the communication indicators of joint nodes during information transmission, including: information sending mode, information storage method, information queue, and information existence time limit; Perform clock synchronization on the embedded microprocessor in the robot joint, configure the PTPv2 service in the computer and embedded microprocessor and set the clock synchronization interval SI = 2 -m seconds, m is a natural number. After the configuration is complete, the PTPv2 service is started, and the local clock of the embedded microprocessor is corrected according to the clock synchronization interval to synchronize the local clock with the master clock. Burn the ROS2 program code in the embedded microprocessor to realize wireless communication with the joint nodes in the ROS2 system, start the nodes in the ROS2 system, and the joint nodes use the timestamp asynchronous control technology to send the generated command information to the corresponding embedded microprocessor. After the embedded microprocessor recognizes the command information, it controls the operation of the joint motor.

2. The embedded robot joint motor synchronous control method according to claim 1 is characterized in that: The ROS2 system uses the DDS protocol to transmit information between joint nodes as an asynchronous process. For any joint node, the joint node will timestamp the information content to be published and upload it to the information topic of the corresponding information type, and then directly calculate and process it to generate command information for controlling the operation of the joint motor. There is no need to wait for all other joint nodes that have subscribed to the information topic to receive the information content. At the same time, any joint node only receives information content when the ROS2 system forwards the information content to the joint node.

3. The embedded robot joint motor synchronous control method according to claim 2 is characterized in that: The process of setting QoS policy is as follows: According to the weight of the information content to be sent, the information sending mode is set for each joint node. The information sending mode includes a reliable mode and an effort mode. The reliable mode ensures that the information content of the information topic of each joint node is always fully received by other joint nodes that have subscribed to the information topic. When the information content is not fully received, the information content is re-uploaded to the ROS2 system; the effort mode only uploads the information content to the ROS2 system once; The information saving modes include the last saving mode and the all saving mode. The reliable mode corresponds to the all saving mode, and the effort mode corresponds to the last saving mode. The last saving mode only retains the latest M pieces of information uploaded locally at the joint node, where M is a positive integer. The all saving mode saves all uploaded information at the joint node. Obtain the data volume of information content that the joint node cannot process temporarily, set an information queue of corresponding length, cache the information content that cannot be processed temporarily into the information queue, and wait for the joint node to process it in sequence; Set an information existence time limit K. When the joint node receives sensor information and motor feedback information, calculate the difference between the current master clock and the timestamp of the information content. When the difference exceeds K, the information content is regarded as timeout information, and the joint node abandons processing the information content.

4. The embedded robot joint motor synchronous control method according to claim 1, characterized in that: When performing clock calibration on the local clock of the embedded microprocessor, first calculate the average link delay between each local clock and the master clock: Set a clock synchronization interval SI in the PTP service of the computer and the embedded microprocessor. After starting the PTP service, perform the following operations within the clock synchronization interval SI: The embedded microprocessor sends a Pdelay_Req message to the computer and generates the transmission timestamp T1 of this message; The computer receives the Pdelay_Req message and generates the reception timestamp T2 of this message; The computer sends a Pdelay_Resp message and generates the transmission timestamp T3 of this message; The embedded microprocessor receives the Pdelay_Resp message and generates a T4 timestamp locally; finally, a set of timestamps (T1, T2, T3, T4) is obtained; The transmission link delay from the embedded microprocessor to the computer is marked as t-req, and the transmission link delay from the computer to the embedded microprocessor is marked as t-res, and the total link round-trip delay from the embedded microprocessor to the computer is obtained as t 总 for: t 总 =t-req+t-res=(T4-T1)-(T3-T2) The average link delay AverageDelay between the embedded microprocessor and the computer is: AverageDelay = [(T4 - T1) - (T3 - T2)] / 2 The above calculation process is executed once in each clock synchronization period SI.

5. The embedded robot joint motor synchronous control method according to claim 4 is characterized in that: The process of performing local clock calibration based on the average link delay calculated above is: After calculating the average link delay, the computer sends a Sync message to the embedded microprocessor and generates the transmission timestamp T5 of this message; The embedded microprocessor receives the Sync message and generates the reception timestamp T6 of this message; The clock deviation Offset between the local clock of the embedded microprocessor and the master clock of the computer is: Offset = T6 - T5 - AverageDelay The embedded microprocessor performs clock synchronization calibration once in each clock synchronization period SI according to the value of Offset to keep the local clock of the embedded microprocessor synchronized with the master clock of the computer.

6. The embedded robot joint motor synchronous control method according to claim 1, characterized in that: The process of the embedded microprocessor receiving command information to control the operation of the joint motor is: The joint node uses timestamp asynchronous technology to package a transmission timestamp a and an execution timestamp b in the command information sent to the embedded microprocessor, where a < b; After receiving the command information, the embedded microprocessor compares the transmission timestamp a and the execution timestamp b with the local clock. When a < local clock < b, the embedded microprocessor waits for the local clock to reach b before executing the command information to control the operation of the joint motor; When b ≤ local clock, the embedded microprocessor immediately executes the command information to control the operation of the joint motor.

7. The embedded robot joint motor synchronous control method according to claim 1, characterized in that: Divide different joint groups according to the attributes between the joints of the robot, and compile corresponding joint group nodes for each joint group. The attributes include: joint function, joint sensor type, and joint motor drive method.

8. The embedded robot joint motor synchronous control method according to claim 7, characterized in that: By modifying the code of the joint node or joint group node in the ROS2 system, the function of the corresponding joint is adjusted. When any joint node or joint group node is added or deleted, the information topic of the joint node or joint group node is synchronously created or deleted in the ROS2 system.

Citation Information

Patent Citations

  • Ground equipment performance test system

    CN113595835A

  • Robot control system and robot

    CN114407026A

  • Multi-domain cross-scale data acquisition timing method

    CN116155433A

  • General purpose robotics operating system with unmanned and autonomous vehicle extensions

    US20160221186A1