CN115333946A - Node query method, device and equipment of robot operating system - Google Patents

Node query method, device and equipment of robot operating system Download PDF

Info

Publication number
CN115333946A
CN115333946A CN202210898078.4A CN202210898078A CN115333946A CN 115333946 A CN115333946 A CN 115333946A CN 202210898078 A CN202210898078 A CN 202210898078A CN 115333946 A CN115333946 A CN 115333946A
Authority
CN
China
Prior art keywords
node
information management
information
management node
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210898078.4A
Other languages
Chinese (zh)
Other versions
CN115333946B (en
Inventor
王发平
邓加海
姜波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Haixing Zhijia Technology Co Ltd
Original Assignee
Shenzhen Haixing Zhijia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Haixing Zhijia Technology Co Ltd filed Critical Shenzhen Haixing Zhijia Technology Co Ltd
Priority to CN202210898078.4A priority Critical patent/CN115333946B/en
Publication of CN115333946A publication Critical patent/CN115333946A/en
Application granted granted Critical
Publication of CN115333946B publication Critical patent/CN115333946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2801Broadband local area networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Manipulator (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device and equipment for node query of a robot operating system, wherein the method comprises the following steps: creating an information management node in a robot operating system of a current host, and broadcasting the information of the information management node in a local area network where the robot operating system is located so that other nodes in the local area network discover the information management node; collecting response messages through the information management nodes, wherein the response messages are sent by other nodes after the information management nodes are found; generating node topology information by using the response message through the information management node, and storing the node topology information; and receiving the query request through the information management node, and feeding back the node topology information in response to the query request. The technical scheme provided by the invention improves the speed of inquiring the node information for the decentralized robot operating system.

Description

Node query method, device and equipment of robot operating system
Technical Field
The invention relates to the field of robot operating systems, in particular to a method, a device and equipment for node query of a robot operating system.
Background
A Robot Operating System (ROS) is a software framework widely used in artificial intelligence development at present, integrates a communication mechanism, a development tool, an application function and an ecosystem, and is mainly used for improving the repeated utilization rate of various functions and various software. At present, the robot operating system mainly comprises two versions, one is a centralized version similar to ROS1, and the other is an decentralized version similar to ROS 2. The communication mechanism of ROS1 is centralized, and for one or more hosts installed with ROS1, a host node program needs to be deployed on a certain host to manage other node programs, such as: a node program for realizing an image processing function is deployed in a certain host, a node program for realizing the image acquisition function is deployed in the current host or other hosts, the image processing node needs to acquire image data from the image acquisition node, then the two nodes need to be registered in a main node, the main node builds a communication channel for the image processing node and the image acquisition node, and the image processing node and the image acquisition node can perform data transmission. However, this communication mechanism results in the ROS1 being less robust, and once the master node program crashes, all slave nodes cannot communicate. Later, the introduction of ROS2 solved this problem, and ROS2 realized communication between nodes based on Data Distribution Service (DDS), and achieved the goal of decentralization. For example: one or more hosts are provided with ROS2, a node program for realizing the image processing function is deployed in a certain host, a node program for realizing the image acquisition function is deployed in the current host or other hosts, the image processing node and the image acquisition node periodically issue broadcast messages in the current local area network to inform all other nodes that the nodes are on line, and the image processing node and the image acquisition node discover each other based on the messages broadcast by the other nodes, so that the connection is established and data transmission is carried out.
When a user only needs to simply query which nodes are contained in the local area network, all the nodes need to be registered in the main node in the ROS1, so that the speed of querying the node topology information by the user is very high. However, this is not feasible in the ROS2, and the ROS2 needs to newly build a node or use an existing node to broadcast again, and then discover the node topology information in the current local area network. The process generally requires 0.5-2.0 seconds of delay cost, and the cost is higher for some occasions needing to immediately acquire the node topology information of the robot operating system. Based on this, how to realize the function of quickly inquiring node information in the decentralized robot operating system is an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a device for node query in a robot operating system, so as to improve node query efficiency in a decentralized robot operating system.
According to a first aspect, an embodiment of the present invention provides a node query method for a robot operating system, where the method includes: creating an information management node in a robot operating system of a current host, and broadcasting information of the information management node in a local area network where the robot operating system is located so that other nodes in the local area network discover the information management node; collecting response messages through the information management node, wherein the response messages are sent by other nodes after the information management node is found; generating node topology information by the information management node by using the response message, and storing the node topology information; and receiving a query request through the information management node, and feeding back the node topology information in response to the query request.
Optionally, the receiving, by the information management node, an inquiry request and feeding back the node topology information in response to the inquiry request includes: analyzing the query request and determining a sending object of the query request; and feeding back the node topology information according to the type of the sending object of the query request.
Optionally, the feeding back the node topology information according to the type of the sending object of the query request includes: if the sending object of the query request is a process in the current host, the information management node feeds back the node topology information to the current host through a shared memory; if the sending object of the query request is the process of other hosts, the information management node feeds back the node topology information to the other hosts through a network interface; if the sending object of the query request is other nodes in the local area network, the node topology information is issued to the target topic through the information management node, so that the other nodes in the local area network can acquire the node topology information from the target topic.
Optionally, the method further comprises: the information synchronization topic is published through the information management node of the current host, so that the information management nodes in other hosts subscribe the information synchronization topic, and the node topology information sent by the information management node of the current host is received through the information synchronization topic.
Optionally, the method further comprises: and creating a daemon node, and monitoring the running state of the information management node through the daemon node so as to restart the information management node when the running state of the information management node is abnormal.
Optionally, before collecting the response message by the information management node, the method further includes: and judging whether the communication of the robot operating system is normal or not, and if the communication of the robot operating system is normal, executing the step of collecting the response message through the information management node.
Optionally, the saving the node topology information includes:
and storing the node topology information through a hash table structure or data cache middleware.
According to a second aspect, an embodiment of the present invention provides a node query apparatus for a robot operating system, where the apparatus includes: the information management node initialization unit is used for creating an information management node in a robot operating system of a current host, and broadcasting the information of the information management node in a local area network where the robot operating system is located so that other nodes in the local area network can find the information management node; a response message collection unit, configured to collect, by the information management node, a response message that is sent by another node after the information management node is discovered; a node topology information caching unit, configured to generate node topology information by using the response message through the information management node, and store the node topology information; and the query unit is used for receiving a query request through the information management node and feeding back the node topology information in response to the query request.
According to a third aspect, an embodiment of the present invention provides a node fast query device for a robot operating system, including: a memory and a processor, the memory and the processor being communicatively coupled, wherein the memory stores computer instructions, and the processor executes the computer instructions to perform the method of the first aspect, or any one of the optional embodiments of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to thereby perform the method of the first aspect, or any one of the optional implementation manners of the first aspect.
The technical scheme provided by the application has the following advantages:
according to the technical scheme, for the decentralized robot operating system, one information management node is established in each host. When the information management node is created for the first time, each host broadcasts the information management node to a local area network where a robot operating system is located based on a service discovery function, so that the information management node and all other nodes are discovered mutually, the process usually needs about 0.5-2.0 seconds, meanwhile, the information management node generates node topology information based on response messages fed back by other nodes, and the generated node topology information is cached in the host. When a user inquires the nodes subsequently, the user only needs to read the cached node topology information through the information management node without creating a new node or using an old node to repeatedly find the process, and the quick node information inquiry can be realized. The information management node does not change the network structure of the decentralized robot operating system, the function of quickly inquiring the node information is realized on the basis of keeping high robustness, and the efficiency of inquiring the node information of the robot operating system is obviously improved.
In addition, in one embodiment, the type of the starting object of the user is analyzed according to the query request of the user, and different feedback mechanisms are set according to different sending objects, so that the efficiency of node query is further improved. The method specifically comprises the following steps: when the sending object of the query request is a certain process in the current host, the information management node feeds back the node topology information to the current host through the shared memory, and the shared memory is the fastest mode for IPC communication among different processes of the same host, so that the query efficiency is further improved. The nodes of different host users can provide common network services such as HTTP, UDP and TCP; and for the inquiry requests sent by other nodes (including nodes on the same host and different hosts) of the robot operating system, the node topology information can also be fed back in a topic form, so that the node inquiry mode has multiple ways, and the reliability of inquiring the node information is improved.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:
FIG. 1 is a schematic diagram illustrating steps of a node query method of a robot operating system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a node query method of a robot operating system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a node query device of a robot operating system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a node query device of a robot operating system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of the present invention.
Referring to fig. 1, in an embodiment, a node query method of a robot operating system specifically includes the following steps:
step S101: and creating an information management node in the robot operating system of the current host, and broadcasting the information of the information management node in the local area network where the robot operating system is located so that other nodes in the local area network discover the information management node.
Step S102: and collecting response messages through the information management nodes, wherein the response messages are sent by other nodes after the information management nodes are discovered.
Step S103: and generating node topology information by using the response message through the information management node, and storing the node topology information.
Step S104: and receiving the query request through the information management node, and feeding back the node topology information in response to the query request.
Specifically, the decentralized robot operating system can be installed on one host computer or on a plurality of host computers respectively, so that the communication between the inside of the host computer and the nodes between the host computers is realized. In the present embodiment, a node program, i.e., an information management node, is created in each robot operating system installed on each host. The information management node is a network which firstly joins in a robot operating system when being established, the inside of the node is broadcasted through a topology manager to inform other nodes in the whole network, and the information of other nodes is synchronized according to response messages of other nodes, the process, namely the process of topology discovery, generally needs about 0.5-2.0 seconds, in other words, if the query operation of querying the network topology information is carried out through a newly established information management node, the node needs to wait before querying the network topology information to ensure the reliability of the information, time delay of about 0.5-2.0 seconds still exists, the delay cost of topology discovery is incurred when any node firstly joins in the network, and the information management node is not exceptional. However, if the information management node is already started, the information management node generates node topology information based on response messages fed back by other nodes, and caches the generated node topology information inside the host. When a user needs to inquire the node information subsequently, no matter which host the user uses, the user only needs to directly inquire the node topology information through the information management node on the current host, and a new intermediate node is not needed to be created.
Specifically, in an embodiment, the information management node further sets a strategic discovery service, after the information management node is created for the first time, the action of subsequent broadcasting is not controlled by a query request of a user, but the node information is autonomously broadcasted to the local area network of the robot operating system, and the broadcasting time interval may be real-time, timed, or according to a certain strategy. Therefore, response messages fed back by other nodes are collected again, new node topology information is generated, the cached node topology information is updated according to a certain time interval, and the accuracy of the node topology information cached by the current host is improved.
Specifically, in this embodiment, the cache node topology information may adopt a hash table structure or a mainstream high-performance data cache middleware, such as Redis. Therefore, the speed of increasing, deleting and modifying the information is accelerated, and the efficiency of node information query is further improved.
Specifically, in an embodiment, the step S104 specifically includes the following steps:
the method comprises the following steps: and analyzing the query request and determining a sending object of the query request.
Step two: and feeding back the node topology information according to the type of the sending object of the query request.
Specifically, in this embodiment, it is considered that a user may query the node topology information from the current host, may also query the node topology information remotely through some client devices (e.g., a mobile phone, a tablet, and the like), and may also query the node topology information through operations issued by some function nodes in the robot operating system. In order to enable the node topology information to be fed back to various query processes stably and reliably and maintain the fastest feedback speed as much as possible, the embodiment of the invention presets different feedback ways according to the type of the sending object of the query request to feed back the node topology information, thereby further improving the query efficiency and query reliability of the node topology information.
Specifically, in this embodiment, the second step specifically includes the following steps:
1. and if the sending object of the query request is the process in the current host, the information management node feeds back the node topology information to the current host through the shared memory.
2. And if the sending object of the query request is the process of other hosts, the information management node feeds back the node topology information to other hosts through the network interface.
3. If the sending object of the query request is other nodes in the local area network, the node topology information is issued to the target topic through the information management node, so that other nodes from the local area network acquire the node topology information from the target topic.
Specifically, in this embodiment, if the information management node analyzes that the query request is from another process in the current host (for example, an application program in the current host), the information management node performs communication in a memory sharing manner, so that the information management node feeds back the node topology information to the process corresponding to the current host, and thus, the node topology information is fed back at the highest speed in a manner of performing IPC communication between different processes of the same host, and the efficiency of querying the node is further improved. If the query request is sent by a process of another host, the information management node may feed back the node topology information to the other host through the network interface, and the available network services include, but are not limited to, HTTP, UDP, and TCP. In addition, for query requests initiated by other nodes on the same host or other nodes on different hosts, the node topology information can be published to a specific target topic through the information management node, and for other nodes of the robot operating system, the node topology information can be acquired in a topic subscription mode (the node topology information can also be realized in a communication mode of service among the nodes). Therefore, multiple query ways are realized, and the reliability of node query is improved.
Specifically, in an embodiment, the node query method for the robot operating system provided in the embodiment of the present invention further includes the following steps:
step three: the information synchronization topic is published through the information management node of the current host, so that the information management nodes in other hosts subscribe the information synchronization topic, and the node topology information sent by the information management node of the current host is received through the information synchronization topic.
Specifically, because the information management node of each host periodically issues its own information in the local area network, the time for acquiring the node topology information cannot be guaranteed to be completely consistent, if some nodes are offline or some nodes are newly built in the process, the node topology information cached by each host will be different, although the difference of the node topology information cached by each host is usually small, the difference will also have a certain influence on the user management node. In the present embodiment, the information management node of each host also publishes the information synchronization topic in the local area network, so that the information management nodes in other hosts except for the host subscribe to the information synchronization topic published by the host. The node topology information cached by each host is mutually synchronized by publishing/subscribing the information of the information synchronization topic among the hosts, so that the difference of the node topology information cached in each host is further reduced, and the reliability of querying the node by a user is improved.
Specifically, in an embodiment, the node query method for the robot operating system provided in the embodiment of the present invention further includes the following steps:
step four: and creating a daemon node, and monitoring the running state of the information management node through the daemon node so as to restart the information management node when the running state of the information management node is abnormal.
Specifically, in this embodiment, the information management node is used as a background process, a daemon node is additionally deployed, the daemon node is started to monitor the running state of the information management node, and when the information management node is abnormal (for example, a topic cannot be published, a topic cannot be subscribed, and unknown abnormality causes a process running jam), the daemon node restarts the information management node process, so that the information management node is ensured to run stably all the time, and the reliability of node query is further improved.
Specifically, as shown in fig. 2, in an embodiment, before the step S102, the following steps are further included:
step five: and judging whether the communication of the robot operating system is normal or not, and if the communication of the robot operating system is normal, executing the step of collecting the response message through the information management node.
Specifically, in this embodiment, before the current host collects the response messages of other nodes, it is further required to determine whether the communication of the entire robot operating system is normal, for example: and performing ping test according to the ip address of the host and the ip address and the host name of the opposite host, and judging whether the communication is normal. If the communication is abnormal, technicians need to be informed to debug in time, the operation of the broadcast information management node is avoided from being useless, and the query time is avoided from being wasted, so that the efficiency of querying the node by a user is further improved. Similarly, in the present embodiment, before the information synchronization topic is issued and the query operation is performed in response to the query request each time, it is also determined whether the communication of the entire robot operating system is normal.
Through the steps, according to the technical scheme provided by the application, for the decentralized robot operating system, one information management node is established in each host. When the information management node is created for the first time, each host broadcasts the information management node to a local area network where a robot operating system is located based on a service discovery function, so that the information management node and all other nodes are discovered mutually, the process usually needs about 0.5-2.0 seconds, meanwhile, the information management node generates node topology information based on response messages fed back by other nodes, and the generated node topology information is cached in the host. When a user inquires the nodes subsequently, the user only needs to read the cached node topology information through the information management node without creating a new node or using an old node to repeatedly find the process, and the quick node information inquiry can be realized. The information management node does not change the network structure of the decentralized robot operating system, the function of quickly inquiring the node information is realized on the basis of keeping high robustness, and the efficiency of inquiring the node information of the robot operating system is obviously improved.
In addition, in one embodiment, the type of the launching object of the user is analyzed according to the query request of the user, and different feedback mechanisms are set according to different sending objects, so that the efficiency of node query is further improved. The method specifically comprises the following steps: when the sending object of the query request is a certain process in the current host, the information management node feeds back the node topology information to the current host through the shared memory, and the shared memory is the fastest IPC communication mode among different processes of the same host, so that the query efficiency is further improved. The nodes of different host users can provide common network services such as HTTP, UDP and TCP; and for the query requests sent by other nodes (including nodes on the same host and different hosts) of the robot operating system, the node topology information can also be fed back in a topic form, so that the node query mode has multiple ways, and the reliability of querying the node information is improved.
As shown in fig. 3, this embodiment further provides a node query device of a robot operating system, where the node query device includes:
an information management node initialization unit 101, configured to create an information management node in a robot operating system of a current host, and broadcast information of the information management node in a local area network where the robot operating system is located, so that other nodes in the local area network discover the information management node. For details, refer to the related description of step S101 in the above method embodiment, and details are not repeated herein.
A response message collecting unit 102, configured to collect, by the information management node, a response message that is sent by another node after the information management node is discovered. For details, refer to the related description of step S102 in the above method embodiment, and no further description is provided here.
A node topology information caching unit 103, configured to generate node topology information by using the response message through the information management node, and store the node topology information. For details, refer to the related description of step S103 in the above method embodiment, and no further description is provided here.
And the query unit 104 is configured to receive a query request through the information management node, and feed back node topology information in response to the query request. For details, refer to the related description of step S104 in the above method embodiment, and no further description is provided here.
The node query device of the robot operating system according to the embodiment of the present invention is configured to execute the node query method of the robot operating system according to the embodiment, and the implementation manner and the principle thereof are the same, and details of the node query device are described in the above method embodiment and are not repeated.
Through the cooperative cooperation of the components, the technical scheme provided by the application establishes an information management node in each host for the decentralized robot operating system. When the information management node is created for the first time, each host broadcasts the information management node to a local area network where a robot operating system is located based on a service discovery function, so that the information management node and all other nodes are discovered mutually, the process usually needs about 0.5-2.0 seconds, meanwhile, the information management node generates node topology information based on response messages fed back by other nodes, and the generated node topology information is cached in the host. When a user inquires the nodes subsequently, the user only needs to read the cached node topology information through the information management node without creating a new node or using an old node to repeatedly find the process, and the quick node information inquiry can be realized. The information management node does not change the network structure of the decentralized robot operating system, the function of quickly inquiring the node information is realized on the basis of keeping high robustness, and the efficiency of inquiring the node information of the robot operating system is obviously improved.
In addition, in one embodiment, the type of the launching object of the user is analyzed according to the query request of the user, and different feedback mechanisms are set according to different sending objects, so that the efficiency of node query is further improved. The method specifically comprises the following steps: when the sending object of the query request is a certain process in the current host, the information management node feeds back the node topology information to the current host through the shared memory, and the shared memory is the fastest mode for IPC communication among different processes of the same host, so that the query efficiency is further improved. The nodes of different host users can provide common network services such as HTTP, UDP and TCP; and for the query requests sent by other nodes (including nodes on the same host and different hosts) of the robot operating system, the node topology information can also be fed back in a topic form, so that the node query mode has multiple ways, and the reliability of querying the node information is improved.
Fig. 4 shows a node query device of a robot operating system according to an embodiment of the present invention, where the node query device includes a processor 901 and a memory 902, and may be connected by a bus or by another means, and fig. 4 takes the example of connection by a bus as an example.
Processor 901 may be a Central Processing Unit (CPU). Processor 901 may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 902, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the methods in the above-described method embodiments. The processor 901 executes various functional applications and data processing of the processor, i.e. implements the methods in the above-described method embodiments, by running non-transitory software programs, instructions and modules stored in the memory 902.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 901, and the like. Further, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 902, which when executed by the processor 901 perform the methods in the above-described method embodiments.
The specific details of the node query device of the robot operating system may be understood by referring to the corresponding related descriptions and effects in the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, and the implemented program can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A node query method of a robot operating system, the method comprising:
creating an information management node in a robot operating system of a current host, and broadcasting the information of the information management node in a local area network where the robot operating system is located so that other nodes in the local area network discover the information management node;
collecting, by the information management node, a response message that is sent by other nodes after the information management node is discovered;
generating node topology information by the information management node by using the response message, and storing the node topology information;
and receiving a query request through the information management node, and feeding back the node topology information in response to the query request.
2. The method of claim 1, wherein receiving, by the information management node, a query request and feeding back the node topology information in response to the query request comprises:
analyzing the query request and determining a sending object of the query request;
and feeding back the node topology information according to the type of the sending object of the query request.
3. The method according to claim 2, wherein the feeding back the node topology information according to the type of the transmission object of the query request comprises:
if the sending object of the query request is a process in the current host, the information management node feeds back the node topology information to the current host through a shared memory;
if the sending object of the query request is the process of other hosts, the information management node feeds back the node topology information to the other hosts through a network interface;
if the sending object of the query request is other nodes in the local area network, the node topology information is issued to the target topic through the information management node, so that the other nodes in the local area network can acquire the node topology information from the target topic.
4. The method of claim 1, further comprising:
the information synchronization topic is published through the information management node of the current host, so that the information management nodes in other hosts subscribe the information synchronization topic, and the node topology information sent by the information management node of the current host is received through the information synchronization topic.
5. The method of claim 1, further comprising:
and creating a daemon node, and monitoring the running state of the information management node through the daemon node so as to restart the information management node when the running state of the information management node is abnormal.
6. The method of claim 1, wherein prior to collecting response messages by the information management node, the method further comprises:
and judging whether the communication of the robot operating system is normal or not, and if the communication of the robot operating system is normal, executing the step of collecting the response message through the information management node.
7. The method of claim 1, wherein the saving the node topology information comprises:
and storing the node topology information through a hash table structure or data cache middleware.
8. A node query apparatus of a robot operating system, the apparatus comprising:
the information management node initialization unit is used for creating an information management node in a robot operating system of a current host, and broadcasting the information of the information management node in a local area network where the robot operating system is located so that other nodes in the local area network can find the information management node;
a response message collection unit, configured to collect, by the information management node, a response message that is sent by another node after the information management node is discovered;
a node topology information caching unit, configured to generate node topology information by using the response message through the information management node, and store the node topology information;
and the query unit is used for receiving a query request through the information management node and feeding back the node topology information in response to the query request.
9. A node rapid query device of a robot operating system, comprising:
a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to thereby perform the method of any one of claims 1-7.
CN202210898078.4A 2022-07-28 2022-07-28 Node query method, device and equipment of robot operating system Active CN115333946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210898078.4A CN115333946B (en) 2022-07-28 2022-07-28 Node query method, device and equipment of robot operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210898078.4A CN115333946B (en) 2022-07-28 2022-07-28 Node query method, device and equipment of robot operating system

Publications (2)

Publication Number Publication Date
CN115333946A true CN115333946A (en) 2022-11-11
CN115333946B CN115333946B (en) 2024-03-08

Family

ID=83919385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210898078.4A Active CN115333946B (en) 2022-07-28 2022-07-28 Node query method, device and equipment of robot operating system

Country Status (1)

Country Link
CN (1) CN115333946B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145950A (en) * 2007-04-25 2008-03-19 中兴通讯股份有限公司 A topology management method based on multi-service transmission node
CN101155084A (en) * 2006-09-28 2008-04-02 华为技术有限公司 Method and system for acquiring network topological information
US20130103739A1 (en) * 2011-10-21 2013-04-25 Cisco Technology, Inc. Obtaining Dynamic Connected-Network Topology Via any Node in Network
CN103369384A (en) * 2012-03-28 2013-10-23 深圳市快播科技有限公司 Television system and data communication method thereof
CN103428030A (en) * 2013-08-01 2013-12-04 杭州华三通信技术有限公司 Topology establishing method and node for full connected network
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network
CN106162802A (en) * 2016-07-29 2016-11-23 国网山西省电力公司检修分公司 A kind of method and device of radio sensing network Topology Discovery
CN106254254A (en) * 2016-09-19 2016-12-21 复旦大学 A kind of network-on-chip communication means based on Mesh topological structure
WO2018192223A1 (en) * 2017-04-20 2018-10-25 Sino-Telecom Technology Co., Inc Method and device for automatically discovering cross-node service topology on transoceanic multiplex section shared protection ring
CN108738110A (en) * 2017-04-19 2018-11-02 珠海市魅族科技有限公司 Communication means, communication device and the communication equipment of WLAN
US10581627B1 (en) * 2016-02-02 2020-03-03 Marvell International Ltd. Broadcast and multicast in a wireless communication system in a wireless communication network
CN110971647A (en) * 2018-09-30 2020-04-07 南京工程学院 Node migration method of big data system
US20200336387A1 (en) * 2019-04-22 2020-10-22 Hitachi, Ltd. Topological map presentation system, topological map presentation method, and computer readable recording medium
CN112335271A (en) * 2018-06-29 2021-02-05 甲骨文国际公司 Method, system, and computer readable medium for network node authentication
WO2022116920A1 (en) * 2020-12-02 2022-06-09 中兴通讯股份有限公司 Topology management method and device thereof, network element management node and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155084A (en) * 2006-09-28 2008-04-02 华为技术有限公司 Method and system for acquiring network topological information
CN101145950A (en) * 2007-04-25 2008-03-19 中兴通讯股份有限公司 A topology management method based on multi-service transmission node
CN103765835A (en) * 2011-08-30 2014-04-30 高通股份有限公司 Topology discovery in a hybrid network
US20130103739A1 (en) * 2011-10-21 2013-04-25 Cisco Technology, Inc. Obtaining Dynamic Connected-Network Topology Via any Node in Network
CN103369384A (en) * 2012-03-28 2013-10-23 深圳市快播科技有限公司 Television system and data communication method thereof
CN103428030A (en) * 2013-08-01 2013-12-04 杭州华三通信技术有限公司 Topology establishing method and node for full connected network
US10581627B1 (en) * 2016-02-02 2020-03-03 Marvell International Ltd. Broadcast and multicast in a wireless communication system in a wireless communication network
CN106162802A (en) * 2016-07-29 2016-11-23 国网山西省电力公司检修分公司 A kind of method and device of radio sensing network Topology Discovery
CN106254254A (en) * 2016-09-19 2016-12-21 复旦大学 A kind of network-on-chip communication means based on Mesh topological structure
CN108738110A (en) * 2017-04-19 2018-11-02 珠海市魅族科技有限公司 Communication means, communication device and the communication equipment of WLAN
WO2018192223A1 (en) * 2017-04-20 2018-10-25 Sino-Telecom Technology Co., Inc Method and device for automatically discovering cross-node service topology on transoceanic multiplex section shared protection ring
CN112335271A (en) * 2018-06-29 2021-02-05 甲骨文国际公司 Method, system, and computer readable medium for network node authentication
CN110971647A (en) * 2018-09-30 2020-04-07 南京工程学院 Node migration method of big data system
US20200336387A1 (en) * 2019-04-22 2020-10-22 Hitachi, Ltd. Topological map presentation system, topological map presentation method, and computer readable recording medium
WO2022116920A1 (en) * 2020-12-02 2022-06-09 中兴通讯股份有限公司 Topology management method and device thereof, network element management node and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
熊焰, 易军, 华蓓, 苗付友: "移动分布式网络拓扑信息管理", 计算机工程, no. 22, 20 November 2003 (2003-11-20), pages 32 - 34 *

Also Published As

Publication number Publication date
CN115333946B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
CN106657287B (en) Data access method and system
CN109274730B (en) Internet of things system, MQTT message transmission optimization method and device
US8239479B2 (en) Server-assisted and peer-to-peer synchronization
US20150237113A1 (en) Method and system for file transmission
RU2483455C2 (en) Methods and apparatus for detecting peer-to-peer overlay networks
US10069942B2 (en) Method and apparatus for changing configurations
WO2019153488A1 (en) Service configuration management method, apparatus, storage medium and server
CN109960634B (en) Application program monitoring method, device and system
CN113949707A (en) OpenResty and K8S-based container cloud service discovery and load balancing method
WO2017161757A1 (en) Method and system for distributing streaming media file
US20170041181A1 (en) Event Processing in a Network Management System
CN113434249A (en) Mirror image synchronization method and device, docker host and storage medium
US9866437B2 (en) Methods and systems of managing an interconnection network
US10904094B2 (en) Extending a known topology of a network using data obtained from monitoring the network
US20210274020A1 (en) Communication method, client device, and server device
CN107872538B (en) Service processing method, reverse proxy and service server for decoupling TCP long connection
CN110958150B (en) Management method and device for dynamic service configuration
JP2020527881A (en) Message transmission method and device
CN115333946B (en) Node query method, device and equipment of robot operating system
CN112019650A (en) IP address recommendation method and device and server
CN111736944A (en) Docker container positioning method and device based on Kubernetes
WO2016164061A1 (en) Big data transfer
US11323494B1 (en) Systems and methods for self-organizing multicast
CN109542981B (en) Data synchronization system and method, electronic device and storage medium
CN111726658A (en) Multimedia data transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant