Robot control system configuration, remote control method and robot control system
By deploying an MQTT server on the server and configuring an MQTT client on the mobile device and wireless communication module, remote control of the robot was achieved, solving the problem of poor flexibility in traditional robot control methods and improving the flexibility and versatility of robot control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional robot control methods suffer from poor flexibility and mobility. Furthermore, inconsistent data transmission protocols among different brands of teach pendants make it difficult for robot motion controllers to parse various communication protocols, thus limiting the flexibility and versatility of robot control.
The MQTT protocol is used to deploy communication topics on the server. The mobile terminal and wireless communication module are configured with MQTT clients. The wireless communication module converts the TCP/IP protocol into the robot's internal protocol to achieve remote control.
It achieves flexibility and versatility in remote robot control, eliminates dependence on specific teach pendants, and improves the ability of mobile devices to control multiple robots.
Smart Images

Figure CN119635638B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent manufacturing technology, specifically to a robot control system configuration, a remote control method, and a robot control system. Background Technology
[0002] With the rapid development of robotics technology, industrial robots are increasingly widely used in manufacturing, logistics, and medical fields. For example, robotic arms are one of the most commonly used types of robots. Traditional robot control methods typically employ physical teach pendants or virtual teach pendant software installed on a computer. Both physical and virtual teach pendants require physical connections to the robot's motion controller. These methods have a series of limitations, including poor mobility and flexibility. Summary of the Invention
[0003] In view of this, the present invention provides a robot control system configuration, a remote control method, and a robot control system to solve the problem of poor robot control flexibility.
[0004] In a first aspect, the present invention provides a method for configuring a robot control system, the method comprising: deploying an MQTT server application in a server; deploying communication topics in the MQTT server application, the communication topics including a control topic and a response topic, the control topic being used to receive control messages sent by a mobile terminal, and the response topic being used to receive response messages sent by a motion controller; deploying a first MQTT client application in the mobile terminal, the mobile terminal being used to send the control messages to the control topic through the first MQTT client, the mobile terminal also being used to subscribe to the response topic and receive the response messages through the first MQTT client; connecting a wireless communication module to the robot's motion controller, and deploying a second MQTT client application in the wireless communication module, the wireless communication module being used to subscribe to the control topic and receive the control messages through the second MQTT client application, to convert the control messages into control commands and send them to the motion controller, the wireless communication module also being used to send the response messages to the response topic through the second MQTT client.
[0005] In some alternative implementations, when there are multiple motion controllers, the deployment of communication topics in the MQTT server application includes: deploying multiple sets of communication topics in the MQTT server application, each set of communication topics including a control topic and a response topic, each set of communication topics belonging to a motion controller of a robot, and each set of communication topics having a unique communication identifier.
[0006] Secondly, the present invention provides a robot remote control method applied to a server. The method includes: receiving a communication connection request sent by a mobile terminal and a wireless communication module, and establishing communication connections with the mobile terminal and the wireless communication module respectively in response to the communication connection request; receiving a first subscription request from the wireless communication module, and subscribing to a control topic for the wireless communication module in response to the first subscription request; receiving a second subscription request from the mobile terminal, and subscribing to a response topic for the mobile terminal in response to the second subscription request; receiving a control message sent by the mobile terminal through the control topic, and pushing the control message to the wireless communication module so that the wireless communication module performs protocol conversion on the control message to obtain control instructions, and sends the control instructions to the motion controller; and receiving a response message sent by the wireless communication module through the response topic, and pushing the response message to the mobile terminal.
[0007] In some optional implementations, when there are multiple motion controllers, the step of receiving communication connection requests sent by the mobile terminal and the wireless communication module, and establishing communication connections with the mobile terminal and the wireless communication module respectively in response to the communication connection requests, includes: receiving a first communication connection request sent by each wireless communication module, and returning a connection confirmation message to each wireless communication module in response to the first communication connection request sent by each wireless communication module, thereby completing the communication connection with each wireless communication module; generating a connection list, the connection list including robot information corresponding to each wireless communication module that has established a connection; receiving a second communication connection request sent by the mobile terminal, and returning a connection confirmation message and the connection list to the mobile terminal in response to the second communication connection request, thereby completing the communication connection with the mobile terminal.
[0008] In some optional implementations, receiving the first subscription request from the wireless communication module and subscribing to a control topic for the wireless communication module in response to the first subscription request includes: allocating a set of communication topics to each wireless communication module according to the first subscription request sent by each wireless communication module, and subscribing to the control topic in the corresponding communication topic for each wireless communication module.
[0009] In some optional implementations, receiving the second subscription request from the mobile terminal and subscribing to a response topic for the mobile terminal in response to the second subscription request includes: receiving the second subscription request from the mobile terminal; parsing the second subscription request to obtain target robot information, the target robot information being used to indicate that the mobile terminal selects a target robot to control from multiple robots according to the connection list; determining a corresponding allocated target communication topic according to the correspondence between the target robot information and the target wireless communication module; obtaining a target communication identifier for the target communication topic; subscribing to a target response topic in the target communication topic for the mobile terminal, and sending the target communication identifier to the mobile terminal, so that the mobile terminal sends a control message to the corresponding target control topic according to the target communication identifier.
[0010] In some optional implementations, receiving the control message sent by the mobile terminal through the control topic and pushing the control message to the wireless communication module includes: receiving the control message sent by the mobile terminal through the target control topic corresponding to the target communication identifier; and pushing the control message to the target wireless communication module corresponding to the target robot through the target control topic.
[0011] In some optional implementations, receiving the response message sent by the wireless communication module through the response topic and pushing the response message to the mobile terminal includes: receiving the response message sent by the target wireless communication module through the target response topic corresponding to the target communication identifier; and pushing the response message to the mobile terminal through the target response topic.
[0012] Thirdly, the present invention provides a robot remote control method applied to a wireless communication module. The method includes: sending a communication connection request to a server, so that the server establishes a communication connection with the wireless communication module in response to the communication connection request; sending a first subscription request to the server, so that the server subscribes to a control topic for the wireless communication module in response to the first subscription request; receiving a control message pushed by the control topic; performing protocol conversion on the control message to obtain a control instruction, and sending the control instruction to the motion controller; generating a response message according to the control action of the motion controller; and sending the response message to a response topic.
[0013] Fourthly, the present invention provides a robot control system, including a server, a mobile terminal, a wireless communication module, and a motion controller; the server deploys an MQTT server application, which deploys communication topics, including a control topic and a response topic; the control topic is used to receive control messages sent by the mobile terminal, and the response topic is used to receive response messages sent by the motion controller; the mobile terminal deploys a first MQTT client application, which is used to send the control messages to the control topic through the first MQTT client, and the mobile terminal is also used to subscribe to the response topic and receive the response messages through the first MQTT client; the motion controller is connected to the wireless communication module; the wireless communication module deploys a second MQTT client application, which is used to subscribe to the control topic and receive the control messages through the second MQTT client application, so as to convert the control messages into control commands and send them to the motion controller; the wireless communication module is also used to send the response messages to the response topic through the second MQTT client.
[0014] The technical solution provided by this invention has the following advantages:
[0015] This invention equips a robot's motion controller with a wireless communication module. This module can connect to a server via Wi-Fi or a cellular network. Similarly, mobile devices such as smartphones and tablets can connect to the server via Wi-Fi or a cellular network. An MQTT server is then configured on the server, and MQTT clients are configured on both the wireless communication module and the mobile device. The MQTT server is equipped with corresponding topics, and the wireless communication module and the mobile device can send and receive messages by subscribing to relevant topics. Finally, the wireless communication module converts the received TCP / IP network control messages into control commands conforming to the robot's internal protocol architecture and sends them to the motion controller. This enables remote robot control from the mobile device, solving the problem of poor flexibility when controlling a robot using a teach pendant. Attached Figure Description
[0016] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating a robot control system configuration method according to an embodiment of the present invention;
[0018] Figure 2 This is a flowchart illustrating a robot remote control method according to an embodiment of the present invention;
[0019] Figure 3 This is another flowchart illustrating a robot remote control method according to an embodiment of the present invention;
[0020] Figure 4 This is another flowchart illustrating a robot remote control method according to an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the hardware structure of a robot control system according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] According to an embodiment of the present invention, a method for configuring a robot control system is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0024] With the rapid development of robotics technology, industrial robots are increasingly widely used in manufacturing, logistics, and medical fields. For example, robotic arms are one of the most commonly used types of robots. Traditional robot control methods typically employ physical teach pendants or virtual teach pendant software installed on a computer. Both physical and virtual teach pendants require physical connections to the robot motion controller. Currently, the mature solution for controlling robot motion involves connecting a teach pendant to the robot control cabinet and using the Modbus protocol and serial port for communication. However, these methods have a series of limitations, including poor mobility and flexibility.
[0025] In addition, there are differences in the communication protocols between teach pendants and motion controllers, and different brands of teach pendants use different data transmission protocols. As a result, robot motion controllers often cannot parse many communication protocols, so multiple teach pendants cannot be universally used, and one teach pendant is required for one robot.
[0026] To address the aforementioned issues, this embodiment provides a method for configuring a robot control system. Figure 1 This is a flowchart of a robot control system configuration method according to an embodiment of the present invention, the process including the following steps:
[0027] Step S101: Deploy the MQTT server application on the server;
[0028] Step S102: Deploy communication topics in the MQTT server application. The communication topics include control topics and response topics. The control topics are used to receive control messages sent by the mobile terminal, and the response topics are used to receive response messages sent by the motion controller.
[0029] Step S103: Deploy the first MQTT client application on the mobile device. The mobile device is used to send control messages to the control topic through the first MQTT client. The mobile device is also used to subscribe to the response topic and receive response messages through the first MQTT client.
[0030] Step S104: Connect the wireless communication module to the robot's motion controller and deploy a second MQTT client application in the wireless communication module. The wireless communication module is used to subscribe to control topics and receive control messages through the second MQTT client application, so as to convert the control messages into control commands and send them to the motion controller. The wireless communication module is also used to send response messages to the response topic through the second MQTT client.
[0031] Specifically, MQTT (Message Queuing Telemetry Transport) is a message protocol based on the publish-subscribe paradigm under the ISO standard (ISO / IEC PRF 20922). It operates on top of the TCP / IP protocol and is a client-server based message publish / subscribe transport protocol. Based on this characteristic, for robotic devices such as robotic arms, in order to allow the robot to operate independently of the wired control of the teach pendant, this invention provides a method for configuring remote robot control based on MQTT technology. This allows for remote control of the robot through a configured mobile terminal, server, and wireless communication module.
[0032] Specifically, the hardware devices required for configuration in this embodiment of the invention include a mobile terminal, a server, and a wireless communication module. The mobile terminal refers to a portable smart terminal device such as a mobile phone or tablet computer, which is not limited to a fixed location and can connect to the server via Wi-Fi or cellular networks. Similarly, the wireless communication module refers to an integrated circuit module including a wireless communication network card, including but not limited to Wi-Fi network cards and cellular data cards, enabling the wireless communication module to connect to the server via Wi-Fi, cellular data, etc. Next, an MQTT server application is deployed on the server. The MQTT server application is a software program used to create a series of topics for MQTT clients to subscribe to, allowing MQTT clients to send messages to some topics and receive messages from others. In this embodiment of the invention, MQTT client applications are installed on both the mobile terminal and the wireless communication module, with the mobile terminal including a first MQTT client and the wireless communication module including a second MQTT client. The MQTT server application deploys communication topics, including control and response topics. The control topic is subscribed to by a second MQTT client. Its function is to receive control messages sent from the mobile device, which then pushes these messages to the wireless communication module according to the subscription relationship. The wireless communication module then forwards the received control messages to the robot's motion controller, enabling remote robot control. The response topic is subscribed to by a first MQTT client. After controlling the robot to perform an action, the robot's motion controller sends a response message indicating the control effect to the response topic. The response topic pushes this response message to the mobile device, allowing the mobile device to observe whether the robot has been controlled effectively. The mobile device requires a robot motion control application with functions such as motion control, parameter setting, and status monitoring. Users generate control messages through this application, such as clicking virtual buttons, dragging sliders, and inputting parameter values. These generated control messages are sent to the server's control topic via the first MQTT client.
[0033] In addition, in some alternative implementations, the control topic and response topic can process the messages to different degrees according to the type of the received message. For example, they can call different functions to convert the received message into a notification message or control message of a specific format, so as to ensure the uniformity of the message format and improve the reliability of the message.
[0034] In addition, another major function of the wireless communication module is to convert control messages of the TCP / IP protocol into a protocol format that the robot can recognize locally, thereby obtaining control commands. The control commands can be transmitted and processed within the motion controller, so that the controller can control the robot's actuators to perform actions according to the control commands.
[0035] This invention equips the robot's motion controller with a wireless communication module. Then, an MQTT server is configured on the server, and MQTT clients are configured on both the wireless communication module and the mobile terminal. Corresponding topics are configured on the MQTT server. The wireless communication module and the mobile terminal can send and receive messages by subscribing to the responding topics. Finally, the wireless communication module converts the received TCP / IP protocol network control messages into control commands conforming to the robot's internal protocol architecture, which are then sent to the motion controller. This enables remote control of the robot by the mobile terminal, solving the problem of poor flexibility in controlling the robot via a teach pendant.
[0036] Furthermore, different robots all use wireless communication modules to convert the TCP / IP network protocol into their own device's communication protocol, so they receive the same data protocol. The data sent by the mobile terminal is all sent through the server via TCP / IP network protocol data. Therefore, any mobile terminal can control the robot after installing the first MQTT client application and making the corresponding deployment, which removes the restriction that it must correspond to a unique teach pendant and further improves the flexibility of the robot control scheme.
[0037] In some alternative implementations, when there are multiple motion controllers, step S102 above includes:
[0038] Step a1: Deploy multiple communication topics in the MQTT server application. Each communication topic includes a control topic and a response topic. Each communication topic belongs to a robot's motion controller and has a unique communication identifier.
[0039] Specifically, when there are multiple different robots, a unique communication topic is deployed for each robot on the server. Each robot's wireless communication module subscribes to a control topic within that communication topic through a second MQTT client application. When the mobile terminal wants to control a particular robot, it sends a control message to the corresponding control topic. Similarly, the mobile terminal subscribes to the response topic of the robot it wants to control through the second MQTT client application. After any robot performs a corresponding action, it sends a response message to the corresponding response topic through its wireless communication module. This response message can be automatically pushed to the mobile terminal. Through this configuration scheme, the mobile terminal can also implement a one-to-many control scheme. Each robot can be controlled without the mobile terminal, thus achieving a many-to-many control scheme. This removes the limitation of one teach pendant per robot, significantly improving the flexibility of robot control strategies.
[0040] Based on the robot control system configuration method provided in the above embodiments, the present invention also provides a robot remote control method, such as... Figure 2As shown, this method is applied to servers and specifically includes the following steps:
[0041] Step S201: Receive communication connection requests sent by the mobile terminal and the wireless communication module, and establish communication connections with the mobile terminal and the wireless communication module respectively in response to the communication connection requests.
[0042] Specifically, after configuring the hardware and software modules of the mobile terminal, server, and wireless communication module, the present invention first needs to establish a communication connection between the mobile terminal and the server, and a connection between the server and the wireless communication module. The mobile terminal and the wireless communication module also act as MQTT clients, and the process of establishing a communication connection with the server is as follows: Figure 3 As shown, the first message sent by the mobile terminal or wireless communication module must be a CONNECT message, sent to the server as a connection request. The first message the server sends back after receiving the CONNECT message must be a CONNACK message, used to respond to the CONNECT message received from the client and acknowledge the connection request. If the client does not receive a CONNACK message from the server within a reasonable time, the client should close the network connection.
[0043] In an alternative implementation, since the mobile device can control multiple robots, it must know which robots have established communication connections with the server in order to select the robot it wants to control from among the robots with established communication connections. Therefore, the technical solution provided by the present invention further includes the following steps:
[0044] Step b1: Receive the first communication connection request sent by each wireless communication module, and respond to the first communication connection request sent by each wireless communication module by returning a connection confirmation message to each wireless communication module to complete the communication connection with each wireless communication module.
[0045] Step b2: Generate a connection list, which includes robot information corresponding to each wireless communication module that has established a connection.
[0046] Step b3: Receive the second communication connection request sent by the mobile terminal, and respond to the second communication connection request by returning a connection confirmation message and a connection list to the mobile terminal, thus completing the communication connection with the mobile terminal.
[0047] Specifically, the first and second communication connection requests are CONNECT messages sent by the wireless communication module and the mobile terminal, respectively, while the server returns a CONNACK message as a connection confirmation. It's important to note that after each wireless communication module establishes a connection with the server, the server generates a connection list based on the established connections. This list stores the robot information corresponding to each connected wireless communication module. When the mobile terminal successfully establishes a connection with the server, the server sends this connection list to the mobile terminal. This allows the mobile terminal to know which robots it can control and select the appropriate robot from the connection list, improving control flexibility.
[0048] Step S202: Receive a first subscription request from the wireless communication module, and in response to the first subscription request, subscribe to a control topic for the wireless communication module;
[0049] Step S203: Receive the second subscription request from the mobile terminal and respond to the second subscription request by subscribing to the topic for the mobile terminal.
[0050] Step S204: Receive control messages sent by the mobile terminal through the control topic, and push the control messages to the wireless communication module so that the wireless communication module can perform protocol conversion on the control messages to obtain control commands, and send the control commands to the motion controller;
[0051] Step S205: Receive the response message sent by the wireless communication module through the response topic, and push the response message to the mobile terminal.
[0052] Specifically, in this embodiment of the invention, MQTT client applications are installed on both the mobile terminal and the wireless communication module. The mobile terminal includes a first MQTT client, and the wireless communication module includes a second MQTT client. The MQTT server application deploys communication topics, including control topics and response topics. The control topics are subscribed to by the second MQTT client. The function of the control topics is for the mobile terminal to send control messages to the control topics, which in turn push these control messages to the wireless communication module. The wireless communication module then sends the received control messages to the robot's motion controller, thereby achieving remote control of the robot. The response topics are subscribed to by the first MQTT client. After the robot's motion controller controls the robot to perform actions, it can send response messages indicating the control effect to the response topics. The function of the response topics is to push these response messages to the mobile terminal, allowing the mobile terminal to observe whether the robot has been controlled effectively. Furthermore, the wireless communication module can convert TCP / IP protocol control messages into a protocol format that the robot can recognize locally, thereby obtaining control commands. These control commands can be transmitted and processed within the motion controller, allowing the controller to control the robot's actuators to perform actions according to the control commands.
[0053] The technical solution provided by this invention equips the robot's motion controller with a wireless communication module. Then, based on MQTT communication technology, remote control of the robot by a mobile terminal is achieved, solving the problem of poor flexibility in controlling the robot via a teach pendant. Furthermore, different robots all use the wireless communication module to convert the TCP / IP network protocol into their own device's communication protocol, so the received data protocol is the same. Data sent by the mobile terminal is all TCP / IP network protocol data sent through the server. Therefore, any mobile terminal that has installed the first MQTT client application and made the corresponding deployment can control the robot, removing the restriction that it must uniquely correspond to a teach pendant and further improving the flexibility of the robot control scheme.
[0054] In some alternative implementations, when the number of machines to be controlled is two or more, step S202 includes:
[0055] Step c1: Assign a set of communication topics to each wireless communication module according to the first subscription request sent by each wireless communication module, and subscribe to the control topic in the corresponding communication topic for each wireless communication module.
[0056] Step S203 above includes:
[0057] Step c2: Receive the second subscription request from the mobile device;
[0058] Step c3: Parse the second subscription request to obtain the target robot information. The target robot information is used to indicate that the mobile terminal selects the target robot to be controlled from multiple robots according to the connection list.
[0059] Step c4: Determine the corresponding target communication topic based on the correspondence between the target robot information and the target wireless communication module;
[0060] Step c5: Obtain the target communication identifier of the target communication topic;
[0061] Step c6 involves subscribing to the target response topic in the target communication topic for the mobile terminal and sending the target communication identifier to the mobile terminal so that the mobile terminal can send control messages to the corresponding target control topic based on the target communication identifier.
[0062] Specifically, in this embodiment of the invention, when the number of controlled robots is large, each robot has a wireless communication module. The server needs to allocate a separate set of communication topics for each wireless communication module based on the first subscription request sent by each wireless communication module. Each wireless communication module subscribes to messages only from its assigned control topic and sends the control feedback response message to its assigned response topic. Based on this, when the mobile terminal subscribes to a topic, the user first needs to select the target robot to be controlled from the connection list displayed on the mobile terminal. The mobile terminal determines the target robot information corresponding to the target robot based on the user's selection, and the second subscription request sent by the mobile terminal to the server carries the target robot information. Since the server's generated list records the association between each robot information and each wireless communication module, the server can determine the target wireless communication module that the mobile terminal wants to control through the target robot information, and thus determine the target communication topic pre-allocated to the target wireless communication module. Therefore, the target control topic in the target communication topic is the topic on which the mobile terminal needs to send control messages, and the target response topic in the target communication topic is the topic on which the mobile terminal needs to subscribe to response messages.
[0063] After a mobile device subscribes to a target response topic, it can automatically receive subscribed messages. However, each time a mobile device sends a message, it needs to know which control topic it is sending the message to. Therefore, the server feeds back the target communication identifier of the target communication topic to the mobile device. The target communication identifier serves as a unique identifier for the target communication topic. Each time the mobile device sends a control message to the server, it must include the target communication identifier. The server can then search for the target control topic to which the control message should be sent based on the target communication identifier from multiple control topics.
[0064] The technical solution provided by the embodiments of the present invention can not only realize remote control of robots by mobile terminals, but also realize many-to-many control scenarios of multiple mobile terminals controlling multiple robots based on multiple communication topics of the server. The wireless communication modules of each robot only perform TCP / IP protocol conversion, and the control tasks can still be executed even if the mobile terminal is replaced, thereby further improving the flexibility of robot control strategy.
[0065] In some alternative implementations, step S204 above includes:
[0066] Step d1: Receive control messages sent by the mobile terminal through the target control topic corresponding to the target communication identifier;
[0067] Step d2: Push control messages to the target wireless communication module corresponding to the target robot through the target control topic.
[0068] In some alternative implementations, step S205 includes:
[0069] Step d3: Receive the response message sent by the target wireless communication module through the target response topic corresponding to the target communication identifier;
[0070] Step d4: Push the response message to the mobile device via the target response topic.
[0071] Specifically, steps d1 to d4 above are the interaction process between the mobile terminal and the wireless communication module of one of the robots in multiple robot scenarios. The relevant principles have been described in steps c1 to c6 above, and can be referred to the description of the foregoing embodiments, and will not be repeated here.
[0072] In some optional implementations, the server also periodically performs heartbeat checks to verify the online status of the wireless communication module and the mobile device, ensuring the devices in the connection list are up-to-date, and periodically sends the updated connection list to the mobile device. However, if any device disconnects, the server can issue an alarm to notify the user to reconnect the mobile device and the wireless communication module, ensuring connection reliability. Furthermore, for some timed control tasks, the mobile device can periodically send control messages to the server according to user needs, enabling timed controllability.
[0073] This invention also provides a method for remote control of a robot, such as... Figure 4 As shown, this method is applied to wireless communication modules and specifically includes the following steps:
[0074] Step S401: Send a communication connection request to the server so that the server responds to the communication connection request and establishes a communication connection with the wireless communication module;
[0075] Step S402: Send a first subscription request to the server so that the server responds to the first subscription request to subscribe to the control topic for the wireless communication module;
[0076] Step S403: Receive the control message pushed by the control topic;
[0077] Step S404: Perform protocol conversion on the control message to obtain control commands, and send the control commands to the motion controller;
[0078] Step S405: Generate a response message based on the control action of the motion controller;
[0079] Step S406: Send a response message to the response topic.
[0080] Specifically, the principle of establishing a communication connection between the wireless communication module and the server and subscribing to relevant topics can be referred to the aforementioned embodiments and will not be repeated here. It is important to note that in addition to receiving control messages, the wireless communication module also needs to perform protocol conversion, converting TCP / IP protocol messages into a protocol format that the robot controller can recognize to obtain control commands. These control commands are then sent to the robot's motion controller. The motion controller calculates the robot's motion path based on the control commands and sends control signals to the robot's actuators. The robot then responds accordingly. Furthermore, the wireless communication module can also perform bidirectional protocol conversion; in other words, it can convert a protocol format that the robot controller can recognize into the TCP / IP protocol to ensure correct feedback of response messages.
[0081] The technical solution provided by this invention ensures the reliability of robot command transmission. It eliminates the need to convert between various teach pendant communication protocols, requiring only a network protocol conversion, thus achieving universal compatibility across multiple mobile devices and improving the flexibility of robot control. After the robot performs an action, it sends a response message. This message is pushed to the mobile device via a response topic, where it displays the robot's latest movement status on the screen for easy viewing. If the robot encounters an abnormal situation (such as a malfunction or incorrect operation), the mobile application displays a warning message and provides corresponding handling suggestions. For example, the operator can stop the robot's movement through the mobile control interface or switch to another task. After the task is completed, the operator can disconnect from the robot controller on the mobile device, and the application will display a message indicating successful disconnection.
[0082] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a robot control system provided in an optional embodiment of the present invention, such as... Figure 5As shown, the robot control system includes a server, a mobile terminal, a wireless communication module, and a motion controller. The server deploys an MQTT server application, which includes communication topics. These topics include control topics and response topics. The control topics receive control messages from the mobile terminal, and the response topics receive response messages from the motion controller. The mobile terminal deploys a first MQTT client application, which sends control messages to the control topics and subscribes to response topics and receives response messages. The motion controller is connected to the wireless communication module. The wireless communication module deploys a second MQTT client application, which subscribes to control topics and receives control messages to convert them into control commands for the motion controller. The wireless communication module also sends response messages to the response topics via the second MQTT client.
[0083] The control principle of the robot control system can be found in the relevant description of the above configuration method embodiment, and will not be repeated here.
[0084] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0085] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0086] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for configuring a robot control system, characterized in that, The method includes: Deploy an MQTT server application on the server; In the MQTT server application, a communication topic is deployed. The communication topic includes a control topic and a response topic. The control topic is used to receive control messages sent by the mobile terminal, and the response topic is used to receive response messages sent by the motion controller. A first MQTT client application is deployed on a mobile device, the mobile device being used to send the control message to the control topic through the first MQTT client, and the mobile device being used to subscribe to the response topic and receive the response message through the first MQTT client; A wireless communication module is connected to the robot's motion controller, and a second MQTT client application is deployed in the wireless communication module. The wireless communication module is used to subscribe to the control topic and receive the control message through the second MQTT client application, so as to convert the control message into a control command and send it to the motion controller. The wireless communication module is also used to send the response message to the response topic through the second MQTT client. When there are multiple motion controllers, the deployment of communication topics in the MQTT server application includes: Multiple communication topics are deployed in the MQTT server application. Each communication topic includes a control topic and a response topic. Each communication topic belongs to the motion controller of a robot and has a unique communication identifier.
2. A method for remote control of a robot, characterized in that, When there are multiple motion controllers, multiple communication topics are deployed in the MQTT server application. Each communication topic includes a control topic and a response topic. Each communication topic belongs to a robot's motion controller and has a unique communication identifier. The method is applied to the server and includes: The system receives communication connection requests from a mobile terminal and a wireless communication module, and establishes communication connections with the mobile terminal and the wireless communication module respectively in response to the communication connection requests. When there are multiple motion controllers, the process of receiving communication connection requests from a mobile terminal and a wireless communication module, and establishing communication connections with the mobile terminal and the wireless communication module respectively in response to the communication connection requests includes: receiving a first communication connection request from each wireless communication module, and returning a connection confirmation message to each wireless communication module in response to the first communication connection request from each wireless communication module, thereby completing the communication connection with each wireless communication module; generating a connection list, the connection list including robot information corresponding to each wireless communication module that has established a connection; receiving a second communication connection request from a mobile terminal, and returning a connection confirmation message and the connection list to the mobile terminal in response to the second communication connection request, thereby completing the communication connection with the mobile terminal. Receiving a first subscription request from the wireless communication module, and subscribing to a control topic for the wireless communication module in response to the first subscription request; the step of receiving the first subscription request from the wireless communication module and subscribing to a control topic for the wireless communication module in response to the first subscription request includes: allocating a set of communication topics to each wireless communication module according to the first subscription request sent by each wireless communication module, and subscribing to the control topic in the corresponding communication topic for each wireless communication module; Receive a second subscription request from the mobile device, and respond to the second subscription request by subscribing to the response topic for the mobile device; The control module receives control messages sent by the mobile terminal through the control topic and pushes the control messages to the wireless communication module, so that the wireless communication module performs protocol conversion on the control messages to obtain control commands and sends the control commands to the motion controller. The system receives the response message sent by the wireless communication module through the response topic and pushes the response message to the mobile terminal.
3. The method according to claim 2, characterized in that, The step of receiving the second subscription request from the mobile device and responding to the second subscription request by subscribing to the mobile device's response topic includes: Receive the second subscription request from the mobile device; Parse the second subscription request to obtain target robot information, which indicates that the mobile terminal selects the target robot to be controlled from multiple robots according to the connection list. Based on the correspondence between the target robot information and the target wireless communication module, the corresponding assigned target communication topic is determined; Obtain the target communication identifier of the target communication topic; The mobile terminal subscribes to the target response topic in the target communication topic and sends the target communication identifier to the mobile terminal, so that the mobile terminal sends a control message to the corresponding target control topic according to the target communication identifier.
4. The method according to claim 3, characterized in that, The step of receiving control messages sent by the mobile terminal through the control topic and pushing the control messages to the wireless communication module includes: The control message sent by the mobile terminal is received through the target control topic corresponding to the target communication identifier; The control message is pushed to the target wireless communication module corresponding to the target robot through the target control topic.
5. The method according to claim 4, characterized in that, The step of receiving the response message sent by the wireless communication module through the response topic and pushing the response message to the mobile terminal includes: The response message sent by the target wireless communication module is received through the target response topic corresponding to the target communication identifier; The response message is pushed to the mobile device through the target response topic.
6. A method for remote control of a robot, characterized in that, When there are multiple motion controllers, multiple communication topics are deployed in the MQTT server application. Each communication topic includes a control topic and a response topic. Each communication topic belongs to a robot's motion controller and has a unique communication identifier. This method is applied to the wireless communication module and includes: Sending a communication connection request to the server, so that the server establishes a communication connection with the wireless communication module in response to the communication connection request; when there are multiple motion controllers, the server establishes a communication connection with the wireless communication module in response to the communication connection request, including: receiving a first communication connection request sent by each wireless communication module, and returning a connection confirmation message to each wireless communication module in response to the first communication connection request sent by each wireless communication module, thereby completing the communication connection with each wireless communication module; generating a connection list, the connection list including robot information corresponding to each wireless communication module that has established a connection; Sending a first subscription request to the server, so that the server subscribes to a control topic for the wireless communication module in response to the first subscription request; the server subscribing to a control topic for the wireless communication module in response to the first subscription request includes: allocating a set of communication topics for each wireless communication module according to the first subscription request sent by each wireless communication module, and subscribing to the control topic in the corresponding communication topic for each wireless communication module; Receive control messages pushed by the control topic; The control message is converted into a protocol to obtain a control command, and the control command is sent to the motion controller; Generate a response message based on the control action of the motion controller; Send the response message to the response topic.
7. A robot control system, characterized in that, Includes servers, mobile devices, wireless communication modules, and motion controllers; The server is equipped with an MQTT server application, which contains communication topics. Each communication topic includes a control topic and a response topic. The control topic is used to receive control messages sent by the mobile device, and the response topic is used to receive response messages sent by the motion controller. When there are multiple motion controllers, the MQTT server application deploys multiple sets of communication topics. Each set of communication topics includes a control topic and a response topic. Each set of communication topics belongs to the motion controller of a robot, and each set of communication topics has a unique communication identifier. The mobile device is equipped with a first MQTT client application. The mobile device is used to send the control message to the control topic through the first MQTT client. The mobile device is also used to subscribe to the response topic and receive the response message through the first MQTT client. The motion controller is connected to the wireless communication module; The wireless communication module is equipped with a second MQTT client application. The wireless communication module is used to subscribe to the control topic and receive the control message through the second MQTT client application, so as to convert the control message into a control command and send it to the motion controller. The wireless communication module is also used to send the response message to the response topic through the second MQTT client.
Citation Information
Patent Citations
Proxy subscription method and system based on MQTT server
CN110266794A
User equipment, method and system for controlling medical equipment
CN111312384A
Mechanical arm wireless control device and system
CN117013664A
Equipment remote control method, server and storage medium
CN117119031A