rosbag play not triggering callback [closed]

asked 2012-10-11 15:23:23 -0500

benkehoe gravatar image

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?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-03-05 05:10:23


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

Lorenz gravatar image Lorenz  ( 2012-10-12 04:41:58 -0500 )edit

Are you using sim time on playback?

tfoote gravatar image tfoote  ( 2013-03-05 05:10:08 -0500 )edit