A multi-robot serial port to WIFI communication and coordinated motion control method
By implementing serial port to WIFI communication on the OpenCR controller, the problem of high space and cost of upper computers in collaborative motion control of multiple robots is solved, and stable and flexible data transmission and control are achieved, which is suitable for small robot application scenarios.
Patent Information
- Application Number
- CN202210558533.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-05-20
AI Technical Summary
In the coordinated motion control of multiple robots, the prior art requires equiping each robot with a host computer, which leads to high cost and large space occupancy, making it difficult to be applicable to small robot application scenarios.
Implement serial port to WIFI communication on the OpenCR controller, establish a connection between the host computer and the host robot through the virtual serial port and the TCP protocol. The host robot installs two serial port to WIFI chips, and the slave robot installs a serial port to WIFI chip to realize wireless Network communication simplifies data transmission between multiple robots.
Reduce resource consumption and space occupation, ensure connection stability and data transmission accuracy, provide flexible control methods, and verify the effectiveness of control commands through closed-loop control.
Smart Images

Figure CN115026811B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of multi-agent control, and specifically relates to a multi-robot serial port to WIFI communication method and a coordinated motion control method. Background Art
[0002] In recent years, with the gradual improvement of the intelligence level of robots, the scenarios in which they can be applied have become very extensive. As the tasks to be performed and the functions to be realized become more and more complex, a single robot can no longer meet the application requirements, and the control of multiple robots has now become a key research direction. In the collaborative motion control of multiple robots, each robot and the host computer need to communicate to obtain data information. At present, the more commonly used method is to connect the robot to its respective host computer through a serial port, and then communicate over the network between the host computers. However, this method requires a host computer for each robot, which is costly and the host computer will occupy a certain space. It is not suitable for the application scenarios of some small robots. Therefore, it is critical to solve the above problems by directly realizing the communication of serial port to WIFI on the OpenCR controller. Summary of the invention
[0003] In view of this, the present invention provides a multi-robot serial port to WIFI communication and coordinated motion control method, comprising:
[0004] Step 1: Add a virtual serial port on the host computer, determine a host robot and a slave robot among multiple robots, and the multiple robots have OpenCR controllers; install and configure two serial port to WIFI chips for the OpenCR controller of the host robot, and install and configure one serial port to WIFI chip for the OpenCR controller of the slave robot;
[0005] Step 2: Connect the host computer and the host robot to the same wireless network, establish a TCP connection between the host computer as a server and the host robot, and send control instructions to the host robot;
[0006] Step 3: The slave robot follows the master robot to perform coordinated movements.
[0007] In particular, step 1 also includes: establishing a TCP server on the host computer, setting the IP and port and establishing a connection with the virtual serial port through software; setting the baud rate and data bit of the virtual serial port, and sending the monitored virtual serial port data in the form of a TCP client.
[0008] In particular, in step 2, the host computer sends a control instruction to the host computer, wherein keyboard control can be used to output the control command to directly control the angle rotation of each servo.
[0009] In particular, step 2 also includes that the host computer can also control the task coordinates of the robot through buttons, and obtain the rotation angle of each servo through inverse kinematics solution for control.
[0010] In particular, step 2 also includes setting some special postures, rotation trajectories or rotation speeds of fixed points by pressing buttons; the speed can be controlled by controlling the moving time between target points, and the robot's actuator is controlled by position feedback formed by multiple PID links.
[0011] In particular, the host robot also sends the sensor data of each servo to the host computer through the TCP client.
[0012] In particular, in step 3, the host robot establishes a TCP server, and the slave robots each establish a TCP client to establish a connection with the host robot respectively. The transmitted data is converted by the OpenCR driver, transmitted by WIFI, and converted by the serial port to WIFI chip, and finally transmitted to the OpenCR controller of each slave robot; the slave robot sends a control instruction to each joint servo by the OpenCR controller according to the obtained data.
[0013] Beneficial effects:
[0014] 1) The present invention directly implements serial port to WIFI communication on the OpenCR controller. Through the WIFI protocol, it can solve the inconvenience of multiple serial ports connecting multiple host computers in multiple robot scenarios, saving resource consumption and space occupation;
[0015] 2) In the present invention, TCP protocol is used to connect between the host computer and the host robot, and between the host robot and the slave robot, thereby ensuring the stability of the connection and the accuracy of the transmitted data;
[0016] 3) In the present invention, the host computer can directly control the state of the host robot by controlling the angles of the servos of the host robot, task coordinates, special postures, rotation trajectories or rotation speeds, etc., which has high flexibility;
[0017] 4) In the present invention, the host robot also sends the sensor data of each servo to the host computer through the TCP client, forming a closed loop of the control system, which can be used to verify whether the control command is effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a schematic diagram of the multi-robot serial port to WIFI communication and coordinated motion control structure;
[0019] Figure 2 This is a schematic diagram of an actual scenario of multi-robot collaborative motion. DETAILED DESCRIPTION
[0020] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0021] In view of this, the present invention provides a multi-robot serial port to WIFI communication and coordinated motion control method, the process is as follows Figure 1 As shown, the actual scene is as follows Figure 2 As shown, specifically including:
[0022] Step 1: Add a virtual serial port on the host computer, determine a host robot and a slave robot among multiple robots, and the multiple robots have OpenCR controllers; install and configure two serial port to WIFI chips for the OpenCR controller of the host robot, and install and configure one serial port to WIFI chip for the OpenCR controller of the slave robot.
[0023] The present invention uses Ubuntu system as the host computer, and installs Ubuntu system on Vmware Workstation virtual machine. Installs virtual serial port application software on Windows system, adds a virtual serial port to the system, adds and uses the virtual serial port on the host system on the virtual machine, sets the network to bridge network, and monitors the virtual serial port data.
[0024] Each robot consists of five servos, which are connected to the servo interface of the OpenCR controller. The OpenCR controller of the host robot is equipped with two serial-to-WIFI chips on its UART / USART port, one of which is connected to the host computer as a TCP client, and the other is connected to the slave as a TCP server. The OpenCR controller of the slave robot is equipped with a serial-to-WIFI chip on its UART / USART port, which is connected to the host robot as a TCP client. The chip automatically realizes two-way transparent transmission of serial port data and WIFI data.
[0025] Step 2: Connect the host computer and the host robot to the same wireless network. The host computer, as a server, establishes a TCP connection with the host robot and sends control instructions to the host robot.
[0026] Establish a TCP server for the host system, set the IP, port, etc., and establish a connection with the virtual serial port through software. Set the virtual serial port baud rate, data bit and other parameters, and send the monitored virtual serial port data in the form of a TCP client. The sending method is transparent transmission, that is, no processing is done on the serial port data. At the same time, the return information received by the client should also be sent to the virtual serial port to realize the two-way data conversion and transmission between the virtual serial port and WIFI.
[0027] The host computer and the host robot's chip are connected to the same WIFI network, and the host robot chip acts as a TCP client to establish a connection with the host computer's TCP server.
[0028] The host computer uses keyboard control to output control commands. Some of the buttons directly control the angle rotation of each servo, including the opening and closing of the robot gripper, and some buttons control the robot's xyz task coordinates. The rotation angle of each servo is obtained through inverse kinematics solution for control. Some special postures of fixed points can also be set with one button. The rotation trajectory selects the time when the maximum rotation angle of all joints is the minimum as the solution. The rotation speed can be set before the servo rotates. The control method of the servo is position control, which is composed of multiple PID links.
[0029] Open the virtual serial port, and the control instructions are output to the virtual serial port in the form of serial port data. After monitoring the virtual serial port data, the virtual serial port application software transmits the data through the TCP connection between the host computer and the host robot chip. After the data is transmitted to the chip, it is converted and output to the UART / USART serial port. The conversion program from the serial port to the servo interface is pre-burned in the OpenCR controller, and finally the data is transmitted to the servo for control.
[0030] At the same time, the angular position and rotation speed information collected by the servo sensor are transmitted in a completely reversed order, that is, first through the OpenCR controller conversion program, then to the serial port to WIFI chip, and finally fed back to the host computer through TCP connection and virtual serial port monitoring, thereby realizing closed-loop control.
[0031] Step 3: The slave robot follows the master robot to perform coordinated movements.
[0032] All robots are connected to the same WIFI. The host robot establishes a TCP server, and the slave robots each establish a TCP client to connect to the host.
[0033] In addition to sending the sensor data of each servo to the host computer through the TCP client, the host robot also sends it to all slave robots through the TCP server. The data is converted by the OpenCR program, transmitted by WIFI, and converted by the chip, and finally transmitted to the OpenCR controller of each slave.
[0034] The control program is pre-burned in the slave robot's OpenCR controller. Specifically, based on the information obtained from the host robot, the same servo position control command is directly sent to the servo of the slave robot, making its servo angle the same as that of the host robot. At the same time, the slave robot sensor directly feeds back to the OpenCR controller, thereby realizing closed-loop control.
[0035] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0036] It is obvious to those skilled in the art that the embodiments of the present invention are not limited to the details of the above exemplary embodiments, and that the embodiments of the present invention can be implemented in other specific forms without departing from the spirit or basic features of the embodiments of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the embodiments of the present invention is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the embodiments of the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units, modules or devices stated in the system, device or terminal claims can also be implemented by the same unit, module or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0037] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit them. Although the embodiments of the present invention have been described in detail with reference to the above preferred implementation modes, those skilled in the art should understand that the technical solutions of the embodiments of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-robot serial port to WIFI communication and coordinated motion control method, characterized in that: include: Step 1: Add a virtual serial port on the host computer, and determine a host robot and a slave robot among multiple robots, wherein the multiple robots have OpenCR controllers; Two serial port to WIFI chips are installed and configured for the OpenCR controller of the host robot, one of which is connected to the host computer as a TCP client, and the other is connected to the slave as a TCP server; and a serial port to WIFI chip is installed and configured for the OpenCR controller of the slave robot, which is connected to the host robot as a TCP client; Step 2: Connect the host computer and the host robot to the same wireless network, establish a TCP connection between the host computer as a server and the host robot, and send control instructions to the host robot; Step 3: The slave robot follows the master robot to perform coordinated motion; specifically: In addition to sending the sensor data of each servo to the host computer through the TCP client, the host robot also sends it to all slave robots through the TCP server. The data is converted by the OpenCR program, transmitted by WIFI, and converted by the chip, and finally transmitted to the OpenCR controller of each slave robot. The slave robot's OpenCR controller has the control program pre-burned. Based on the information obtained from the master robot, it directly sends the same servo position control command to the slave robot's servo, making its servo angle the same as that of the master robot.
2. The multi-robot serial port to WIFI communication and coordinated motion control method according to claim 1, characterized in that: Step 1 also includes: establishing a TCP server on the host computer, setting the IP and port and establishing a connection with the virtual serial port through software; setting the baud rate and data bit of the virtual serial port, and sending the monitored virtual serial port data in the form of a TCP client.
3. The multi-robot serial port to WIFI communication and coordinated motion control method according to claim 1, characterized in that: In step 2, the host computer sends a control instruction to the host robot, wherein the control command is outputted by keyboard control to directly control the angle rotation of each servo.
4. The multi-robot serial port to WIFI communication and coordinated motion control method as claimed in claim 3, characterized in that: Step 2 also includes the host computer controlling the robot's task coordinates by pressing buttons, and controlling the rotation angles of each servo by inverse kinematics solution.
5. The multi-robot serial port to WIFI communication and coordinated motion control method as claimed in claim 3, characterized in that: Step 2 also includes setting some special postures, rotation trajectories or rotation speeds of fixed points by pressing buttons; the speed is controlled by controlling the moving time between target points, and the robot's actuator is controlled by position feedback formed by multiple PID links.
