Robot communication method and device, equipment, storage medium and program product

By deploying the message forwarding module in the robot and using the server to store and forward messages, the problem of point-to-point connection of robots under the Internet is solved, and the flexibility and wide application of multi-robot communication are realized.

CN118740902APending Publication Date: 2024-10-01CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410986934.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Under Internet communication conditions, it is difficult to establish point-to-point connections between robots, the scope of application is limited to local area networks, and there is a lack of public IP addresses.

Method used

By deploying a message forwarding module in the robot, topic messages are received and sent to the server. The server stores and forwards the messages according to the robot group name, achieving point-to-point connection, and uses the ROS message protocol for data transmission.

Benefits of technology

Flexible communication between multiple robots is realized in the Internet environment, expanding the scope of application, reducing local area network restrictions, and ensuring the reliability and flexibility of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740902A_ABST
    Figure CN118740902A_ABST
Patent Text Reader

Abstract

The invention provides a robot communication method and device, equipment, a storage medium and a program product, and relates to the technical field of computers, and the method applied to a message forwarding module deployed in a robot comprises the following steps: receiving a first topic message published by the robot as a topic publisher node, the first topic message carries a first topic name; the first topic message is sent to a server, the first topic message is stored in a first message queue in the server, and the queue name of the first message queue comprises the robot group name where the robot is located. According to the embodiment of the invention, the problem that the communication application range among multiple robots is limited to a local area network in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a robot communication method, device, equipment, storage medium and program product. Background Art

[0002] At present, the communication between multiple robots is usually realized by server forwarding scheme, or by local area network networking based on communication protocols such as Transmission Control Protocol (TCP) or Hypertext Transfer Protocol (HTTP), and each robot can exchange data through the server. However, under the conditions of Internet communication, robots do not have public Internet Protocol Address (IP), and it is difficult to establish peer-to-peer (P2P) connections between robots, so the application scope is limited to local area networks. Summary of the invention

[0003] The embodiments of the present application provide a robot communication method, device, equipment, storage medium and program product to solve the problem in the prior art that under Internet communication conditions, robots do not have public IP addresses, it is difficult to establish P2P connections between robots, and the scope of application is limited to local area networks.

[0004] To solve the above technical problems, this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a robot communication method, which is applied to a message forwarding module deployed in a robot, and the method includes:

[0006] Receiving a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name;

[0007] The first topic message is sent to a server, wherein the first topic message is stored in a first message queue in the server, and a queue name of the first message queue includes a robot group name to which the robot belongs.

[0008] Optionally, the receiving a first topic message published by the robot as a topic publisher node includes:

[0009] Obtaining communication address information of a topic publisher node whose prefix topic name is the first topic name;

[0010] Establishing a point-to-point connection with the topic publisher node based on the communication address information of the topic publisher node;

[0011] Receive the first topic message published by the topic publisher node.

[0012] Optionally, the first topic message further carries a publisher identifier, and the method further includes:

[0013] Receiving the first topic message forwarded by the server;

[0014] Identify the publisher identifier carried in the first topic message, and determine that the publisher of the first topic message is the topic publisher node, wherein the message forwarding module is used to send the first topic message to nodes other than the topic publisher node through the server.

[0015] Optionally, the first topic message also carries topic content, and the topic content includes a ROS message protocol.

[0016] In a second aspect, an embodiment of the present application further provides a robot communication method, which is applied to a server, and the method includes:

[0017] Receiving a first topic message sent by a first robot through a message forwarding module deployed therein, wherein the first topic message carries a first topic name;

[0018] storing the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the first robot belongs;

[0019] The first topic message is sent to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to topic messages of the first topic name.

[0020] Optionally, before storing the first topic message in the first message queue, the method further includes:

[0021] The first message queue is established according to the robot group name to which the first robot belongs carried in the first topic message.

[0022] In a third aspect, an embodiment of the present application provides a robot communication method, which is applied to a message forwarding module deployed in a second robot, and the method includes:

[0023] Receive a first topic message sent by a server, wherein the first topic message is stored in a first message queue of the server, a queue name of the first message queue includes a robot group name to which the robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries a first topic name;

[0024] The first topic message is sent to the second robot, wherein the second robot, as a topic subscriber node, has pre-subscribed to the topic message of the first topic name.

[0025] Optionally, sending the first topic message to the second robot includes:

