ros-tooling / rosbag2_storage_mcap

rosbag2 storage implementation for MCAP file format
https://mcap.dev/
Apache License 2.0
32 stars 5 forks source link

Support storage-config-file Writer configuration #48

Closed emersonknapp closed 2 years ago

emersonknapp commented 2 years ago

Closes #35

Add YAML deserialization to mcap::McapWriterOptions, so that ros2 bag record --storage-config-file argument can pass arbitrary configuration to the mcap writer. Most critically, this exposes chunk compression to the user.

$ cat writeropts.yml 
compression: "Zstd"
compressionLevel: "Fast"

$ ros2 bag record -s mcap -o mcap_compressed --all --storage-config-file writeropts.yml

$ mcap info mcap_compressed/mcap_compressed_0.mcap 
library: libmcap 0.1.2
profile: ros2
messages: 31
duration: 4.56099422s
start: 2022-08-23T18:19:46.308164974-07:00 (1661303986.308164974)
end: 2022-08-23T18:19:50.869159194-07:00 (1661303990.869159194)
compression:
        zstd: [1/1 chunks] (63.75%) 
channels:
        (1) /rosout   7 msgs (1.53 Hz)   : rcl_interfaces/msg/Log [ros2msg]  
        (2) /chat    24 msgs (5.26 Hz)   : std_msgs/msg/String [ros2msg]     
attachments: 0
emersonknapp commented 2 years ago

@james-rms thanks for the comments - let me know what you think of the new README table. As a user it is definitely better this way, my main concern coming in was in maintenance, keeping it from rotting.