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

Rosbag: Recording configurations or regenerate later?

asked 2012-02-28 05:20:10 -0500

Chad Rockey gravatar image

updated 2012-02-28 05:23:43 -0500

I've been wondering what's the ideal way to deal with changing configurations that get published over the wire. This can get very complex, but I'm hoping someone has experience with this (I'm sure the PR2 does).

There are a few options I can immediately think of:

  • Record everything you can

This means that you record tf, camera_info, and similar topics. This solves the problem of having to regenerate configurations when you move the bag files off robot to a desktop. It does cause problems if you want to reorganize the tf tree or do a better technique to calibrate the camera. You'd have to use the rosbag API and edit all of the messages.

  • Record as little as possible and regenerate everything from that set of data

This means that you basically record only the raw camera images, raw sensor data, controls, etc. Things like camera_info would need to be republished, static transforms would need to be launched, dynamic tf would need to be republished from topics such as Odometry. The advantages here are that yours bags are simple and only have the minimal data. The disadvantage is that if you have multiple robots or your robot's calibration drifts over time, it can be very complicated to know what configurations to use when playing back later on a development machine.

  • Something else in between

Some ideas I've considered include logging certain information to multiple bag files. Such as images, laser, etc into an essential bag file and camera_info, tf into a runtime bag file.

You could also record a dump of the parameter server into a yaml file and keep that around for later use.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-02-28 05:33:08 -0500

joq gravatar image

updated 2012-02-28 10:38:20 -0500

We find recording various topics to multiple bags very useful and convenient.

They are written with different prefixes and identical time stamps, making it easy to copy or play back all or some. Big data collections from devices like cameras and Velodyne can be skipped, except when needed. Rviz markers are separate. All the basic topics are collected in other_*.

joq@vision-4:bags$ ls -lh
total 848M
-rw-r--r-- 1 joq joq 178M 2012-02-16 11:24 camera_2012-02-15-15-06-05.bag
-rw-r--r-- 1 joq joq 167M 2012-02-16 11:25 camera_2012-02-15-15-07-20.bag
-rw-r--r-- 1 joq joq 102M 2012-02-16 11:25 camera_2012-02-15-15-09-19.bag
-rw-r--r-- 1 joq joq 8.7M 2012-02-16 11:25 other_2012-02-15-15-06-05.bag
-rw-r--r-- 1 joq joq 8.3M 2012-02-16 11:25 other_2012-02-15-15-07-20.bag
-rw-r--r-- 1 joq joq 8.0M 2012-02-16 11:25 other_2012-02-15-15-09-19.bag
-rw-r--r-- 1 joq joq  13M 2012-02-16 11:25 rviz_2012-02-15-15-06-05.bag
-rw-r--r-- 1 joq joq  12M 2012-02-16 11:25 rviz_2012-02-15-15-07-20.bag
-rw-r--r-- 1 joq joq  12M 2012-02-16 11:25 rviz_2012-02-15-15-09-19.bag
-rw-r--r-- 1 joq joq 4.1K 2012-02-16 11:25 sicks_2012-02-15-15-06-05.bag
-rw-r--r-- 1 joq joq 4.1K 2012-02-16 11:25 sicks_2012-02-15-15-07-20.bag
-rw-r--r-- 1 joq joq 4.1K 2012-02-16 11:25 sicks_2012-02-15-15-09-19.bag
-rw-r--r-- 1 joq joq 145M 2012-02-16 11:25 velodyne_2012-02-15-15-06-05.bag
-rw-r--r-- 1 joq joq 103M 2012-02-16 11:25 velodyne_2012-02-15-15-07-20.bag
-rw-r--r-- 1 joq joq  94M 2012-02-16 11:25 velodyne_2012-02-15-15-09-19.bag

We always record the /tf topic (in other_*).

Unfortunately, there is no distinction between static and dynamic transforms. You generally need odometry transforms, etc., and the static transforms will be mixed in. But, that can be an advantage too, if they occasionally get modified (ours do).

We find it worthwhile to record the camera_info topics. They do not take up much space, and are needed for viewing with rviz. If a camera gets moved around, the calibration data need to move with it.

edit flag offensive delete link more

Question Tools


Asked: 2012-02-28 05:20:10 -0500

Seen: 673 times

Last updated: Feb 28 '12