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

Revision history [back]

click to hide/show revision 1
initial version

When a new publisher becomes active:

  1. It informs the ROS master.
  2. The ROS master sends a callback to all of the nodes that are subscribed to that topic, informing them that there is a new publisher, and giving its address.
  3. The subscribers then use this address to open a new connection directly to the publisher so that they can receive messages.
  4. messages are then passed over this TCP socket from publisher to subscriber

All of the steps in this process take a nonzero amount of time. The end result is usually that the first one or two messages sent by the publisher are not seen by subscribers.

This process can also fail if the master cannot contact the subscriber for some reason (for example, it can't resolve the hostname that the subscriber is running on), or if the subscriber cannot contact the publisher for some reason (again, hostname resolution is often the problem here).