Ask Your Question

Revision history [back]

Setting up subscriptions takes time.

Make both of them wait until there is at least one subscriber to their topic.

Use Publisher::getNumSubscribers() for that.

Setting up subscriptions takes time.

Make both of them wait until there is at least one subscriber to their topic.

Use Publisher::getNumSubscribers() for that.

Some related questions:

  • #q11167: How do I publish exactly one message?
  • #q32952: With rospy, messages don't seem to be recieved if published soon after creating the publisher
  • #q82536: ROS misses some messages