ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

offline / batch processing?

asked 2011-09-24 07:45:52 -0500

davidstolarsky gravatar image

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 <file>" 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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-09-24 15:58:32 -0500

Mac gravatar image

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.

edit flag offensive delete link more

Comments

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.
davidstolarsky gravatar image davidstolarsky  ( 2011-09-25 05:46:29 -0500 )edit
0

answered 2018-11-03 10:47:08 -0500

Matias gravatar image

Hi, maybe this is useful for you: https://github.com/lrse/batch_ros

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-09-24 07:45:52 -0500

Seen: 1,417 times

Last updated: Nov 03 '18