ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question

Revision history [back]

The six nodes send out one message each when they are done with initialization?

Then my first guess would be that there's some timing issue. Possibilities are e.g.

  • The supervision node starts listening only after the first messages are already sent
  • The three nodes publish immediately after advertising their publisher, before the supervisor is completely subscribed

First attempt at a solution: in the six nodes, include a delay of one or two seconds between creation of the publisher and publishing the first message. Start the supervision node first, then the other nodes. If this works, you found your culprit.

Also, you could enable latching:

When a connection is latched, the last message published is saved and automatically sent to any future subscribers that connect. This is useful for slow-changing to static data like a map. Note that if there are multiple publishers on the same topic, instantiated in the same node, then only the last published message from that node will be sent, as opposed to the last published message from each publisher on that single topic.


If both do not work, check if the subscriber and the publishers use the exact same message type. Differences (e.g. publishing std_msgs::Pose, subscribing to std_msgs::PoseStamped) might lead to not receiving anything.

The six nodes send out one message each when they are done with initialization?

Then my first guess would be that there's some timing issue. Possibilities are e.g.

  • The supervision node "supervision node" starts listening only after the first messages are already sent
  • The three nodes publish immediately after advertising their publisher, before the supervisor "supervision node" is completely subscribed

First attempt at a solution: in the six nodes, include a delay of one or two seconds between creation of the publisher and publishing the first message. Start the supervision node first, then the other nodes. If this works, you found your culprit.

Also, you could enable latching:

When a connection is latched, the last message published is saved and automatically sent to any future subscribers that connect. This is useful for slow-changing to static data like a map. Note that if there are multiple publishers on the same topic, instantiated in the same node, then only the last published message from that node will be sent, as opposed to the last published message from each publisher on that single topic.


If both do not work, check if the subscriber and the publishers use the exact same message type. Differences (e.g. publishing std_msgs::Pose, subscribing to std_msgs::PoseStamped) might lead to not receiving anything.