CN109525660B - Method and system for publishing, subscribing and registering ROS message - Google Patents

Method and system for publishing, subscribing and registering ROS message Download PDF

Info

Publication number
CN109525660B
CN109525660B CN201811350153.3A CN201811350153A CN109525660B CN 109525660 B CN109525660 B CN 109525660B CN 201811350153 A CN201811350153 A CN 201811350153A CN 109525660 B CN109525660 B CN 109525660B
Authority
CN
China
Prior art keywords
message
node
configuration file
registration
registration request
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.)
Active
Application number
CN201811350153.3A
Other languages
Chinese (zh)
Other versions
CN109525660A (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.)
Jiangsu Feitu Intelligent Control Technology Co ltd
Original Assignee
Jiangsu Feitu Intelligent Control 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 Jiangsu Feitu Intelligent Control Technology Co ltd filed Critical Jiangsu Feitu Intelligent Control Technology Co ltd
Priority to CN201811350153.3A priority Critical patent/CN109525660B/en
Publication of CN109525660A publication Critical patent/CN109525660A/en
Application granted granted Critical
Publication of CN109525660B publication Critical patent/CN109525660B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and a system for publishing, subscribing and registering ROS messages. When the ROS node sends out a message registration or subscription request, the method firstly refers to a first configuration file stored locally, if the first message configuration file contains the message registration or subscription request, the completion is directly returned, otherwise, the message registration or subscription request is sent to the node manager. When the node manager is initialized, the local proxy refers to the second configuration file stored locally, and sends a message registration or subscription request to the local node manager according to the message registration or subscription request contained in the second configuration file, so that the problem that the registration message or subscription message fails due to network problems when the system initializes the registration message or subscription message is avoided, and meanwhile, the network transmission overhead during message registration and subscription is reduced.

Description