[0026] Obtain communication address information of a topic subscriber node whose prefix topic name is the first topic name;

[0027] Establishing a point-to-point connection with the topic subscriber node based on the communication address information of the topic subscriber node;

[0028] Send the first topic message to the topic subscriber node.

[0029] In a fourth aspect, an embodiment of the present application provides a robot communication device, which is applied to a message forwarding module deployed in a robot, and the device includes:

[0030] A first receiving module, configured to receive a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name;

[0031] The first sending module is used to send the first topic message to the server, wherein the first topic message is stored in a first message queue in the server, and the queue name of the first message queue includes the robot group name to which the robot belongs.

[0032] In a fifth aspect, an embodiment of the present application further provides a robot communication device, which is applied to a server, and the device includes:

[0033] A second receiving module is used to receive a first topic message sent by the first robot through the message forwarding module deployed, wherein the first topic message carries a first topic name;

[0034] A message storage module, used for storing the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the first robot belongs;

[0035] The second sending module is used to send the first topic message to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to the topic message of the first topic name.

[0036] In a sixth aspect, an embodiment of the present application further provides a robot communication device, which is applied to a message forwarding module deployed in a second robot, and the device includes:

[0037] A third receiving module is used to receive a first topic message sent by the server, wherein the first topic message is stored in a first message queue of the server, the queue name of the first message queue includes the robot group name to which the robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries the first topic name;

[0038] The third sending module is used to send the first topic message to the second robot, wherein the second robot pre-subscribes to the topic message of the first topic name as a topic subscriber node.

[0039] In the seventh aspect, an embodiment of the present application provides a robot, comprising: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps of the robot communication method as described in any one of the first aspects; or to implement the steps of the robot communication method as described in any one of the third aspects.

[0040] In the eighth aspect, an embodiment of the present application also provides a server, comprising: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the robot communication method as described in any one of the second aspects.

[0041] In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the robot communication method described in the first aspect, the second aspect or the third aspect are implemented.

[0042] In a tenth aspect, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect, the second aspect or the third aspect.

[0043] A robot communication method in an embodiment of the present application is executed by a robot, the robot is a topic publisher node, and the first topic message published by the topic publisher node is first obtained through a message forwarding module deployed in the robot, and then the first topic message is sent to the server. In this way, the server can receive the first topic message sent by the message forwarding module, and determine the first message queue storing the first topic message according to the robot group name to which the robot belongs, so that the server can send the first topic message to the topic subscription robot with the same robot group name as the robot based on the first message queue, thereby reducing the limitations of the topic publishing robot and the topic subscription robot in the same local area network under the Internet communication conditions, establishing a P2P connection between robots, and realizing flexible communication between multiple robots. It can also be applied to a variety of communication scenarios and has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 This is one of the flowcharts of a robot communication method provided in an embodiment of the present application;

[0046] Figure 2 This is the second flow chart of a robot communication method provided in an embodiment of the present application;

[0047] Figure 3 This is a third flow chart of a robot communication method provided in an embodiment of the present application;

[0048] Figure 4 is a schematic diagram of a robot communication method provided in an embodiment of the present application;

[0049] Figure 5 This is one of the structural schematic diagrams of a robot communication device provided in an embodiment of the present application;

[0050] Figure 6 This is the second structural schematic diagram of a robot communication device provided in an embodiment of the present application;

[0051] Figure 7 This is the third structural schematic diagram of a robot communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0053] In order to make the embodiments of the present application clearer, the relevant technical knowledge involved in the embodiments of the present application is first introduced as follows:

[0054] The Robot Operating System (ROS) provides a flexible communication mechanism that enables communication and data sharing between different components within a single robot through topics, services, and parameter servers between nodes. ROS1 and ROS2 are the two main versions of ROS. ROS2 is the next generation version of ROS, which aims to provide more powerful functions and better performance. In ROS, nodes communicate through topics between publishers and subscribers. Topics are channels for exchanging messages between nodes, and each topic has a unique identification name. In ROS1, the ROS Core module is the node information manager of ROS, which is responsible for coordinating the various nodes in the ROS system. Through ROS Core, you can query the publisher and subscriber information under a specified topic, including its Internet Protocol (IP) address and port information.

[0055] ROS topic communication mainly includes communication based on the Transmission Control Protocol (TCP) and communication based on the User Datagram Protocol (UDP). In ROS, TCP-based communication is usually used for message communication scenarios that require reliable transmission. In ROS, UDP-based communication is usually used for scenarios that require high real-time messaging.

