-
Notifications
You must be signed in to change notification settings - Fork 287
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description
This feature introduces parameters to ros2 bag record to control recording file size or duration limits, enabling both circular logging.
--max-record-size: Sets a maximum total size (in bytes) for all bag files. When this limit is exceeded, the oldest file(s) are deleted to maintain the limit. This enables continuous, size-bounded circular logging.--max-record-duration: Sets a maximum total duration (in seconds) spanning all bag files. When this limit is exceeded, the oldest file(s) are deleted. This enables continuous, time-bounded circular logging.- [optional]
--max-splits: Stops the recording session automatically after a specified number of split files have been created. This is a stopping condition, not a circular logging mechanism.
Related Issues
- Fulfills common requests for circular/continuous logging (for size and duration).
- Limit max splits (the same as
--max-splitsof rosbag in ROS1) #865 - Always-on (or "session-free") recording #1915
Completion Criteria
ros2 bag recordaccepts--max-record-size <SIZE_BYTES>. When total size is exceeded, the oldest files are deleted, and recording continues.ros2 bag recordaccepts--max-record-duration <DURATION_SEC>. When total duration is exceeded, the oldest files are deleted, and recording continues.- All new options are documented.
Implementation Notes / Suggestions
- Logic for monitoring total size, duration, and split file count should be implemented within the
SequentialWriterclass. - The
SequentialWritermust include a mechanism to identify and delete the oldest split files when--max-record-sizeor--max-record-durationlimits are breached. - To limit checking and simplify implementation, checking of size and duration only happens when splitting files.
Testing Notes / Suggestions
--max-record-sizeTest: Record with a small size limit and file splitting. Verify that total size remains bounded and old files are deleted.--max-record-durationTest: Record with a short duration limit and file splitting. Verify that total duration remains bounded and old files are deleted.--max-splitsTest: Record with splitting and--max-splits 5. Verify recording stops after exactly 5 files.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request