Skip to content

"get_subscribed_topics" and "subscribe_to_topics" services in "rosbag2_transport::Recorder" #2373

@MichaelOrlov

Description

@MichaelOrlov

Description

To have the ability to manage recorder instances remotely, it would be good to have "get_subscribed_topics" and "subscribe_to_topics" services in "rosbag2_transport::Recorder"

Related Issues

** Is this feature dependent on any other features? Is it part of a larger project? Note here. **

Completion Criteria

  1. The user can request subscribed topics from rosbag2_transport::Recorder using the get_subscribed_topics service request.
  2. The user can request rosbag2_transport::Recorder to subscribe to the given topic using the subscribe_to_topics service request.

Implementation Notes / Suggestions

  • Expose rosbag2_transport::Recorder subscribe_to_topics API as services. Consider providing pair <topic_name, topic_type> in the service request list to have the ability uniquely identify topics. Also likely will need to expand topic's names to a fully qualified names. Return a list of successfully subscribed topics and a separate list of the unavailable_topics as well as return code and error_string. The return code should return 0 on success and some error code in case of an error. Please note that if there are no topics discovered and none of the topics got subscribed, this is still a successful call. We put all missed topics into the unavailable_topics list in response. However, if some topic has an invalid name or we failed to add the topic to the subscription for any other reasons, - this is a failure situation, and the client needs to be aware that something is wrong with the request via the return_code. Also need to put information into the error_string about failure.
  • Add a new get_subscribed_topics service request, which will return a list of topics from the list of created subscriptions. Perhaps will need to protect the inner list of subscriptions with the mutex

Testing Notes / Suggestions

Need to add test coverage
** All features in this project need tests. Please give some input on cases that will need to be tested - and how the testing might be implemented. **

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions