Add is_recording and get_uri services to the recorder#2440
Open
shalev-balas wants to merge 1 commit into
Open
Conversation
Add two new state query services to the recorder: - ~/is_recording: returns whether the recorder is currently in a recording session, reading the existing in_recording_ atomic boolean. - ~/get_uri: returns the current recording URI/path, or empty string if not recording, reading storage_options_.uri under the state transition mutex. Both follow the same pattern as ~/is_paused and ~/is_discovery_running. Resolves ros2#2439 Signed-off-by: Shalev Balasiano <shalevb@menteebot.com>
Author
|
We'd appreciate this being backported to Jazzy as well. The .srv and CMakeLists.txt changes should apply cleanly. The recorder.cpp changes may need manual adaptation due to divergence between rolling and jazzy, but the pattern is the same — happy to submit a separate Jazzy PR if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add two new state query services to the recorder:
~/is_recording: returns whether the recorder is currently in a recording session, reading the existingin_recording_atomic boolean.~/get_uri: returns the current recording URI/path, or empty string if not recording, readingstorage_options_.uriunder the state transition mutex.Both follow the same pattern as
~/is_pausedand~/is_discovery_running.Fixes #2439
Is this user-facing behavior change?
Yes. Two new services are available on the recorder node:
~/is_recordingand~/get_uri. No existing behavior is changed.Did you use Generative AI?
Yes — Claude (Anthropic, Opus 4.6) was used to assist with the implementation. All code was reviewed and validated manually.
Additional Information
This is a non-breaking addition — safe to backport. Integration tests added in
test_record_services.cpp.