Method and system for publishing, subscribing and registering ROS message
Technical Field
The invention relates to ROS message registration, publication and subscription.
Background
The ROS, a Robotic Operation System, is a software platform in the robot field, is a de facto standard in the current robot field, and has been widely applied to a plurality of robot systems. The ROS provides a publish-subscribe communications framework. In particular, the ROS system is composed of many nodes, one of which is a node manager. When one of the nodes needs to publish data to other nodes, the node first needs to request a node manager to register a message of a specific topic, and after the node manager receives the registration request, the node becomes a publisher of the topic message. When the node issues the message of the topic, the message of the topic is sent into the ROS message pool. When other nodes acquire the message of the corresponding topic, first, the other nodes need to request the node manager for subscribing the message of the topic. The nodes subscribing to the topic message can thus obtain the topic message from the ROS message pool. The publish-subscribe communication framework separates the data producer from the data consumer, brings great flexibility to users, and is widely applied.
With the wider application of the robot, the ROS is also expanding to a larger range, and many nodes adopting the ROS start to communicate with other nodes through wireless communication, such as an unmanned aerial vehicle networking scene. In the application of the networking scene of the unmanned aerial vehicles, each unmanned aerial vehicle is equivalent to one ROS node. Because the channel quality of wireless communication varies greatly along with the condition of transmission distance, interference and shielding between unmanned aerial vehicles, the communication quality is relatively poor, and the unmanned aerial vehicle node initiates message registration and subscription to fail easily. On the other hand, some messages of the drones, such as video data published by the drone carrying the camera, may be predicted to subscribe to other drones, and such messages that can be predicted to be acquired by other specific nodes are called as directed messages. The directed message is realized in a real-time manner without an online message registration subscription mode, and unnecessary transmission bandwidth is wasted.
Disclosure of Invention
The problems to be solved by the invention are as follows: under the condition of poor network communication quality, the message registration subscription is easy to fail, and the transmission bandwidth of the directed message registration subscription is reduced.
In order to solve the problems, the invention adopts the following scheme:
the method for releasing and subscribing registration of the ROS message comprises a node message releasing and registering agent step, a node message subscribing and registering agent step and a manager initializing agent step;
the node message issuing and registering agent step: when an ROS node sends out a message issuing registration request, a first configuration file stored locally is consulted firstly; if the first configuration file contains the message publishing and registering request, directly returning to complete the message publishing and registering, otherwise, sending the message publishing and registering request to the node manager;
the node message subscription registration agent step: when an ROS node sends out a message subscription registration request, a first configuration file stored locally is consulted firstly; if the first configuration file contains the message subscription registration request, directly returning to complete message subscription registration, otherwise, sending the message subscription registration request to a node manager;
the manager initializing agent step: when the node manager is initialized, a second configuration file stored locally is consulted, message publishing registration is initiated to the node manager according to a message publishing registration request contained in the second configuration file, and message subscribing registration is initiated to the node manager according to a message subscribing registration request contained in the second configuration file;
the second configuration file comprises the message publishing registration request and the message subscribing registration request in the first configuration file.
Further, according to the ROS message publishing and subscribing registration method of the present invention, the node message publishing registration agent step and the node message subscribing registration agent step are implemented by the node local agent module:
when the ROS node sends out a message publishing registration request, the message publishing registration request is sent to the node local proxy module; after receiving a message publishing and registering request sent by a local ROS node, the node local proxy module refers to a first configuration file stored locally, if the first configuration file contains the message publishing and registering request, the node local proxy module directly returns to the local ROS node to complete message publishing and registering, otherwise, the node local proxy module sends the message publishing and registering request to a node manager;
when the ROS node sends out a message subscription registration request, the message subscription registration request is sent to the node local proxy module; the node local proxy module refers to a first configuration file stored locally after receiving a message subscription registration request sent by a local ROS node, if the first configuration file contains the message subscription registration request, the node local proxy module directly returns to the local ROS node to complete message subscription registration, otherwise, the node local proxy module sends the message subscription registration request to a node manager.
Further, according to the ROS message publishing and subscription registration method of the present invention, the manager initialization proxy step is implemented by a manager local proxy module; during initialization, the manager local proxy module refers to a second configuration file stored locally, initiates message publishing registration to the node manager according to a message publishing registration request contained in the second configuration file, and initiates message subscribing registration to the node manager according to a message subscribing registration request contained in the second configuration file.
A system for ROS message registration according to the present invention, the system includes a node local agent module and a manager local agent module;
the node home agent module is to: after receiving a message issuing and registering request sent by a local ROS node, looking up a first configuration file stored locally, if the first configuration file contains the message issuing and registering request, directly returning to the local ROS node to finish message issuing and registering, otherwise, sending the message issuing and registering request to a node manager; after receiving a message subscription registration request sent by a local ROS node, looking up a first configuration file stored locally, if the first configuration file contains the message subscription registration request, directly returning to the local ROS node to complete message subscription registration, otherwise, sending the message subscription registration request to a node manager;
the manager local agent module is to: during initialization, initiating message publishing registration to the node manager according to the message publishing registration request contained in the second configuration file, and initiating message subscribing registration to the node manager according to the message subscribing registration request contained in the second configuration file;
the second configuration file comprises the message publishing registration request and the message subscribing registration request in the first configuration file.
The invention has the following technical effects: the invention writes the publisher and the subject of the oriented message, and the subscriber and the subject into the configuration file, and directly refers to the configuration file stored locally through the local agent when registering the message and subscribing the message, thereby reducing network transmission.
Drawings
Fig. 1 is a schematic view of the overall structure of the embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
The present embodiment is a system for ROS message publish and subscribe registration. The system is comprised of a node manager physical device and a non-manager node physical device. When the system is applied to the unmanned aerial vehicle networking system, the non-manager node physical equipment is usually an unmanned aerial vehicle, and the node manager physical equipment can be an unmanned aerial vehicle or a ground workstation. The node manager physical device and the non-manager node physical device install the ROS system. In the ROS system, the node manager physical device and the non-manager node physical device are configured with at least one ROS node, and one of the ROS nodes of the node manager physical device is configured as an ROS master, which is a node manager, and the other ROS nodes are controlled by the node manager: when other ROS nodes need to release a specific message, a message for registering a specific theme needs to be released to a node manager in advance; when other ROS nodes need to receive a specific message, the node manager needs to be subscribed to register a message of a specific topic in advance. For ease of illustration, the non-manager node physical devices in this embodiment are logically separated into message publisher physical devices and message subscriber physical devices, as shown in FIG. 1. The ROS node 11 on the message publisher physical device needs to publish a specific message, is the provider of the specific message, and acts as the message publisher. The ROS node 11 on the physical device of the message subscriber needs to receive a specific message, is the recipient of the specific message, and acts as a message subscriber. Those skilled in the art understand that the ROS node, which acts as a publisher of a message, and the ROS node, which acts as a subscriber of a message, may be two different ROS nodes on the same physical device, and may also be ROS nodes on two different physical devices. The system for ROS message publish and subscribe registration of this embodiment comprises, in addition to the ROS node 11 and node manager 21 described above, a node home agent module 12 on the non-manager node physical device and a manager home agent module 22 on the node manager physical device. The manager local agent module 22 interacts with and corresponds to the node manager 21. The node local agent module 12 interacts with the ROS node 11. The plurality of ROS nodes 11 on the non-manager node physical device correspond to one node home agent module 12.
The node local agent module 12 acts as a proxy for the node manager 21, and particularly, when the ROS node 11, which is in the role of a message issuer, initiates a message issuance registration request, the request is not issued directly to the node manager 21, but the message issuance registration request is first issued to the node local agent module 12. When receiving the message issuing and registering request, the node local proxy module 12 refers to the first configuration file 13, and if the first configuration file 13 contains the message issuing and registering request, directly returns message issuing and registering success information to the ROS node 11, and if the first configuration file 13 does not contain the message issuing and registering request, the node local proxy module 12 issues the message issuing and registering request to the node manager 21, and then returns a result returned by the message issuing and registering request returned by the node manager 21 to the ROS node 11. The first configuration file 13 contains message publication registration requests directed to message publishers. Specifically, when the ROS node 11, which is in the role of a message subscriber, initiates a message subscription registration request, the request is not directly issued to the node manager 21, but a message subscription registration request is first issued to the node home agent module 12. When receiving the message subscription registration request, the node home agent module 12 refers to the first configuration file 13, and if the first configuration file 13 contains the message subscription registration request, directly returns message subscription registration success information to the ROS node 11, and if the first configuration file 13 does not contain the message subscription registration request, the node home agent module 12 sends the message subscription registration request to the node manager 21, and then returns a result returned by the message subscription registration request returned by the node manager 21 to the ROS node 11. The first profile 13 contains a number of message subscription registration requests directed to message subscribers.
When the ROS system on the node manager physical device 2 is initialized, the manager local proxy module 22 refers to the second configuration file 23 stored locally, sends a message publishing registration request to the node manager 21 according to the message publishing registration request included in the second configuration file 23, and sends a message subscribing registration request to the node manager 21 according to the message subscribing registration request included in the second configuration file 23.
The first configuration file 13 and the second configuration file 23 are both manually edited configuration files. Obviously, the second profile 23 needs to contain the message subscription registration request contained in the message publishing registration request contained in the first profile 13. Specifically, the second profile 23 on the node manager physical device is at least a collection of the first profiles 13 on the other ROS node physical devices of the ROS system.
Obviously, the message publish registration request and the message subscribe registration request include at least a message topic. Those skilled in the art will appreciate that the message publish registration request and the message subscribe registration request contained in the first configuration file 13 may differ from the message publish registration request and the message subscribe registration request information contained in the second configuration file 23. For example, in the message publishing registration request and the message subscribing registration request included in the first configuration file 13, the address information of the publisher and the subscriber may be implicit in the message publishing registration request and the message subscribing registration request issued by the ROS node 11, and the message publishing registration request and the message subscribing registration request included in the first configuration file 13 only need to list the message subject. The message publish registration request and the message subscribe registration request in the second configuration file 23 need to have corresponding publisher and subscriber address information.

