ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How does roscore register the subscriber and publisher when registering a node?

asked 2018-12-10 22:28:47 -0500

simphony gravatar image

In order for a node to run in ros, you need to register its information in roscore. The node then sends its information to the roscore and when it is registered it runs. When registering a node in this process, how does roscore register whether it is publisher or subscriber? Thank you :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-10 23:08:04 -0500

ahendrix gravatar image

This document describes the basics of how a ROS node registers itself with the ROS master:

In short, it makes one XMLRPC call (an API call, similar to REST) to the ROS master to inform it that it exists, and more XMLRPC calls to inform that ROS master that it has publishers and/or subscribers. A node can have one or more than one publisher, subscriber, or both publishers and subscribers!

edit flag offensive delete link more


Thank you for your feedback! I have seen this part before. When registering node information in roscore, it is known that it is divided into publisher and subscriber. I am wondering what criteria roscore have registered in roscore for subscribers and publishers!

simphony gravatar image simphony  ( 2018-12-10 23:19:14 -0500 )edit

There are no "criteria": the XMLRPC call for publishers and subscribers is different, similar to how you'd call a different function with different arguments.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-11 01:08:22 -0500 )edit

I'm not really sure what additional information you're asking for. This is the code that implements publisher and subscriber registration in the ROS master:

ahendrix gravatar image ahendrix  ( 2018-12-11 12:21:12 -0500 )edit

Question Tools


Asked: 2018-12-10 22:28:47 -0500

Seen: 782 times

Last updated: Dec 10 '18