[0056] See also Figure 1 , the embodiment of the present application provides a robot communication method, which is applied to a message forwarding module deployed in a robot, such as Figure 1 As shown, the method includes:

[0057] Step 101: receiving a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name;

[0058] It is understandable that the message forwarding module deployed in the robot can be pre-written and deployed in the robot, and the message forwarding module can obtain the topic published by the topic publisher node in real time, and subscribe to the relevant information of this topic (i.e., information related to the first topic, including the first topic message). The message forwarding module can also send the acquired first topic message to the server after relevant processing (such as encryption processing). It can be seen that the first topic message is transmitted to the server by the message forwarding module, so that the server can uniformly process, classify, and store the topic messages, so that other robots or nodes can access and process these topic messages, and realize communication between multiple robots.

[0059] In some embodiments of the present application, the above-mentioned first topic name can be a topic published by the topic publisher node of the robot and subscribed by at least one topic subscription robot, and the first topic name can be the prefix topic name of the first topic message, for example, it can be represented and distinguished by Topic-A, Topic-B, etc. In addition, the message forwarding module in the robot can distinguish whether the topic message needs to be forwarded according to the different topic names of the received topic messages. For example, the first topic name of the first topic message obtained by the message forwarding module is Topic-A, and the second topic name of the second topic message obtained is Topic-B. Since it is pre-set that only Topic-A can be forwarded for communication, the message forwarding module can only forward the first topic message to the server, and other robots can receive the first topic message. It can be seen that by setting a specific prefix of the topic message, that is, the topic name, it is possible to distinguish whether the corresponding topic message needs to be forwarded for communication, thereby avoiding the waste of communication resources.

[0060] Step 102: Send the first topic message to the server, wherein the first topic message is stored in a first message queue in the server, and the queue name of the first message queue includes the name of the robot group to which the robot belongs.

[0061] In some embodiments, the robot can belong to a pre-set robot communication group, such as Group A. The robots in the same communication group have the same robot group name, and the robots in the same communication group communicate with each other. The topic subscription robot in the same communication group can subscribe to the topics published by the topic publishing robot in the same communication group to achieve data communication.

[0062] In addition, the robot group name of the robot can be GroupA, and the queue name of the first message queue where the first topic message is stored can include the robot group name of the robot, that is, GroupA. Therefore, when the topic message in the server is sent to the topic subscribing robot, the first topic message in GroupA can be sent to the second robot also in GroupA according to the robot group name. In this way, through group communication between robots, the isolation of robot communication services can be achieved, reducing the possibility of information leakage and message data tampering during robot communication.

[0063] In the above steps, the first topic message can be sent to the server through the message forwarding module, so that the server can store the first topic message in the corresponding first message queue, realizing the centralized management and distribution of topic messages, facilitating the reliable delivery and processing of topic messages, and at the same time improving the flexibility and scalability of the communication process between multiple robots, and communication transmission is not limited to the same local area network.

[0064] Optionally, the receiving a first topic message published by the robot as a topic publisher node includes:

[0065] Obtaining communication address information of a topic publisher node whose prefix topic name is the first topic name;

[0066] Establishing a point-to-point connection with the topic publisher node based on the communication address information of the topic publisher node;

[0067] Receive the first topic message published by the topic publisher node.

[0068] In some specific embodiments, the message forwarding module deployed in the robot can be connected to the ROSCore in the first ROS through an application programming interface (Application Programming Interface, API), and the message forwarding module can obtain the communication address information, port information, etc. of the topic publisher node stored in the ROS Core through this API. Subsequently, the peer-to-peer (P2P) connection between the message forwarding module and the topic publisher node can be completed through this communication address information, port information, etc. In this way, after completing the P2P connection, the message forwarding module can obtain topic messages in the robot through the topic communication protocol of ROS (such as TCP or UDP) without additional configuration.

[0069] In addition, the message forwarding module can also obtain the topic subscriber information from the ROS Core to forward the topic to these subscribers in a targeted manner to achieve communication between multiple robots.

[0070] Optionally, the first topic message further carries a publisher identifier, and the method further includes:

[0071] Receiving the first topic message forwarded by the server;

