ros2/rosbag2

Support Writing to ostreams

methylDragon opened this issue · 0 comments

Description

mcap::McapWriter supports writing to std::ostreams, so it would be good to extend that support to the writing of ROS Bags.

One can imagine streaming bag data to the cloud (e.g. opening an ostream that streams to an online location) in contexts with low disk space instead of writing to a file on disk.

The storage options don't suggest that this is possible, and the MCAP storage plugin doesn't look like it supports it either.

By right all that is needed is to have a conditional here in the storage plugin and pipe in the ostream accordingly.

However, I'm opening this as a feature request because I'm not sure how involved it would be to update the writer/storage interfaces and Python library to support this, or if there are other issues I am unaware of.

Completion Criteria

  • Refactor rosbag2_storage to support writing to ostreams
  • Refactor rosbag2_storage_mcap to support writing to ostreams
  • Refactor rosbag2_py to support writing to ostreams
  • Refactor rosbag2_cpp to support Writing to ostreams

Testing Notes / Suggestions

Previous unit tests should pass.