-
Notifications
You must be signed in to change notification settings - Fork 288
Description
Description
We need to have the ability to save data directly from the node without publishing it on the topics, while maintaining the same behaviour of the instantiated recorder as other standalone recorder instances.
The real-world usage would be saving raw data from the driver node to avoid extra CPU burden with unnecessary data copies and serialization/deserialization effort. At the same time, it would be very useful if this directly operated recorder would have the same behavior as other recorders that save data from subscriptions regarding the existing rosbag2_interfaces. Meant to be managed remotely via service calls and provide statistics and notifications about events, like other recorders.
It will be very useful for the distributed recording and for the cases with AI/ML and camera/LIDAR where need to be very efficient and avoid extra data copies as much as possible.
Note: The current rosbag2_cpp package provides direct API calls for creating a new topic and saving serialized data. However, we need a direct API to the rosbag2_transport layer since a lot of functionality is already there, and we want to have unified behavior and avoid code duplication as much as possible.
Related Issues
N/A
Completion Criteria
-
- Rosbag2 recorder has a direct API to be able to create a new topic "channel".
-
- Rosbag2 recorder has a direct API to be able to write a serialized message.
-
- Rosbag2 recorder support option to not subscribe to any topics, but rather use the direct API.
-
- Rosbag2 recorder has an option to avoid conversion to the CDR serialization format if the topic has a different serialization format.
Implementation Notes / Suggestions
In essence, the rosbag2_transport::Recorder class shall be extended to support direct API calls to be able to create a new channel "topic" and call record_message(serialized_message) directly without subscribing to any topics.
Testing Notes / Suggestions
The newly added API shall be covered by the unit tests.