Rosbag: Recording configurations or regenerate later?
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.