Claims (4)

1. A method for ROS message publishing and subscribing registration is characterized in that the method comprises a node message publishing and registering agent step, a node message subscribing and registering agent step and a manager initializing agent step;
the node message issuing and registering agent step: when an ROS node sends out a message issuing registration request, a first configuration file stored locally is consulted firstly; if the first configuration file contains the message publishing and registering request, directly returning to complete the message publishing and registering, otherwise, sending the message publishing and registering request to the node manager;
the node message subscription registration agent step: when an ROS node sends out a message subscription registration request, a first configuration file stored locally is consulted firstly; if the first configuration file contains the message subscription registration request, directly returning to complete message subscription registration, otherwise, sending the message subscription registration request to a node manager;
the manager initializing agent step: when the node manager is initialized, a second configuration file stored locally is consulted, message publishing registration is initiated to the node manager according to a message publishing registration request contained in the second configuration file, and message subscribing registration is initiated to the node manager according to a message subscribing registration request contained in the second configuration file;
the second configuration file comprises a message publishing registration request and a message subscribing registration request in the first configuration file;
the first configuration file and the second configuration file are both manually edited configuration files.
2. The method of ROS message publish and subscribe registration of claim 1, wherein said node message publish registration agent step and node message subscribe registration agent step are implemented by a node home agent module:
when the ROS node sends out a message publishing registration request, the message publishing registration request is sent to the node local proxy module; after receiving a message publishing and registering request sent by a local ROS node, the node local proxy module refers to a first configuration file stored locally, if the first configuration file contains the message publishing and registering request, the node local proxy module directly returns to the local ROS node to complete message publishing and registering, otherwise, the node local proxy module sends the message publishing and registering request to a node manager;
when the ROS node sends out a message subscription registration request, the message subscription registration request is sent to the node local proxy module; the node local proxy module refers to a first configuration file stored locally after receiving a message subscription registration request sent by a local ROS node, if the first configuration file contains the message subscription registration request, the node local proxy module directly returns to the local ROS node to complete message subscription registration, otherwise, the node local proxy module sends the message subscription registration request to a node manager.
3. The method of ROS message publish and subscribe registration of claim 1, wherein said manager initialization agent step is implemented by a manager local agent module; during initialization, the manager local proxy module refers to a second configuration file stored locally, initiates message publishing registration to the node manager according to a message publishing registration request contained in the second configuration file, and initiates message subscribing registration to the node manager according to a message subscribing registration request contained in the second configuration file.
4. A system for ROS message registration, the system comprising a node home agent module and a manager home agent module;
the node home agent module is to: after receiving a message issuing and registering request sent by a local ROS node, looking up a first configuration file stored locally, if the first configuration file contains the message issuing and registering request, directly returning to the local ROS node to finish message issuing and registering, otherwise, sending the message issuing and registering request to a node manager; after receiving a message subscription registration request sent by a local ROS node, looking up a first configuration file stored locally, if the first configuration file contains the message subscription registration request, directly returning to the local ROS node to complete message subscription registration, otherwise, sending the message subscription registration request to a node manager;
the manager local agent module is to: during initialization, initiating message publishing registration to the node manager according to the message publishing registration request contained in the second configuration file, and initiating message subscribing registration to the node manager according to the message subscribing registration request contained in the second configuration file;
the second configuration file comprises a message publishing registration request and a message subscribing registration request in the first configuration file;
the first configuration file and the second configuration file are both manually edited configuration files.
CN201811350153.3A 2018-11-14 2018-11-14 Method and system for publishing, subscribing and registering ROS message Active CN109525660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811350153.3A CN109525660B (en) 2018-11-14 2018-11-14 Method and system for publishing, subscribing and registering ROS message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811350153.3A CN109525660B (en) 2018-11-14 2018-11-14 Method and system for publishing, subscribing and registering ROS message

