rosbag play missing messages [closed]
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?
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.
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.
You should try running a roscore, then your nodes, and then rosbag, all separately.
Can you provide instructions and a bag file to recreate your problem?
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!