Robotics StackExchange | Archived questions

rosbag play not triggering callback

I have a script that listens on a topic, collects the messages and puts them into a different message type (like putting a bunch of Poses into a PoseArray), then writes it to a bag on a specific topic. When I play back the bag file, the callback for that topic in the node listening to it never gets called. However, using rostopic echo, I can verify that the information is being published.

Here's where it gets confusing:

If I do rostopic pub /topic MessageType '{header: auto}', the callback is triggered.

If I do rostopic echo -n 1 /topic > tmp.txt && rostopic pub /topic MessageType -f tmp.txt, the callback is triggered.

I don't see any errors occurring anywhere, and the code has been compiled with the same message version. What could be causing this?

Asked by benkehoe on 2012-10-11 15:23:23 UTC

Comments

Are you publishing just one message or many when the callback is not getting triggered?

Asked by Lorenz on 2012-10-12 04:41:58 UTC

Are you using sim time on playback?

Asked by tfoote on 2013-03-05 06:10:08 UTC

Answers