[0072] Identify the publisher identifier carried in the first topic message, and determine that the publisher of the first topic message is the topic publisher node, wherein the message forwarding module is used to send the first topic message to nodes other than the topic publisher node through the server.

[0073] In some other embodiments of the present application, the first topic message may also carry a publisher identifier, which may be used to mark information of the topic publisher node, and may be specifically generated in the form of a universally unique identifier (UUID). When the first topic message is forwarded by the server, the robot may filter the first topic message according to the publisher identifier carried in the first topic message, thereby preventing the topic message sent by the robot from being sent to the robot again, avoiding repeated sending of the topic content, and saving communication resources.

[0074] Optionally, the first topic message also carries topic content, and the topic content includes a ROS message protocol.

[0075] In some embodiments of the present application, the first topic message may include the first topic name, topic content, and may also include the publisher identifier in the above embodiments. The present application does not specifically limit the content carried by the first topic message. The topic content in the present application may include the ROS message protocol, and may also include data information related to the first topic, such as specific business data. When the topic subscription robot receives this topic content, it can send it to the business node used to store the first topic.

[0076] In addition, the ROS Core deployed in each robot can receive the registration request from the topic management node and the topic name published by the topic publisher node. In this way, when the message forwarding module queries the relevant information of the topic publisher node of the topic, the ROS Core can quickly provide the topic publisher information to the message forwarding module without prior configuration.

[0077] See also Figure 2 In an embodiment of the present application, a robot communication method is provided, which is applied to a server, and the method includes:

[0078] Step 201: receiving a first topic message sent by a first robot through a message forwarding module deployed therein, wherein the first topic message carries a first topic name;

[0079] Step 202: store the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the first robot belongs;

[0080] Step 203: Send the first topic message to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to topic messages of the first topic name.

[0081] In some embodiments of the present application, the robot that publishes the topic as a topic publisher node may be the first robot, and the robot that receives and subscribes to the first topic message may be the second robot. Therefore, the server can receive the first topic message sent by the message forwarding module in the first robot, and store the first topic message to the corresponding first message queue according to the robot group name of the first robot carried by the first topic message. For example, if the robot group name carried by the first topic message sent by the message forwarding module is GroupA, then after the server receives the first topic message, the first topic message can be directly stored in the first message queue named GroupA.

[0082] Subsequently, when the server forwards the first topic message to other topic-subscribed robots, the first topic message can be directed to the topic-subscribed robots according to the robot group name. For example, if the robot group name of the second robot is GroupA, the server will directly send the first topic message to the second robot. If the robot group name of the third robot is GroupB, the server will skip the third robot and send the first topic message to the next robot with the robot group name of GroupA.

[0083] In this way, the above-mentioned embodiment realizes the group communication function of multiple robots, realizes the business isolation of communication, facilitates the message forwarding module of the first robot to encrypt when sending the first topic message to the server, and also facilitates the robots in the same group to decrypt accordingly when receiving the first topic message, thereby realizing the data encryption function of communication between multiple robots, which can effectively prevent message leakage and message data tampering during robot communication.

[0084] Optionally, before storing the first topic message in the first message queue, the method further includes:

[0085] The first message queue is established according to the robot group name to which the first robot belongs carried in the first topic message.

[0086] It should be noted that the first message queue set in the above-mentioned server can be a topic forwarding component, and can also be replaced by a database (such as redis) or a cloud message cache queue, etc. This application does not make any specific restrictions on this.

[0087] See also Figure 3 The embodiment of the present application further provides a robot communication method, which is applied to a message forwarding module deployed in a second robot, and the method includes:

[0088] Step 301: Receive a first topic message sent by a server, wherein the first topic message is stored in a first message queue of the server, the queue name of the first message queue includes the name of the robot group to which the robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries a first topic name;

[0089] Step 302: Send the first topic message to the second robot, wherein the second robot, as a topic subscriber node, has pre-subscribed to the topic message of the first topic name.

[0090] In some other embodiments, the second robot can act as a topic subscriber node to receive topic messages published by a topic publisher node. A server can be used as an intermediary for topic messages between the topic publisher node and the topic subscriber node. The server receives topic messages sent by a topic publisher node with a certain robot group name, and the server stores the topic messages in a message queue corresponding to the robot group name, and then sends the topic messages to topic subscriber nodes with the same robot group name. In this way, the embodiment of the present application realizes the communication function of multiple robots without public network IP conditions, and can be compatible with various local area networks at the same time, and does not limit the platform and version adopted by the first robot and the second robot, and can be compatible with various platforms and robot versions.