Publications (2)

Publication Number Publication Date
CN109525660A CN109525660A (en) 2019-03-26
CN109525660B true CN109525660B (en) 2021-08-03

Family

ID=65776475

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811350153.3A Active CN109525660B (en) 2018-11-14 2018-11-14 Method and system for publishing, subscribing and registering ROS message

Country Status (1)

Country Link
CN (1) CN109525660B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115473863B (en) * 2022-07-25 2023-08-08 山东新一代信息产业技术研究院有限公司 Message bridging method and system for ROS and IROS

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873465A (en) * 2014-03-04 2014-06-18 上海交通大学 Cache method suitable for publish-subscribe system in mobile environment
CN105933444A (en) * 2016-06-27 2016-09-07 焦点科技股份有限公司 Service discovering method based on cooperation of registration center and caching mechanism
CN107589752A (en) * 2017-07-25 2018-01-16 天津大学 Unmanned plane cooperates with formation realization method and system with ground robot

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10185311B2 (en) * 2015-10-08 2019-01-22 King Fahd University Of Petroleum And Minerals Methods and apparatus to design collaborative automation systems based on data distribution service middleware

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873465A (en) * 2014-03-04 2014-06-18 上海交通大学 Cache method suitable for publish-subscribe system in mobile environment
CN105933444A (en) * 2016-06-27 2016-09-07 焦点科技股份有限公司 Service discovering method based on cooperation of registration center and caching mechanism
CN107589752A (en) * 2017-07-25 2018-01-16 天津大学 Unmanned plane cooperates with formation realization method and system with ground robot

