Robot control system and method, storage medium, and electronic device
By adopting heterogeneous systems and real-time control frameworks in the robot control system, the problem of poor real-time performance when soft real-time systems are used to control robots is solved, and higher control stability and efficiency are achieved.
Patent Information
- Application Number
- CN202510046797.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-13
AI Technical Summary
The existing soft real-time system has poor real-time performance and is unstable when controlling robots.
Using heterogeneous systems, combining non-real-time systems and hard real-time systems, the real-time control framework includes control communication modules, motion algorithm modules and distributed communication modules, and data transmission is carried out through the real-time transmission protocol of the hard real-time system.
It reduces the control delay of the robot by non-real-time systems, improves the control stability of the robot, simplifies the data transmission process, and improves efficiency.
Smart Images

Figure CN119906741A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot control, and in particular to a robot control system, method, storage medium and electronic device. Background Art
[0002] In the prior art, robots can be controlled by robot control systems. Traditional robot control systems are generally implemented based on the robot control platform (Robot Operating System 2, ros2) framework on a real-time operating system (AReal-Time Linux, rtlinux). rtlinux simulates a real-time operating system by installing real-time software. This type of soft real-time system has poor real-time performance compared to a true hard real-time system. When running multiple robot programs, there is a jitter of up to 100uS, a high delay, and cannot meet high stability. Summary of the invention
[0003] The present application provides a robot control system, method, storage medium and electronic device to solve the technical problems of poor real-time performance and instability of soft real-time system controlling robots.
[0004] In the first aspect, the present application provides a robot control system, which runs in a heterogeneous system, and the heterogeneous system includes: a non-real-time system and one or more hard real-time systems, a first control system runs on the non-real-time system, and a real-time control framework runs on the hard real-time system; the real-time control framework includes: a control communication module, a motion algorithm module and a distributed communication module; the control communication module is used to send control instructions to the controlled robot and receive feedback data of the robot, the motion algorithm module is used to calculate the feedback data, and the distributed communication module is used to implement distributed communication; the hard real-time system sends the collected robot feedback data to the first control system on the non-real-time system by calling the sending function in the real-time transmission protocol of the distributed communication module; and receives the control instructions of the first control system by calling the receiving function in the real-time transmission protocol of the distributed communication module; and sends the control instructions to the robot through the control communication module.
[0005] In one example, the real-time control framework includes: a second control system and control software; the control software includes the control communication module and the motion algorithm module; the control software calls the second control system and uses the second control system as the distributed communication module to perform distributed communication with the non-real-time system and / or other hard real-time systems.
[0006] In one example, the control software is Orocos; the control communication module, the motion algorithm module and the distributed communication module are Orocos real-time modules created by inheriting the real-time tool set of Orocos.
[0007] In one example, the control communication module supports one or more of the following bus protocols: AUTBUS protocol, EtherCAT protocol and TSN protocol; the real-time transmission protocol includes: fast DDS protocol.
[0008] In one example, constructing the control communication module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the control communication module; after setting the communication transmission function to be used and setting the function call interface, creating the communication transmission function and opening the function call interface; connecting the robot through the communication transmission function and reading the feedback data of the robot at a fixed frequency, and cleaning up the memory data after disconnecting from the robot; constructing the motion algorithm module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the motion algorithm module; setting and creating closed-loop control and kinematic solution functions, and opening the function interface of the closed-loop control and kinematic solution functions; after importing the feedback data of the robot, performing kinematic solution on the feedback data to obtain the calculated feedback data, and cleaning up the memory data after the calculation is completed; constructing the distributed communication module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the distributed communication module; setting the communication transmission function to be used and setting the function call interface; converting the communication protocol used by the communication transmission function to the real-time transmission protocol.
[0009] In one example, the size of the message queue storing the control instructions in the hard real-time system is adjusted from an original value to a first value, where the first value is smaller than the original value.
[0010] In one example, before calling a sending function or a receiving function in a real-time transport protocol, the method further includes: disabling or removing a qos service in the real-time transport protocol.
[0011] In one example, the control communication module, the motion algorithm module and the distributed communication module communicate with each other through a shared memory of the hard real-time system.
[0012] In a second aspect, the present application provides a robot control method, which controls the robot through any one of the robot control systems described above.
[0013] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the memory stores a computer program, and the processor is configured to implement any one of the above-mentioned data transmission methods when executing the computer program.
[0014] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute any of the above data transmission methods of the present application.
[0015] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the solution provided by the embodiment of the present application controls the robot by means of a robot control system running in a heterogeneous system. Since the heterogeneous system includes: a non-real-time system and one or more hard real-time systems, a first control system runs on the non-real-time system, and a real-time control framework runs on the hard real-time system; the real-time control framework includes: a control communication module, a motion algorithm module and a distributed communication module; the control communication module is used to send control instructions to the controlled robot and receive feedback data from the robot, the motion algorithm module is used to calculate the feedback data, and the distributed communication module is used to implement distributed communication; the hard real-time system is connected via a control module; The sending function in the real-time transmission protocol of the distributed communication module is called to send the collected feedback data of the robot to the first control system on the non-real-time system; and the control instruction of the first control system is received by calling the receiving function in the real-time transmission protocol of the distributed communication module; and the control instruction is sent to the robot through the control communication module, so that data can be transmitted between the robot and the first control system on the non-real-time system through the receiving function and the sending function deployed in the real-time control framework on the hard real-time system, thereby reducing the operational complexity of the data transmission process and improving the data transmission efficiency, thereby reducing the delay of the first control system on the non-real-time system in controlling the robot and improving the control stability of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0019] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;
[0020] Figure 2 A distributed transmission schematic diagram of a data transmission method provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of data transmission and reception of a data transmission method provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of distributed data transmission of a data transmission method provided in an embodiment of the present application;
[0023] Figure 5 A functional module diagram of a data transmission method provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0026] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0027] In order to solve the technical problems of poor real-time performance and instability of soft real-time system controlling robots in the prior art, the present application provides a robot control system and method, which can reduce the delay of the robot control system on the non-real-time system in controlling the robot and improve the control stability of the robot.
[0028] Figure 1 This is a flow chart of a robot control system provided in an embodiment of the present application. Figure 1 As shown, the above system runs in a heterogeneous system, and the heterogeneous system includes: a non-real-time system and one or more hard real-time systems, Figure 1 A hard real-time system is shown in the figure, wherein a first control system runs on the non-real-time system, and a real-time control framework runs on the hard real-time system; the real-time control framework includes: a control communication module, a motion algorithm module and a distributed communication module; the control communication module is used to send control instructions to the controlled robot and receive feedback data of the robot, the motion algorithm module is used to calculate the feedback data, and the distributed communication module is used to implement distributed communication; the hard real-time system sends the collected feedback data of the robot to the first control system on the non-real-time system by calling the sending function in the real-time transmission protocol of the distributed communication module; and receives the control instructions of the first control system by calling the receiving function in the real-time transmission protocol of the distributed communication module; and sends the control instructions to the robot through the control communication module.
[0029] The first control system on the non-real-time system in this embodiment can be a system for initiating control instructions to the robot, and controlling the robot through the control instructions. The above-mentioned real-time transmission protocol is a protocol deployed in the first operating system, the above-mentioned first operating system is located in the non-real-time system, and the real-time control framework is deployed in the hard real-time system.
[0030] In this embodiment, the non-real-time system can be a soft real-time system, and the hard real-time system is a system that has stricter task completion time. Generally, the task is required to be completed in a very short time. For example, when the airbag is activated, a response is required in a very short time to ensure the safety of the car owner. In this embodiment, the first control system is located on the non-real-time system, and the first control system on the non-real-time system can develop more comprehensive and complex control instructions, control modes and control functions. A real-time control framework is deployed on the hard real-time system, and the real-time control framework includes a control communication module, a motion algorithm module and a distributed communication module.
[0031] The real-time control framework can obtain information about the robot, such as operating status, hardware parameters, etc., and transmit this part of data to the first control system of the non-real-time system through the real-time transmission protocol, and the first control system of the non-real-time system sends the control instructions to the real-time control framework through the real-time transmission protocol, and the real-time control framework sends it to the robot to control the operation of the robot. For example, the robot can be a car, a part of a car, a drone, a mechanical dog, a swarm of drones or mechanical dogs, etc.
[0032] In this embodiment, a sending function and a receiving function are deployed in the real-time transmission protocol. By calling the sending function, the hard real-time system can collect robot data and send the collected robot data to the first control system on the non-real-time system. By calling the receiving function, the hard real-time system can receive control instructions from the above-mentioned first control system to control the above-mentioned robot.
[0033] In this embodiment, the control communication module is used to send or receive control instructions, is responsible for communicating with the robot, sending control instructions to the controlled robot, and receiving feedback data from the robot, and the motion algorithm module is used to calculate the feedback data. In this embodiment, the collected robot data can be directly sent to the distributed communication module to be sent to the non-real-time system, or calculated by the motion algorithm module and then sent to the non-real-time system by the distributed communication module. The distributed communication module is used to implement distributed communication; the hard real-time system sends the collected robot feedback data to the first control system on the non-real-time system by calling the sending function in the real-time transmission protocol of the distributed communication module; and receives the control instructions of the first control system by calling the receiving function in the real-time transmission protocol of the distributed communication module; and sends the control instructions to the robot through the control communication module.
[0034] The solution provided by the embodiment of the present application controls the robot by a robot control system running in a heterogeneous system. Since the heterogeneous system includes: a non-real-time system and one or more hard real-time systems, a first control system runs on the non-real-time system, and a real-time control framework runs on the hard real-time system; the real-time control framework includes: a control communication module, a motion algorithm module and a distributed communication module; the control communication module is used to send control instructions to the controlled robot and receive feedback data of the robot, the motion algorithm module is used to calculate the feedback data, and the distributed communication module is used to implement distributed communication; the hard real-time system sends the collected feedback data of the robot to the first control system on the non-real-time system by calling the sending function in the real-time transmission protocol of the distributed communication module; and receives the control instruction of the first control system by calling the receiving function in the real-time transmission protocol of the distributed communication module; and sends the control instruction to the robot through the control communication module, so that data transmission can be performed between the robot and the first control system on the non-real-time system through the receiving function and the sending function deployed in the real-time control framework on the hard real-time system, thereby reducing the operational complexity of the data transmission process and improving the data transmission efficiency, thereby reducing the delay of the first control system on the non-real-time system controlling the robot and improving the control stability of the robot.
[0035] As an optional example, the real-time control framework includes: a second control system and control software; the control software includes the control communication module and the motion algorithm module; the control software calls the second control system and uses the second control system as the distributed communication module to perform distributed communication with the non-real-time system and / or other hard real-time systems.
[0036] That is to say, in this embodiment, the control software can be used as a communication control module and a motion algorithm module to provide a communication control function and a motion data solving function. The distributed communication function of the distributed communication module is realized by the second control system. Thus, in the real-time control framework, by deploying the second control system and the control software, the functions of the control communication module, the motion algorithm module and the distributed communication module are realized. The control software can be Orocos, and the control communication module and the motion algorithm module are realized by creating an Orocos real-time module by inheriting the real-time tool set of Orocos. The distributed communication module can be realized by inheriting the Orocos real-time module created by the real-time tool set of Orocos or by providing distributed functions separately.
[0037] As an optional example, the control communication module can use one or more of the following bus protocols when communicating with the robot: AUTBUS protocol, EtherCAT protocol and TSN protocol. In other words, the bus protocol for communication between the hard real-time system and the robot can be flexibly selected. On the other hand, the real-time transmission protocol for communication between the real-time system and the non-real-time system can use the fast DDS protocol.
[0038] As an optional example, the size of the message queue storing the control instructions in the hard real-time system may be adjusted from an original value to a first value, where the first value is smaller than the original value.
[0039] In this embodiment, for the non-real-time system and the hard real-time system, messages are sent and received through distributed communication. In order to allow the messages to be processed faster and reduce resource pressure, the size of the message queue of the distributed message between the hard real-time system and the first control system can be reduced, and the size of the message queue can be adjusted from the original value to the first value, thereby reducing the pressure on system resources.
[0040] In this embodiment, the extent to which the size of the message queue of the distributed message between the hard real-time system and the first control system is reduced may depend on the frequency of information interaction between the two when the first control system controls the robot. If the interaction is frequent, the message queue may be reduced to a small extent, and if the interaction is infrequent, the message queue may be greatly reduced.
[0041] In this embodiment, when communication is performed between the hard real-time system and the non-real-time system in a distributed manner, the first control system may be regarded as a node, and the hard real-time system may be regarded as a node, and the two nodes may communicate in a distributed manner.
[0042] In this embodiment, it may include not only the nodes of the first control system and the nodes of the hard real-time system, but also other nodes, such as other hard real-time systems may also be a node. In one example, there are multiple first control systems, each serving as a node, and there are multiple hard real-time systems, each located at a node. Then, the message of the first control system can be sent in a distributed manner to one or more robots of the hard real-time system to be controlled (assuming that one first control system controls multiple robots), and the hard real-time system can receive control messages of one or more first operating systems (assuming that multiple first control systems can control different parts of a robot). Sending and receiving messages through a distributed system can improve the efficiency of sending and receiving messages.
[0043] In this embodiment, sending the robot data to the first control system through distributed communication or receiving the control instructions of the first control system through distributed communication includes: broadcasting the robot data through distributed communication so that the first control system subscribed to the robot data receives the robot data; or subscribing to the message of the first control system and receiving the control instructions when the first control system sends the control instructions.
[0044] In this embodiment, when sending or receiving messages through a distributed system, you can subscribe to messages. Since the distributed system is a divergent message broadcast, it does not send messages one-to-one to a certain party. Therefore, in the case where the hard real-time system broadcasts the above robot data through distributed communication, the first control system needs to subscribe to the distributed message of the hard real-time system in advance, so that the first control system can receive the distributed message as soon as the hard real-time system releases it. The first control system also broadcasts control instructions in a distributed communication manner. Therefore, the hard real-time system needs to subscribe to the message of the distributed control system to obtain the control instructions. Figure 2 This is an exemplary schematic diagram of sending and receiving messages through distributed communication. The direction of the arrow indicates the message subscription direction. The data of the corresponding node is obtained through message subscription. Messages that are not subscribed cannot be received.
[0045] As an optional example, before calling the sending function or receiving function in the real-time transport protocol, the method further includes: disabling or removing the qos service in the real-time transport protocol.
[0046] In this embodiment, in order to reduce the pressure on system resources, the network quality of service (QoS) service in the above-mentioned real-time transport protocol can be disabled or removed. The QoS service can be a part of the code on the hard real-time system. If the QoS service is to be disabled, the part of the code can be set to be uncallable. If the QoS service is to be removed, the part of the code can be deregistered or deleted.
[0047] As an optional example, the control communication module, the motion algorithm module and the distributed communication module communicate with each other through the shared memory of the hard real-time system. By sharing the memory, the efficiency of data transmission between the various parts can be improved.
[0048] In the present embodiment, the above-mentioned first control system can be a platform (Robot Operating System, ros) developed by the robot, (Robot Operating System 2, ros2) and the like. In the present embodiment, micro_ros can also be used as the first control system. Micro_ros is an important component of the ros2 ecosystem, a lightweight ros version designed specifically for microcontrollers, with a light weight, which helps to improve real-time performance. And micro_ros uses the most basic Micro XRCE-DDS protocol, optimizes real-time performance, and provides a micro_ros_agent agent to achieve communication between micro_ros and ros2, ensuring the compatibility of micro_ros with upper-layer applications. The above-mentioned real-time control framework can be a robot operating software (Open Robot Control Software, Orocos) framework, and Orocos itself uses a real-time tool library (real time tools, RTT) to improve real-time performance, and runs on a hard real-time system at the same time. Compared with traditional soft real-time systems, Orocos running on a hard real-time system has stronger stability. Orocos can be used to receive control instructions of a robot control system to control a robot. In this embodiment, Orocos and micro_ros can be integrated to obtain a fusion control framework to ensure high-precision task scheduling and real-time performance while realizing distributed communication between real-time systems and real-time systems, and between real-time systems and non-real-time systems.
[0049] The fusion control framework of this embodiment retains the componentized design of Orocos, and replaces the MicroXRCE-DDS protocol of micro_ros with the repackaged distributed communication standard protocol Fast DDS, so that it no longer needs micro_ros_agent for relaying, and directly has the distributed communication characteristics of ros2, realizing distributed communication between real-time systems and real-time systems, and between real-time systems and non-real-time systems.
[0050] In this embodiment, for the above-mentioned Fast DDS, configuration can be performed. In the sending module DataWriter and the receiving module DataReader of Fast DDS, new functions DataWriterImpl::micro_write sending function and DataReaderImpl::micro_read receiving function are respectively created based on the DataWriterImpl class and the DataReaderImpl class to receive and process micro_ros messages. When micro_ros sends a message, it is converted and sent by the DataWriterImpl::micro_write function and directly published as a message in ros2 format, so that the robot control system of the non-real-time system can receive the message; when receiving the message, it is received and converted through DataReaderImpl::micro_read to realize the mutual conversion of micro_ros and ros2 message formats. Figure 3 This is a schematic diagram of the message sending and receiving of this embodiment. micro_ros converts micro_ros messages and ros2 messages through the DataWriterImpl::micro_write sending function and the DataReaderImpl::micro_read receiving function, thereby communicating with the robot control system of the non-real-time system.
[0051] In addition, in order to reduce the pressure on system resources, the qos mechanism of Fast DDS was removed, the historical message mechanism was simplified, and the size of the message queue was reduced, so as to reduce the resource pressure as much as possible while ensuring basic communication and message conversion functions.
[0052] Orocos and micro_ros achieve data communication through encapsulated shared memory shared interface. Orocos collects robot data collected from lower-level hardware and sends it to micro_ros through shared memory interface (state_interface), while micro_ros sends control commands to Orocos through shared memory interface (command_interface). The shared memory communication method can avoid queue congestion during data transmission. Orocos and micro_ros together form a node, which uses the encapsulated Fast DDS protocol for distributed communication through user-defined message subscription topics. Other real-time / non-real-time systems in the same LAN can directly send and receive data through the corresponding topic, that is, distributed communication. Figure 4 FIG. 2 is a schematic diagram of distributed communication in this embodiment. Each hard real-time system and each non-real-time system are regarded as a node, and distributed communication is performed between the nodes.
[0053] The fusion control architecture of this embodiment can be called CORos2, which retains the component-based characteristics of Orocos and can expand functions by adding modules. micro_ros integrates the shared memory interface protocol and the repackaged Fast DDS protocol, and compiles them into a CORos2 static library.
[0054] Figure 5 is a specific example of this embodiment. The ethercat slave / opencan slave and ethercat master / opencan master can be regarded as the robot side, and the data on the robot side is collected by the control communication module and then sent to the distributed communication module through the shared memory. The control communication module is used to output the control command to the control component, that is, the robot, and receive the feedback data of the control component. The motion algorithm module is used to perform pid closed-loop control and kinematic solution. The distributed communication module is used to implement distributed communication based on micro_ros.
[0055] In order to realize the communication function of the control communication module, a cpp file can be created through the integrated development environment (IDE), and an Orocos real-time module can be created by inheriting the RTT::TaskContext class of Orocos, which is recorded as control_message_component. In the constructor of the RTT::TaskContext class, the following operations are performed: define the real-time input interface, real-time output interface and properties of the control communication module; after setting the communication transmission function to be used and setting the function call interface, create the communication transmission function and open the function call interface; connect the robot through the communication transmission function and read the feedback data of the robot at a fixed frequency, and clean up the memory data after disconnecting from the robot; the specific operations are:
[0056] Use the RTT::Input and RTT::Output methods to define real-time input and output interfaces.
[0057] Use the operational caller method to set the function call interface and the communication transmission function.
[0058] Call the properties method to define the properties of the communication module.
[0059] Create a communication transmission function based on the communication protocol used (can, ethercat), and use the addOperation method to open the function interface.
[0060] Establish the connection between the communication module and the control component in the StartHook function.
[0061] In the UpdateHook function, the feedback data of the control component is read at a fixed frequency.
[0062] In the CleanHook function, disconnect the control component and clean up the memory.
[0063] In the module, two shared memory interfaces, command_interface and state_interface, are used to replace the native CORBA of Orocos for data exchange between modules.
[0064] In order to realize the functions of the motion algorithm module, you can create a cpp file through the IDE, inherit the Orocos RTT::TaskContext class to create an Orocos real-time module, recorded as motion_algorithm_component.
[0065] In the constructor of the RTT::TaskContext class, perform the following operations: define the real-time input interface, real-time output interface and properties of the motion algorithm module; set and create closed-loop control and kinematic solution functions, and open the function interfaces of the closed-loop control and kinematic solution functions; after importing the feedback data of the robot, perform kinematic solution on the feedback data to obtain the calculated feedback data, and clean up the memory data after the calculation is completed; the specific operations are:
[0066] Use the RTT::Input and RTT::Output methods to define real-time input and output interfaces. The input interface receives the return data from the control component, and the output interface transmits the calculated control instructions.
[0067] Use the operational caller method to set the function call interface, set the closed-loop control and kinematic solution functions.
[0068] Call the properties method to define properties related to the motion algorithm function.
[0069] Create closed-loop control functions and kinematic solution functions, and use the addOperation method to open the function interface.
[0070] Initialize the pid parameter in the StartHook function and import robot related data.
[0071] Implement data reading and writing in the UpdateHook function to perform kinematics solution.
[0072] Clean up resources in the CleanHook function.
[0073] The motion algorithm module needs to exchange data with the control communication module and the memory communication module, which is based on the shared memory interfaces of the two encapsulations command_interface and state_interface.
[0074] In order to realize the function of the distributed communication module, a cpp file can be created based on the CORos2 static library, and an Orocos real-time module can be created by inheriting the RTT::TaskContext class of Orocos, which is recorded as rtt_micros_component.
[0075] In the constructor of the RTT::TaskContext class, the following operations are performed: define the real-time input interface, real-time output interface and properties of the distributed communication module; set the communication transmission function used and set the function call interface; convert the communication protocol used by the communication transmission function to the real-time transmission protocol; the specific operations are:
[0076] Use the RTT::Input and RTT::Output methods to define real-time input and output interfaces.
[0077] Use the operational caller method to set the function call interface and the communication transmission function.
[0078] Call the properties method to define the properties of the communication module.
[0079] Implement communication protocol conversion in the UpdateHook function.
[0080] The distributed communication module reads the status information of the control device through state_interface, sends control information through command_interface, and realizes distributed communication through Fast DDS. When initializing micro_ros, you need to use rmw_uros_set_custom_transport api for initialization, and use interfaces Intewell_transport_open, Intewell_transport_close, Intewell_transport_write, Intewell_transport_read to call the Fast DDS protocol. After compiling and running, you can see the topic defined in CORos2 in the ros2 system of the same LAN, and you can also connect more real-time system nodes to achieve collaboration.
[0081] This embodiment also provides a robot control method, which can use the above robot control system to control the robot. For other examples of this embodiment, please refer to the above examples, which will not be repeated here.
[0082] like Figure 6 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0083] Memory 113, used for storing computer programs;
[0084] In one embodiment of the present application, the processor 111 is used to implement the data transmission method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113.
[0085] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the data transmission method provided by any one of the aforementioned method embodiments is implemented.
[0086] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0088] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0089] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A robot control system, characterized in that: The system runs in a heterogeneous system, and the heterogeneous system includes: a non-real-time system and one or more hard real-time systems, the non-real-time system runs a first control system, and the hard real-time system runs a real-time control framework; the real-time control framework includes: a control communication module, a motion algorithm module and a distributed communication module; The control communication module is used to send control instructions to the controlled robot and receive feedback data from the robot. The motion algorithm module is used to calculate the feedback data. The distributed communication module is used to implement distributed communication. The hard real-time system sends the collected feedback data of the robot to the first control system on the non-real-time system by calling the sending function in the real-time transmission protocol of the distributed communication module; and receives the control instructions of the first control system by calling the receiving function in the real-time transmission protocol of the distributed communication module; and sends the control instructions to the robot through the control communication module.
2. The system according to claim 1, characterized in that The real-time control framework includes: a second control system and control software; the control software includes the control communication module and the motion algorithm module; the control software calls the second control system and uses the second control system as the distributed communication module to perform distributed communication with the non-real-time system and / or other hard real-time systems.
3. The system according to claim 2, characterized in that The control software is Orocos; The control communication module, motion algorithm module and distributed communication module are Orocos real-time modules created by inheriting the Orocos real-time tool set.
4. The system according to claim 1, characterized in that The control communication module supports one or more of the following bus protocols: AUTBUS protocol, EtherCAT protocol and TSN protocol; the real-time transmission protocol includes: fast DDS protocol.
5. The system according to claim 3, characterized in that Constructing the control communication module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the control communication module; after setting the communication transmission function to be used and setting the function call interface, creating the communication transmission function and opening the function call interface; connecting the robot through the communication transmission function and reading the feedback data of the robot at a fixed frequency, and clearing the memory data after disconnecting from the robot; Constructing the motion algorithm module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the motion algorithm module; setting and creating closed-loop control and kinematic solution functions, and opening the function interfaces of the closed-loop control and kinematic solution functions; after importing the feedback data of the robot, performing kinematic solution on the feedback data to obtain the calculated feedback data, and cleaning up the memory data after the calculation is completed; Constructing the distributed communication module in the real-time control framework includes: defining the real-time input interface, real-time output interface and properties of the distributed communication module; setting the communication transmission function used and setting the function call interface; converting the communication protocol used by the communication transmission function into the real-time transmission protocol.
6. The system according to claim 1, characterized in that Also includes: The size of the message queue storing the control instruction in the hard real-time system is adjusted from an original value to a first value, wherein the first value is smaller than the original value.
7. The system according to claim 1, characterized in that Before calling the sending function or receiving function in the real-time transport protocol, it also includes: Disable or remove the QoS service in the real-time transport protocol.
8. The system according to claim 1, characterized in that The control communication module, the motion algorithm module and the distributed communication module communicate with each other through the shared memory of the hard real-time system.
9. A robot control method, characterized in that: The method controls the robot by means of a robot control system according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein a computer program is stored in the memory, and when the processor executes the computer program, the robot control system described in any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, wherein the storage medium stores computer-executable instructions, wherein the computer-executable instructions are used to execute the robot control system described in any one of claims 1 to 8 of the present application.
Citation Information
Patent Citations
Robot-oriented embedded isomorphic multi-core control system
CN115933494A
Robot control system and control method
CN116197919A
Robot software architecture, control method, control device and robot
CN117349047A
Robot software architecture, control method, control device and robot
CN117381778A
Cross-device data distribution with modular architecture
US20220385727A1
Cited By
Robot and peripheral real-time interaction system and method based on edge computing
CN121585665A
Real-time interaction system and method for robot and peripheral based on edge computing
CN121585665B