[0091] It is also worth mentioning that the embodiment of the present application has the ability to adapt to the addition and change of communication topics. There is no need to configure the corresponding topic name in the robot in advance. After the message forwarding module is deployed in the first robot, it can directly receive the topic message published by the topic publisher node without the need for advance configuration, and has strong adaptability.

[0092] Optionally, sending the first topic message to the second robot includes:

[0093] Obtain communication address information of a topic subscriber node whose prefix topic name is the first topic name;

[0094] Establishing a point-to-point connection with the topic subscriber node based on the communication address information of the topic subscriber node;

[0095] Send the first topic message to the topic subscriber node.

[0096] In some other embodiments, in the second robot, the second robot acts as a topic subscriber node and also as a robot with the same robot group name as the first robot, and its second message forwarding module can receive the first topic message from the server. Before the second message forwarding module receives the first topic message, the communication address information or port information of the topic subscriber node with the prefix topic name as the first topic name can be obtained through the API provided by the second ROS, and then a P2P connection is established with the topic subscriber node according to the communication address information or port information of the topic subscriber node, so as to send the first topic message to the topic subscriber node.

[0097] See also Figure 4 , Figure 4 It is a schematic diagram of a robot communication method provided by an embodiment of the present application. Specifically, in the first robot, the topic publisher node A1 has an API connection with the first ROS Core, the business management node and the first message forwarding module. The first robot can publish the first topic as the topic publisher node A1, and send relevant information of the first topic to the first ROS Core, including the IP and port information of the topic publisher node. The business management node can manage the topic name and topic message published by the topic publisher node A1. The first ROS Core can receive the registration request of the topic publisher node, or the topic publisher node A1 can automatically register in the first ROS core when it starts, receive the first topic message sent by the topic publisher node, and the first ROS Core can include all topic information published by the topic publisher node. The first message forwarding module can initiate a query request to the first ROS Core, query the IP or port information of the topic publisher node A1, and obtain the first topic message published by the topic publisher node A1 based on this.

[0098] Furthermore, the server can receive the first topic message sent by the first message forwarding module, and determine that the message queue corresponding to the first topic message is the first message queue, i.e., Group A, according to the robot group name of the first robot carried in the first message queue. The second message queue in the server, i.e., the message queue is named Group B, and may store topic messages published by the topic publisher robot whose robot group name is Group B. In this way, the server can forward the first topic message to the robot with the same robot group name according to the name of the first message queue.

[0099] Finally, the second robot has GroupA as the robot group name, and the second message forwarding module therein can receive the first topic message sent by the server. In addition, the second message forwarding module can initiate a registration request to the second ROSCore, or automatically register in the second ROS core when it is started, so as to query the topic subscriber node A2 in the second robot, and send the first topic message to the topic subscriber node A2 for storage and management.

[0100] It is also worth mentioning that Figure 4 The third robot is also included, and the robot group name of the third robot can be consistent with the robot group name of the first robot and the second robot, and then the server will send the first topic message to the third robot. The third message forwarding module in the third robot receives the first topic message, and sends the first topic message to the topic subscriber node A3, so as to facilitate the management of the first topic message in the third robot. It should be noted that the third robot can adopt ROS2, the third message forwarding module can register as a subscriber to ROS2, and the topic subscriber node A3 can also send relevant information of the first topic to ROS2. It can be seen that the embodiment of the present application is compatible with multiple ROS systems and has good compatibility.

[0101] In addition, for the fourth robot whose robot group name is other topic names, the server will not send the first topic message to the fourth message forwarding module in the fourth robot. If the robot group name of the fourth robot is GroupB, the server will send the topic message stored in the second message queue named GroupB to the fourth message forwarding module. Although the fourth message forwarding module in the fourth robot did not receive the first topic message, it can receive other topic messages. At this time, the fourth message forwarding module can also send the received topic message to the topic subscriber node B4 in the fourth robot. Prior to this, the fourth message forwarding module can also initiate a registration request to the third ROS Core, or automatically register in the third ROS core when it starts, so as to query the IP or port information of the topic subscriber node B2 in the fourth robot.

[0102] In this way, a robot communication method in the above embodiment realizes convenient communication between multiple robots. It does not require the first robot and the second robot to be in the same local area network, is not restricted by the network environment, is compatible with multiple local area networks, has strong adaptability and a wide range of adaptability.

