Skip to content

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