0
$\begingroup$

Rosanswers logo

Is it possible to run ROS in an offline mode in order to process every msg? For example, I just converted a .bag file with /camera/rgb/points to a sequence of .pcd files, but I had to run "rosbag play --pause " and then step through each frame by pressing 's' in order to catch every message, and get all 238 frames, instead of the ~20 frames it could do in realtime. So is there a general purpose offline processing mode that could do this automatically?


Originally posted by davidstolarsky on ROS Answers with karma: 13 on 2011-09-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You can use the rosbag API to get messages one at a time; if your code only grabs a new message every time it finishes with the previous one, you can't miss a frame.

A quicker, dirtier solution is to use the -r flag to rosbag to slow down the playback rate to something your code can handle.


Originally posted by Mac with karma: 4119 on 2011-09-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by davidstolarsky on 2011-09-25:
The frame saver here is pcl_ros pointcloud_to_pcd; not sure if I can plug that in with your rosbag API suggestion. -r should do for now. offline_ros would be cool; step bag input frames and wait for everything to drain. I don't know how compatible this is with the ROS API.

$\endgroup$

Your Answer

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