Skip to content

Add is_recording and get_uri services to the recorder#2440

Open
shalev-balas wants to merge 1 commit into
ros2:rollingfrom
shalev-balas:feature/add-is-recording-and-get-uri-services
Open

Add is_recording and get_uri services to the recorder#2440
shalev-balas wants to merge 1 commit into
ros2:rollingfrom
shalev-balas:feature/add-is-recording-and-get-uri-services

Conversation

@shalev-balas
Copy link
Copy Markdown

Description

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.

Fixes #2439

Is this user-facing behavior change?

Yes. Two new services are available on the recorder node: ~/is_recording and ~/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.

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>
@shalev-balas
Copy link
Copy Markdown
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.

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.

Add is_recording and get_uri services to the recorder

1 participant