Also Published As

Publication number Publication date
CN109525660A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
KR101612819B1 (en) Method and apparatus for processing SOME/IP stream interworking AVB technology
US10834168B2 (en) Methods and systems for secured remote browsing from a transportation vehicle
CN108781385A (en) V2X information communication methods and device
CN110365643A (en) Communication method and device
US20120096136A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN109964467A (en) The control based on node type for auxiliary data flow transmission
CN102594886B (en) Method and device for direct communication between browsers, and communication system
CN113572864B (en) Data processing method, network element equipment and readable storage medium
CN109379209B (en) Method and device for upgrading storage service of video network
CN104539510A (en) Multi-protocol-based information pushing system and method
CN109525660B (en) Method and system for publishing, subscribing and registering ROS message
DE102017107863A1 (en) Method and apparatus for dynamic vehicle communication response
CA2397114A1 (en) Communications network
CN109474471B (en) RTPS (real time packet service) protocol acceleration method of DDS (direct digital synthesizer) network, node and system thereof
CN101656947B (en) Establishing method, device and system of cross-heterogeneous-network service sharing
CN109451023B (en) Method and system for releasing and registering ROS (reactive oxygen species) message
CN104038557B (en) Device software batch upgrading method in a kind of tree network structure of optical fiber connection
US20200152048A1 (en) Method and apparatus for controlling controllable device
CN110011891B (en) Cross-network service processing method and system
CN109525659B (en) Method and system for subscribing and registering ROS message
CN101047691B (en) Method for integral controlling subscribe
CN105577433B (en) A kind of ACS cluster management method, device and system
CN112953808B (en) VPN data transmission method, device and server
CN106413123B (en) Data transmission method and device
CN111200562B (en) Flow guiding method, static father node, edge node and CDN (content delivery network)

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
CB03 Change of inventor or designer information

Inventor after: Qian Liqiang

Inventor before: Qian Liqiang

Inventor before: Xiong Fei

Inventor before: Wang Hai

Inventor before: Guo Xiao

Inventor before: Li Aijing

Inventor before: Chen Juan

Inventor before: Rong Fengjuan

Inventor before: Xu Zhengqin

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant