Robot control system configuration, remote control method and robot control system
The MQTT protocol passes messages between the server, mobile terminal and wireless communication module, which solves the problem of poor flexibility in traditional robot control methods and realizes the flexibility and scalability of remote control of robots.
Patent Information
- Application Number
- CN202411870493.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Traditional robot control methods have poor flexibility and need to be connected to the robot motion controller through physical lines, limiting mobility and flexibility.
The MQTT protocol is used to transmit messages between the server, mobile terminal and wireless communication module. Remote control is realized by controlling the topic and responding to the topic. The wireless communication module converts the control messages of the TCP/IP protocol into control instructions of the internal protocol of the robot.
The flexibility and scalability of remote control of robots is realized, the dependence on specific teaching devices is eliminated, and the mobility and flexibility of the robot control system is improved.
Smart Images

Figure CN119635638A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a robot control system configuration, a remote control method and a robot control system. Background Art
[0002] With the rapid development of robotics technology, industrial robots are increasingly used in manufacturing, logistics, medical and other fields. For example, the robotic arm is one of the most commonly used robots. Traditional robot control methods usually use a physical teach pendant or install virtual teach pendant software on a computer. Both the physical teach pendant and the virtual teach pendant need to be connected to the robot motion controller through physical lines. These methods have a series of limitations, poor mobility and poor 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 the 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 comprising a control topic and a response topic, the control topic being used to receive a control message sent by a mobile terminal, and the response topic being used to receive a response message sent by a motion controller; deploying a first MQTT client application in a mobile terminal, the mobile terminal being used to send the control message to the control topic through the first MQTT client, and the mobile terminal being also used to subscribe to the response topic through the first MQTT client and receive the response message; connecting a wireless communication module to the corresponding motion controller of the robot, and deploying a second MQTT client application in the wireless communication module, the wireless communication module being used to subscribe to the control topic through the second MQTT client application and receive the control message, so as to convert the control message into a control instruction and send it to the motion controller, and the wireless communication module being also used to send the response message to the response topic through the second MQTT client.
[0005] In some optional embodiments, when there are multiple motion controllers, deploying communication topics in the MQTT server application includes: deploying multiple sets of communication topics in the MQTT server application, each set of communication topics includes a control topic and a response topic, each set of communication topics belongs to a robot's motion controller, and each set of communication topics has a unique communication identifier.
[0006] In a second aspect, the present invention provides a robot remote control method, which is applied to a server, and the method includes: receiving communication connection requests 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 requests; 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 a control instruction, and sends the control instruction to the motion controller; 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 embodiments, when there are multiple motion controllers, the communication connection requests sent by the receiving 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, include: 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, wherein the connection list includes 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 embodiments, receiving the first subscription request of the wireless communication module and subscribing the wireless communication module to a control topic 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 each wireless communication module to a control topic in the corresponding communication topic.
[0009] In some optional embodiments, the receiving of the second subscription request from the mobile terminal, and subscribing the mobile terminal to a response topic 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, wherein the target robot information is used to indicate that the mobile terminal selects a target robot to be controlled from multiple robots according to the connection list; determining a corresponding assigned target communication topic according to a correspondence between the target robot information and a target wireless communication module; obtaining a target communication identifier of the target communication topic; subscribing the mobile terminal to a target response topic in the target communication topic, 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] In the third aspect, the present invention provides a robot remote control method, which is applied to a wireless communication module, and 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] In a fourth aspect, the present invention provides a robot control system, comprising a server, a mobile terminal, a wireless communication module and a motion controller; an MQTT server application is deployed in the server, and a communication topic is deployed in the MQTT server application, and the communication topic includes a control topic and a response topic, the control topic is used to receive a control message sent by the mobile terminal, and the response topic is used to receive a response message sent by the motion controller; a first MQTT client application is deployed in the mobile terminal, and the mobile terminal is used to send the control message to the control topic through the first MQTT client, and the mobile terminal is also used to subscribe to the response topic through the first MQTT client and receive the response message; the motion controller is connected to the wireless communication module; a second MQTT client application is deployed in the wireless communication module, and 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 instruction and send it to the motion controller, and the wireless communication module is also used to send the response message to the response topic through the second MQTT client.
[0014] The technical solution provided by the present invention has the following advantages:
[0015] The present invention equips the robot's motion controller with a wireless communication module, wherein the wireless communication module can be connected to a server via a WIFI network or a cellular network. Similarly, mobile terminals such as mobile phones and tablet computers can be connected to the server via a WIFI or cellular network. Afterwards, an MQTT server is configured in the server, and an MQTT client is configured in both the wireless communication module and the mobile terminal. The corresponding topic is configured in the MQTT server. The wireless communication module and the mobile terminal can send and receive messages to each other by subscribing to the topic of the response. Finally, the wireless communication module converts the received TCP / IP protocol network control message into a control instruction that conforms to the robot's internal protocol architecture, which can be sent to the motion controller, so that the mobile terminal can remotely control the robot, solving the problem of poor flexibility in controlling the robot through a teaching pendant. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 is a flow chart of a robot control system configuration method according to an embodiment of the present invention;
[0018] Figure 2 is a flow chart of a robot remote control method according to an embodiment of the present invention;
[0019] Figure 3 is another flow chart of a robot remote control method according to an embodiment of the present invention;
[0020] Figure 4 is another flow chart of a robot remote control method according to an embodiment of the present invention;
[0021] Figure 5 It is a schematic diagram of the hardware structure of a robot control system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0023] According to an embodiment of the present invention, an embodiment of a robot control system configuration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] With the rapid development of robot technology, industrial robots are increasingly used in manufacturing, logistics, medical and other fields. For example, the robotic arm is one of the most commonly used robots. Traditional robot control methods usually use a physical teach pendant or install a virtual teach pendant software on a computer. Both the physical teach pendant and the virtual teach pendant need to be connected to the robot motion controller through physical lines. The current mature solution for controlling robot motion is to connect the robot control cabinet entity through the teach pendant and use the modbus protocol and serial port for communication. These methods have a series of limitations, poor mobility and poor flexibility.
[0025] In addition, there are differences in the communication protocols between the teach pendant and the motion controller, and the data transmission protocols used by teach pendants of different brands are also different, resulting in the robot motion controller often being unable to parse many communication protocols. Therefore, multiple teach pendants cannot be universal, and one teach pendant is required for each robot.
[0026] In order to solve the above problems, a robot control system configuration method is provided in this embodiment. Figure 1 1 is a flow chart of a robot control system configuration method according to an embodiment of the present invention, the flow chart includes the following steps:
[0027] Step S101, deploying an MQTT server application in a server;
[0028] Step S102, deploying a communication topic in the MQTT server application, the communication topic including a control topic and a response topic, the control topic is used to receive a control message sent by the mobile terminal, and the response topic is used to receive a response message sent by the motion controller;
[0029] Step S103, deploying a first MQTT client application in the mobile terminal, the mobile terminal is used to send a control message to a control topic through the first MQTT client, and the mobile terminal is also used to subscribe to a response topic and receive a response message through the first MQTT client;
[0030] Step S104, connect a wireless communication module to the corresponding motion controller of the robot, and deploy a second MQTT client application in the wireless communication module. The wireless communication module is used to subscribe to the control topic and receive control messages through the second MQTT client application to convert the control messages into control instructions 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 works on top of the TCP / IP protocol. MQTT is a client-server based message publish / subscribe transmission protocol. Based on this feature, for robotic devices such as robotic arms, in order to allow the robot to be free from the wired control of the teach pendant, an embodiment of the present invention provides a robot remote control configuration method based on MQTT technology, so that the remote control of the robot can be achieved through the configured mobile terminal, server and wireless communication module.
[0032] Specifically, the hardware devices that need to be configured in the embodiment of the present invention include a mobile terminal, a server, and a wireless communication module. The mobile terminal refers to a smart terminal device such as a mobile phone, a tablet computer, etc. that is easy to carry and not limited to a fixed location, and can be connected to the server through a WIFI network or a cellular network. Similarly, the wireless communication module refers to an integrated circuit module including a wireless communication network card, including but not limited to a WIFI network card, a cellular mobile data card, etc., which can connect the wireless communication module to the server through WIFI, cellular data, etc. Afterwards, the MQTT server application is deployed in the server. The MQTT server application is a software program for creating a series of topics for the MQTT client to subscribe to, so that the MQTT client can send messages to certain topics and receive messages from other topics. In an embodiment of the present invention, the MQTT client application is installed in the mobile terminal and the wireless communication module, respectively, wherein the mobile terminal includes a first MQTT client and the wireless communication module includes a second MQTT client. Among them, the MQTT server application deploys a communication topic, which includes a control topic and a response topic. The control topic is subscribed by the second MQTT client. The function of the control topic is to receive control messages sent by the mobile terminal to the control topic, so that the control topic can push the control message to the wireless communication module according to the subscription relationship, and the wireless communication module then sends the received control message to the robot's motion controller, thereby realizing the remote control of the robot. The response topic is subscribed by the first MQTT client. After controlling an action of the robot, the robot motion controller feeds back a response message indicating the control effect to the response topic. The function of the response topic is to push the response message expressing the control effect to the mobile terminal, so that the mobile terminal can observe whether the robot is controlled in place. The mobile terminal needs to develop a robot motion control application with functions such as motion control, parameter setting, status monitoring, etc. The user generates a control message through the control application, such as the operator clicking a virtual button, dragging a slider, entering a parameter value, etc. The generated control message is sent to the control topic of the server through the first MQTT client.
[0033] In addition, in some optional implementations, the control topic and the response topic may also process the message to different degrees according to the type of message received, such as calling different functions to convert the received message into a notification message, control message, etc. in 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 the control messages of the TCP / IP protocol into a protocol format that can be recognized locally by the robot, thereby obtaining control commands. The control commands can be transmitted and processed inside the motion controller, so that the controller controls the robot's executive components to perform actions according to the control commands.
[0035] The present invention equips the robot's motion controller with a wireless communication module, then configures an MQTT server in the server, configures an MQTT client in both the wireless communication module and the mobile terminal, and equips the MQTT server with a corresponding topic. The wireless communication module and the mobile terminal can send and receive messages to each other by subscribing to the response topic. Finally, the wireless communication module converts the received TCP / IP protocol network control message into a control instruction that complies with the robot's internal protocol architecture, and sends it to the motion controller, thereby realizing remote control of the robot by the mobile terminal and solving the problem of poor flexibility in controlling the robot through a teaching pendant.
[0036] In addition, different robots convert the TCP / IP network protocol into the communication protocol of their own devices through wireless communication modules, so the received data protocol is the same. The data sent by the mobile terminal is the TCP / IP network protocol data sent by the server. Therefore, any mobile terminal can control the robot after installing the first MQTT client application and performing corresponding deployment, which removes the limitation that it must correspond to only one teaching pendant, and further improves the flexibility of the robot control solution.
[0037] In some optional implementations, when there are multiple motion controllers, the above step S102 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 motion controller, and each communication topic has a unique communication identifier.
[0039] Specifically, when there are multiple different robots, a unique communication topic is deployed in the server for each robot. The wireless communication module of each robot subscribes to a control topic in a communication topic through the second MQTT client application. When the mobile terminal wants to control a robot, it can send a control message to the corresponding control topic. Similarly, the mobile terminal subscribes to the response topic to which the robot to be controlled belongs through the second MQTT client application. After any robot performs the corresponding action, it will send a response message to the corresponding response topic through the wireless communication module, and the 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. Similarly, each robot can be controlled without the mobile terminal, thereby realizing a many-to-many control scheme, removing the restriction that one teaching pendant must correspond to one robot, and significantly improving the flexibility of the robot control strategy.
[0040] According to the robot control system configuration method provided in the above embodiment, the present invention also provides a robot remote control method, such as Figure 2As shown, it is applied to the server and specifically includes the following steps:
[0041] Step S201: receiving communication connection requests 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 requests.
[0042] Specifically, after configuring the software and hardware 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, which is sent to the server as a connection request. The first message fed back by the server after receiving the CONNECT message must be a CONNACK message, which is used to respond to the CONNECT message received from the client and confirm the connection request. If the client does not receive the CONNACK message from the server within a reasonable time, the client should close the network connection.
[0043] In addition, in an optional implementation, since the mobile terminal can control multiple robots, the mobile terminal must know which robots have established communication connections with the server before selecting one of the robots to be controlled from the robots with established communication connections. Therefore, the technical solution provided by the present invention also includes the following steps:
[0044] Step b1, receiving the 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;
[0045] Step b2, generating a connection list, the connection list including robot information corresponding to each wireless communication module that has established a connection;
[0046] Step b3, receiving the second communication connection request sent by the mobile terminal, and returning a connection confirmation message and a connection list to the mobile terminal in response to the second communication connection request, thereby completing the communication connection with the mobile terminal.
[0047] Specifically, the first communication connection request and the second communication connection request are CONNECT messages sent by the wireless communication module and the mobile terminal respectively, and the connection confirmation message returned by the server is the CONNACK message. It should be noted that after each wireless communication module establishes a connection with the server, the server will generate a connection list based on the wireless communication modules that have established a connection, save the robot information corresponding to each wireless communication module that has established a connection in the connection list, and send the connection list to the mobile terminal when the mobile terminal successfully establishes a connection with the server, so that the mobile terminal knows which robots can be controlled when controlling the robots, and thus selects the robot to be controlled in the connection list to improve the flexibility of control.
[0048] Step S202, receiving a first subscription request from the wireless communication module, and subscribing the wireless communication module to a control topic in response to the first subscription request;
[0049] Step S203: receiving a second subscription request from the mobile terminal, and subscribing the mobile terminal to a response topic in response to the second subscription request.
[0050] Step S204, receiving a control message sent by the mobile terminal through the control subject, 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 a control instruction, and sends the control instruction to the motion controller;
[0051] Step S205: receiving a response message sent by the wireless communication module through a response topic, and pushing the response message to the mobile terminal.
[0052] Specifically, in an embodiment of the present invention, an MQTT client application is installed in the mobile terminal and the wireless communication module, respectively, wherein the mobile terminal includes a first MQTT client, and the wireless communication module includes a second MQTT client. Among them, the MQTT server application deploys a communication topic, and the communication topic includes a control topic and a response topic. The control topic is subscribed by the second MQTT client. The function of the control topic is that the mobile terminal sends a control message to the control topic, so that the control topic can push the control message to the wireless communication module, and the wireless communication module then sends the received control message to the motion controller of the robot, thereby realizing the remote control of the robot. The response topic is subscribed by the first MQTT client. After controlling the robot to perform an action, the robot motion controller can feedback a response message indicating the control effect to the response topic. The function of the response topic is to push the response message expressing the control effect to the mobile terminal, so that the mobile terminal can observe whether the robot is controlled in place. In addition, the wireless communication module can also convert the control message of the TCP / IP protocol into a protocol format that can be recognized locally by the robot, thereby obtaining a control command, and the control command can be transmitted and processed inside the motion controller, so that the controller controls the robot execution component to perform an action according to the control command.
[0053] Through the technical solution provided by the embodiment of the present invention, the motion controller of the robot is equipped with a wireless communication module, and then the remote control of the robot by the mobile terminal is realized based on the MQTT communication technology, which solves the problem of poor flexibility of controlling the robot through the teach pendant. In addition, different robots convert the TCP / IP network protocol into the communication protocol of their own devices through the wireless communication module, so the received data protocol is the same, and the data sent by the mobile terminal is the network protocol data of TCP / IP sent by the server, so any mobile terminal can control the robot after installing the first MQTT client application and performing corresponding deployment, which removes the restriction that it must correspond to only one teach pendant, and further improves the flexibility of the robot control solution.
[0054] In some optional implementations, when the number of machines to be controlled is more than two, the above step S202 includes:
[0055] Step c1: 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 each wireless communication module to a control topic in the corresponding communication topic.
[0056] The above step S203 includes:
[0057] Step c2, receiving a second subscription request from the mobile terminal;
[0058] Step c3, parsing the second subscription request to obtain target robot information, where the target robot information is used to indicate that the mobile terminal selects a target robot to be controlled from multiple robots according to the connection list;
[0059] Step c4, determining the corresponding target communication topic according to the corresponding relationship between the target robot information and the target wireless communication module;
[0060] Step c5, obtaining the target communication identifier of the target communication subject;
[0061] Step c6, subscribing the mobile terminal to the target response topic in the target communication topic, 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.
[0062] Specifically, in an embodiment of the present invention, when the number of robots to be controlled is large, each robot has a wireless communication module, and the server needs to allocate a set of communication topics for each wireless communication module according to the first subscription request sent by each wireless communication module. Each wireless communication module only subscribes to messages from the control topic allocated by itself, and sends the response message of the control feedback to the response topic allocated by itself. Based on this, when the mobile terminal subscribes to the topic, the user first needs to select the target robot to be controlled in the connection list displayed on the mobile terminal, and the mobile terminal determines the target robot information corresponding to the target robot according to the user's selection, and the second subscription request sent by the mobile terminal to the server carries the target robot information. Since the association relationship between each robot information and each wireless communication module is recorded in the generated list of the server, the server can determine the target wireless communication module that the mobile terminal wants to control through the target robot information, and then determine the target communication topic pre-allocated for the target wireless communication module. Therefore, the target control topic in the target communication topic is the topic to which the mobile terminal needs to send the control message, and the target response topic in the target communication topic is the topic to which the mobile terminal needs to subscribe to the response message.
[0063] After the mobile terminal subscribes to the target response topic, the mobile terminal can automatically receive the subscribed messages. However, each time the mobile terminal sends a message, it needs to know to which control topic it is sending the message. Therefore, the server feeds back the target communication identifier of the target communication topic to the mobile terminal. The target communication identifier serves as the unique identifier of the target communication topic. Each time the mobile terminal sends a control message to the server, it must carry the target communication identifier. The server can search the target control topic to which the control message should be transmitted from multiple control topics based on the target communication identifier.
[0064] Through the technical solution provided by the embodiment of the present invention, not only can the mobile terminal remote control of the robot be realized, but also a many-to-many control scenario of multiple mobile terminals controlling multiple robots can be realized based on multiple communication topics of the server. The wireless communication module of each robot only performs TCP / IP protocol conversion, and the control task can still be executed even if the mobile terminal is replaced, thereby further improving the flexibility of the robot control strategy.
[0065] In some optional implementations, the above step S204 includes:
[0066] Step d1, receiving a control message sent by the mobile terminal through the target control subject corresponding to the target communication identifier;
[0067] Step d2: Push the control message to the target wireless communication module corresponding to the target robot through the target control topic.
[0068] In some optional implementations, the above step S205 includes:
[0069] Step d3, receiving a 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 terminal through the target response topic.
[0071] Specifically, the above steps d1 to d4 are the interaction processes between the mobile terminal and the wireless communication module of one of the robots in a multi-robot scenario. The relevant principles have been described in the above steps c1 to c6. Please refer to the description of the previous embodiment and will not be repeated here.
[0072] In some optional implementations, the server also performs heartbeat detection regularly to detect whether the wireless communication module and the mobile terminal are online, ensure that the devices in the connection list are the latest, and send the updated connection list to the mobile terminal regularly. However, when some devices are disconnected, the server can issue an alarm message to notify the user to reconnect the mobile terminal and the wireless communication module to ensure connection reliability. In addition, for some control tasks that are executed at a fixed time, the mobile terminal can send control messages to the server regularly according to user needs to achieve timed control.
[0073] The present invention also provides a robot remote control method, such as Figure 4 As shown, it is applied to the wireless communication module and specifically includes the following steps:
[0074] Step S401, 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;
[0075] Step S402, sending a first subscription request to the server, so that the server subscribes to the control topic for the wireless communication module in response to the first subscription request;
[0076] Step S403, receiving a control message pushed by the control topic;
[0077] Step S404, performing protocol conversion on the control message to obtain a control instruction, and sending the control instruction to the motion controller;
[0078] Step S405, generating a response message according to the control action of the motion controller;
[0079] Step S406: Send a response message to the response topic.
[0080] Specifically, regarding the wireless communication module establishing a communication connection with the server and subscribing to the content of related topics, the principle description can refer to the aforementioned embodiment and will not be repeated here. It should be noted that in addition to the ability to receive control messages, the wireless communication module also needs to perform protocol conversion, convert the TCP / IP protocol message into a protocol format that can be recognized by the robot controller, obtain the control command, and then send the control command to the robot's motion controller. The motion controller calculates the robot's motion path based on the control command, thereby sending a control signal to the robot's execution action component, and the robot makes corresponding feedback based on the control signal. In addition, the wireless communication module can also perform two-way conversion of the protocol. In other words, it can convert the protocol format that can be recognized by the robot controller into the TCP / IP protocol to ensure the correct feedback of the response message.
[0081] The technical solution provided by the embodiment of the present invention ensures the reliability of robot command transmission. There is no need to convert the communication protocols of the teach pendants of different protocols. Only the network protocol needs to be converted, so that the common effect of multiple mobile terminals is achieved, and the flexibility of robot control is improved. After the robot performs the action, it feeds back a response message. After the response message is pushed to the mobile terminal through the response topic, the mobile terminal displays the latest motion status of the robot in the screen interface for the user to view. If the robot encounters an abnormal situation (such as a fault, wrong operation, etc.), the application on the mobile terminal will display a warning message and provide corresponding processing suggestions, such as the operator stopping the movement of the robot through the mobile terminal control interface, or switching to other tasks. After the task is completed, the operator can choose to disconnect from the robot controller on the mobile terminal, and the application will display a successful disconnection message.
[0082] See also Figure 5 , Figure 5 is a schematic diagram of a robot control system provided by 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; an MQTT server application is deployed in the server, and a communication topic is deployed in the MQTT server application, and the communication topic includes a control topic and a response topic, the control topic is used to receive a control message sent by the mobile terminal, and the response topic is used to receive a response message sent by the motion controller; a first MQTT client application is deployed in the mobile terminal, and the mobile terminal is used to send a control message to the control topic through the first MQTT client, and the mobile terminal is also used to subscribe to the response topic through the first MQTT client and receive the response message; the motion controller is connected to the wireless communication module; a second MQTT client application is deployed in the wireless communication module, and 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 instruction and send it to the motion controller, and the wireless communication module is also used to send a response message to the response topic through the second MQTT client.
[0083] For the control principle of the robot control system, please refer to the relevant description of the above configuration method embodiment, which will not be repeated here.
[0084] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0085] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0086] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A robot control system configuration method, characterized in that: The method comprises: Deploy the MQTT server application on the server; Deploy a communication topic in the MQTT server application, wherein the communication topic includes a control topic and a response topic, wherein the control topic is used to receive a control message sent by a mobile terminal, and the response topic is used to receive a response message sent by a motion controller; Deploy a first MQTT client application in a mobile terminal, wherein the mobile terminal is used to send the control message 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 message through the first MQTT client; A wireless communication module is connected to the corresponding motion controller of the robot, 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 to convert the control message into a control instruction 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.
2. The method according to claim 1, characterized in that When there are multiple motion controllers, the communication topic is deployed in the MQTT server application, including: Multiple communication topics are deployed in the MQTT server application, each of which includes a control topic and a response topic, each of which belongs to a motion controller of a robot, and each of which has a unique communication identifier.
3. A robot remote control method, characterized in that: Applied to a server, the method comprises: Receiving communication connection requests 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 requests; receiving a first subscription request from the wireless communication module, and subscribing the wireless communication module to a control topic in response to the first subscription request; receiving a second subscription request from the mobile terminal, and subscribing the mobile terminal to a response topic in response to the second subscription request; Receive the control message sent by the mobile terminal through the control topic, and push the control message to the wireless communication module, so that the wireless communication module performs protocol conversion on the control message to obtain a control instruction, and sends the control instruction to the motion controller; The response message sent by the wireless communication module is received through the response topic, and the response message is pushed to the mobile terminal.
4. The method according to claim 3, characterized in that When there are multiple motion controllers, the receiving of the communication connection request 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 request, includes: Receive the first communication connection request sent by each wireless communication module, and return a connection confirmation message to each wireless communication module in response to the first communication connection request sent by each wireless communication module, so as to complete the communication connection with each wireless communication module; Generate a connection list, the connection list including robot information corresponding to each wireless communication module that has established a connection; A second communication connection request sent by the mobile terminal is received, and a connection confirmation message and the connection list are returned to the mobile terminal in response to the second communication connection request, thereby completing the communication connection with the mobile terminal.
5. The method according to claim 4, characterized in that The receiving a first subscription request from the wireless communication module, and subscribing the wireless communication module to a control topic in response to the first subscription request, comprises: A set of communication topics is allocated to each wireless communication module according to the first subscription request sent by each wireless communication module, and each wireless communication module is subscribed to a control topic in the corresponding communication topic.
6. The method according to claim 5, characterized in that The receiving a second subscription request from the mobile terminal, and subscribing the mobile terminal to a response topic in response to the second subscription request, comprises: Receiving a second subscription request from the mobile terminal; parsing the second subscription request to obtain target robot information, where the target robot information is used to indicate that the mobile terminal selects a target robot to be controlled from a plurality of robots according to the connection list; Determine the corresponding target communication topic according to the corresponding relationship between the target robot information and the target wireless communication module; Acquire a target communication identifier of the target communication subject; The mobile terminal is subscribed to a target response topic in the target communication topic, and the target communication identifier is sent 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.
7. The method according to claim 6, characterized in that The 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; The control message is pushed to the target wireless communication module corresponding to the target robot through the target control topic.
8. The method according to claim 7, characterized in that The step of receiving a 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; The response message is pushed to the mobile terminal through the target response topic.
9. A robot remote control method, characterized in that: Applied to a wireless communication module, the method comprises: 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; Sending a first subscription request to a server, so that the server subscribes a control topic for the wireless communication module in response to the first subscription request; Receive 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; Send the response message to the response topic.
10. A robot control system, characterized in that: Including server, mobile terminal, wireless communication module and motion controller; The server is deployed with an MQTT server application, in which a communication topic is deployed, the communication topic includes a control topic and a response topic, the control topic is used to receive a control message sent by a mobile terminal, and the response topic is used to receive a response message sent by a motion controller; A first MQTT client application is deployed in the mobile terminal, and the mobile terminal is used to send the control message 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 message through the first MQTT client; The motion controller is connected to the wireless communication module; A second MQTT client application is deployed in the wireless communication module, and the wireless communication module is used to subscribe to the control topic and receive the control message through the second MQTT client application to convert the control message into a control instruction 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
House robot remote control system used for house seeing
CN109773744A
Proxy subscription method and system based on MQTT server
CN110266794A
Adaptive pipe dredging robot
CN111219563A
User equipment, method and system for controlling medical equipment
CN111312384A
Multi-mobile mechanical arm device cooperative control system and instruction communication method
CN111761587A