Earlier this year I had to prepare a ROS2 course for undergraduate students as part of my work, where I had to debug a series of robots over different exercises where topics often changed, which made rosbag2 debugging rather tedious to set up each time.
For this reason, I am currently developing dynrec (short for rosbag2 Dynamic Recorder): a package designed to allow users to dynamically select which topics to record during a rosbag2 run. This means that you could now freely add and remove topics during recording, alternate between topic sets, or pause and resume, all without having to stop the recording process.
Feedback is greatly appreciated, as it helps me improve the project, especially on the early stages.
This is a great idea! Are there any caveats regarding the resulting bag file in terms of playback, indexing, etc. or can it be used just like any other, continuous bag with most ROS tools?
Great question and thank you very much for your comment! So far, the resulting file is identical to the rosbag2 bags in terms of format and tool compatibility (they can be replayed via the standard ros2 bag play or checked via ros2 bag info, although the package offers its own info command).
On the other hand, there are some particularities on the dynamically recorded bags:
There are event topics which signal at which point a topic was added, removed or recording was paused and resumed. These are there so that you can tell whether missing topics are a result of the dynamic recorder’s instructions or due to external factors.
The bags don’t have all the features from the original rosbag2 packages at the moment. Features like compression are missing, but will be added soon.