Ask Your Question

Revision history [back]

A bit of a guess, but setting up subscriptions takes time, even if you only have everything running on a single machine.

As @Archhaskeller hints at, rostopic might simply be 'too late' to receive all publications.

If receiving all messages is important, consider using an interaction pattern that is not so completely decoupled as pub-sub (ie: services or actions), or see if a latched topic helps.

Another option might be to wait with publishing until there is (are) at least one (or more) subscriber(s). You can do that with checking ros::Publisher::getNumSubscribers().