Robotics StackExchange | Archived questions

rosbag play missing messages

Hi. I have a rosbag which I can verify has the correct number of messages in it from 4 runs of my system. The rosbag info is:

rosbag info messages_2013-07-24-14-29-11.bag 
path:        messages_2013-07-24-14-29-11.bag
version:     2.0
duration:    2:56s (176s)
start:       Jul 24 2013 14:29:23.19 (1374690563.19)
end:         Jul 24 2013 14:32:19.64 (1374690739.64)
size:        7.8 KB
messages:    20
compression: none [1/1 chunks]
types:       std_msgs/String [992ce8a1687cec8c8bd883ec73ca41d1]
topics:      /faceCommander/output     4 msgs    : std_msgs/String
             /gui/feedback_result      4 msgs    : std_msgs/String
             /retailCommander/output   4 msgs    : std_msgs/String
             /trigger/output           8 msgs    : std_msgs/String

When I run the system, all of these messages get sent exactly 1 time (and the system reproduces its original behavior for that one instance). After that, it seems that all of these messages do not play back. I don't see any evidence of them in my simulation.

Any idea what might be wrong?

Asked by denverdash on 2013-07-24 08:50:58 UTC

Comments

Actually, after more debugging: I echo the topics and they are being played, but all the parts of my system seem to stop being subscribed after they receive the first message. For example, I have a logger node that just listens for messages and outputs to a file--that node stops writing.

Asked by denverdash on 2013-07-24 09:23:02 UTC

I find it odd that they would get one message and then behave like they are unsubscribed. You should be careful about your roscore, if you are relying on a roslaunch to start the roscore for you it might be getting shutdown. If the roscore is shutdown new subscriptions will not be made.

Asked by William on 2013-07-24 21:01:34 UTC

You should try running a roscore, then your nodes, and then rosbag, all separately.

Asked by William on 2013-07-24 21:02:04 UTC

Can you provide instructions and a bag file to recreate your problem?

Asked by tfoote on 2013-08-18 22:33:06 UTC

Sure. I uploaded two bag files (which should be played together) here: http://denverdash.com/pub/example.tgz. Included there is a main program which implements a logger which should listen to each message and save a record of them to a file. See the readme for more details. Thanks!

Asked by denverdash on 2013-08-19 07:51:46 UTC

Answers