1
$\begingroup$
rosbag play bagfile.bag

ROS's bag player provides a nice tool to replay the data but it's kind of difficult for debugging as we can't control frame-by-frame play. I know it's possible to control replay speed by the -r option but is it possible to play it frame-by-frame? e.g in rqt_bag we can move frame by frame to see the value (although it can't publish the single frame).

How do you debug your program with ros bag file?

$\endgroup$

1 Answer 1

3
$\begingroup$

You can start your bag in a paused state using

rosbag play bagfile.bag --pause

And then you can step through your bag by pressing the s key. I believe each step is a message from the bag file.

$\endgroup$
1
  • 1
    $\begingroup$ Awesome:) It works well $\endgroup$ Commented Nov 25, 2022 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.