[0103] like Figure 5 As shown, the embodiment of the present application also provides a robot communication device, which is applied to a message forwarding module deployed in the robot, and the device includes:

[0104] A first receiving module 501 is used to receive a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name;

[0105] The first sending module 502 is used to send the first topic message to the server, wherein the first topic message is stored in a first message queue in the server, and the queue name of the first message queue includes the robot group name to which the robot belongs.

[0106] Optionally, the first receiving module 501 includes:

[0107] A first acquisition unit, used to acquire communication address information of a topic publisher node whose prefix topic name is the first topic name;

[0108] A first connection unit, configured to establish a point-to-point connection with the topic publisher node based on the communication address information of the topic publisher node;

[0109] The message receiving unit is used to receive the first topic message published by the topic publisher node.

[0110] Optionally, the first topic message also carries a publisher identifier, and the robot communication device further includes:

[0111] A forwarding receiving module, used for receiving the first topic message forwarded by the server;

[0112] An identification recognition module is used to identify the publisher identification carried in the first topic message and determine that the publisher of the first topic message is the topic publisher node, wherein the message forwarding module is used to send the first topic message to nodes other than the topic publisher node through the server.

[0113] Optionally, the first topic message also carries topic content, and the topic content includes a ROS message protocol.

[0114] It should be noted that Figure 5 The robot communication device in the embodiment can realize the following Figure 1 The various processes implemented in the robot communication method embodiment shown can achieve the same beneficial effects. To avoid repetition, they will not be described here. Please refer to the relevant instructions in the aforementioned embodiments.

[0115] like Figure 6 As shown, the embodiment of the present application also provides a robot communication device, which is applied to a server, and the device includes:

[0116] The second receiving module 601 is used to receive a first topic message sent by the first robot through the message forwarding module deployed, wherein the first topic message carries a first topic name;

[0117] A message storage module 602, configured to store the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the first robot belongs;

[0118] The second sending module 603 is used to send the first topic message to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to topic messages of the first topic name.

[0119] Optionally, before storing the first topic message in the first message queue, the robot communication device further includes:

[0120] The queue establishment module is used to establish the first message queue according to the robot group name to which the first robot belongs carried in the first topic message.

[0121] It should be noted that Figure 6 The robot communication device in the embodiment can realize the following Figure 2 The various processes implemented in the robot communication method embodiment shown can achieve the same beneficial effects. To avoid repetition, they will not be described here. Please refer to the relevant instructions in the aforementioned embodiments.

[0122] like Figure 7 As shown, the embodiment of the present application further provides a robot communication device, which is applied to a message forwarding module deployed in a second robot, and the device includes:

[0123] The third receiving module 701 is used to receive a first topic message sent by the server, wherein the first topic message is stored in a first message queue of the server, the queue name of the first message queue includes the robot group name to which the robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries the first topic name;

[0124] The third sending module 702 is used to send the first topic message to the second robot, wherein the second robot, as a topic subscriber node, has pre-subscribed to the topic message of the first topic name.

[0125] Optionally, the third sending module 702 includes:

[0126] A second acquisition unit, used to acquire communication address information of a topic subscriber node whose prefix topic name is the first topic name;

[0127] A second connection unit, configured to establish a point-to-point connection with the topic subscriber node based on the communication address information of the topic subscriber node;

[0128] A message sending unit is used to send the first topic message to the topic subscriber node.

[0129] It should be noted that Figure 7 The robot communication device in the embodiment can realize the following Figure 3 The various processes implemented in the robot communication method embodiment shown can achieve the same beneficial effects. To avoid repetition, they will not be described here. Please refer to the relevant instructions in the aforementioned embodiments.

[0130] The embodiment of the present application also provides a robot, because the principle of the robot communication device to solve the problem is similar to Figure 1 The robot communication method shown in the figure is similar, so the implementation of the robot communication device can refer to the implementation of the method, and the repeated parts will not be repeated. A robot in an embodiment of the present application includes: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the following Figure 1 The steps in the robot communication method shown; or implement the Figure 3 The steps in the robot communication method are shown.

[0131] The embodiment of the present application also provides a server, comprising: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the following Figure 2 The steps in the robot communication method shown.

