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

Add options to conditionally stop the recording #1896

Draft
wants to merge 1 commit into
base: rolling
Choose a base branch
from

Conversation

nicolaloi
Copy link
Contributor

@nicolaloi nicolaloi commented Jan 13, 2025

Resolves #1857.

Add --max-recording-duration, --max-recording-size, --max-recording-messages CLI options to conditionally stop the recording when it reaches a specified duration, size, or number of messages. The conditions consider all the possible split bags.

A new event message is published when the recording stops.

This is a first working implementation trying to follow the split_bag processing and event generation in sequential_writer.

- publish event when recording stops

Signed-off-by: Nicola Loi <[email protected]>
@nicolaloi
Copy link
Contributor Author

nicolaloi commented Jan 13, 2025

Now the main computations of this PR are in sequential_writer, since it contains the data required to process the conditional stopping (eg current size, duration, message count). However I think the logic should be moved to recorder.cpp (before/after the writer_->write within the lambda functions), but given the hierarchy recorder.cpp -> writer.cpp -> sequential_writer.cpp, sharing the required data "up" to recorder.cpp requires to change the various intermediate interfaces.

@MichaelOrlov @fujitatomoya do you have suggestions or new ideas?

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

Successfully merging this pull request may close these issues.

Specify recording time for a ros2 bag
1 participant