Record a maximum number of splits and then begin deleting old files#866
Record a maximum number of splits and then begin deleting old files#866dirk-thomas merged 3 commits intoros:kinetic-develfrom
Conversation
tools/rosbag/src/record.cpp
Outdated
| ("bz2,j", "use BZ2 compression") | ||
| ("lz4", "use LZ4 compression") | ||
| ("split", po::value<int>()->implicit_value(0), "Split the bag file and continue recording when maximum size or maximum duration reached.") | ||
| ("max-splits", po::value<int>()->default_value(0), "Split the bag file at most splits times, then begin erasing the oldest split to keep a constant number of files.") |
There was a problem hiding this comment.
Since the new options isn't doing the actual splitting but limits the number of log files I would suggest a help text like this:
Keep a maximum of N bag files, when reaching the maximum erase the oldest one to keep a constant number of files.
The same / similar for the Python help string.
|
This is a nice feature. The patch looks fine - I only commented inline on some minor things. |
527cc30 to
b38e80a
Compare
|
Thank you for the patch and iterating on it. Please consider updating the wiki page to mention the new command line option (with |
|
For the record: http://wiki.ros.org/action/diff/rosbag/Commandline?action=diff&rev1=30&rev2=31 Thanks for updating the page. |
This patch allows creating a fixed size recording of the most recent data. It add a --max-splits option to rosbag record. When --split is used, after max-splits files have been created, the oldest one is deleted so a fixed size (or fix duration if --duration is used) recording can be made.