[0132] It should be noted that the server provided in the embodiment of the present application is capable of executing the above Figure 2 If the apparatus of the robot communication method shown in the embodiment is used, all implementations of the robot communication method in the above embodiment are applicable to the server and can achieve the same or similar beneficial effects. To avoid repeated description, this embodiment will not be described in detail.

[0133] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned robot communication method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0134] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 , Figure 2 , Figure 3 or Figure 4 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A robot communication method, characterized in that: Applied to a message forwarding module deployed in a robot, the method comprises: Receiving a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name; The first topic message is sent to a server, wherein the first topic message is stored in a first message queue in the server, and a queue name of the first message queue includes a robot group name to which the robot belongs.

2. The method according to claim 1, characterized in that The receiving a first topic message published by the robot as a topic publisher node includes: Obtaining communication address information of a topic publisher node whose prefix topic name is the first topic name; Establishing a point-to-point connection with the topic publisher node based on the communication address information of the topic publisher node; Receive the first topic message published by the topic publisher node.

3. The method according to claim 1 or 2, characterized in that: The first topic message also carries a publisher identifier, and the method further includes: Receiving the first topic message forwarded by the server; Identify the publisher identifier carried in the first topic message, and determine that the publisher of the first topic message is the topic publisher node, wherein the message forwarding module is used to send the first topic message to nodes other than the topic publisher node through the server.

4. The method according to claim 1 or 2, characterized in that: The first topic message also carries topic content, and the topic content includes the ROS message protocol.

5. A robot communication method, characterized in that: Applied to a server, the method comprises: Receiving a first topic message sent by a first robot through a message forwarding module deployed therein, wherein the first topic message carries a first topic name; storing the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the robot belongs; The first topic message is sent to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to topic messages of the first topic name.

6. The method according to claim 5, characterized in that Before storing the first topic message in the first message queue, the method further includes: The first message queue is established according to the robot group name to which the robot belongs carried in the first topic message.

7. A robot communication method, characterized in that: Applied to a message forwarding module deployed in a second robot, the method comprises: Receive a first topic message sent by a server, wherein the first topic message is stored in a first message queue of the server, a queue name of the first message queue includes a robot group name to which a first robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries a first topic name; The first topic message is sent to the second robot, wherein the second robot, as a topic subscriber node, has pre-subscribed to the topic message of the first topic name.

8. The method according to claim 7, characterized in that The sending the first topic message to the second robot includes: Obtain communication address information of a topic subscriber node whose prefix topic name is the first topic name; Establishing a point-to-point connection with the topic subscriber node based on the communication address information of the topic subscriber node; Send the first topic message to the topic subscriber node.

9. A robot communication device, characterized in that: A message forwarding module deployed in a robot, the device comprising: A first receiving module, configured to receive a first topic message published by the robot as a topic publisher node, wherein the first topic message carries a first topic name; The first sending module is used to send the first topic message to the server, wherein the first topic message is stored in a first message queue in the server, and the queue name of the first message queue includes the robot group name to which the robot belongs.

10. A robot communication device, characterized in that: Applied to a server, the device comprises: A second receiving module is used to receive a first topic message sent by the first robot through the message forwarding module deployed, wherein the first topic message carries a first topic name; A message storage module, used for storing the first topic message in a first message queue, wherein the queue name of the first message queue includes the name of the robot group to which the first robot belongs; The second sending module is used to send the first topic message to a second robot, wherein the second robot is a robot that is in the same group as the first robot and subscribes to the topic message of the first topic name.

11. A robot communication device, characterized in that: The message forwarding module deployed in the second robot includes: A third receiving module is used to receive a first topic message sent by a server, wherein the first topic message is stored in a first message queue of the server, the queue name of the first message queue includes a robot group name to which the first robot belongs, the first robot is a topic publisher node that publishes the first topic message, and the first topic message carries the first topic name; The third sending module is used to send the first topic message to the second robot, wherein the second robot pre-subscribes to the topic message of the first topic name as a topic subscriber node.

12. A robot, characterized in that: include: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps of the robot communication method as described in any one of claims 1 to 4; or to implement the steps of the robot communication method as described in claim 7 or 8.

13. A server, characterized in that: include: A transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor; The processor is used to read the program in the memory to implement the steps in the robot communication method according to claim 5 or 6.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot communication method according to any one of claims 1 to 8 are implemented.

15. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the robot communication method according to any one of claims 1 to 8.