8000 Record a maximum number of splits and then begin deleting old files by contradict · Pull Request #866 · ros/ros_comm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record a maximum number of splits and then begin deleting old files #866

Merged
merged 3 commits into from
Aug 15, 2016

Conversation

contradict
Copy link
Contributor

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.

@@ -62,6 +62,7 @@ rosbag::RecorderOptions parseOptions(int argc, char** argv) {
("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.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dirk-thomas
Copy link
Member

This is a nice feature. The patch looks fine - I only commented inline on some minor things.

@dirk-thomas
Copy link
Member
dirk-thomas commented Aug 15, 2016

Thank you for the patch and iterating on it.

Please consider updating the wiki page to mention the new command line option (with <<Version(ROS Kinetic)>> to indicate that the new option has been added in Kinetic). Please post a link to the diff here for easier discoverability.

@dirk-thomas dirk-thomas merged commit 7e84844 into ros:kinetic-devel Aug 15, 2016
@dirk-thomas
Copy link
Member

For the record: http://wiki.ros.org/action/diff/rosbag/Commandline?action=diff&rev1=30&rev2=31 Thanks for updating the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0