Message loss when using mcap compression in ROS 2 bag recording

asked 2023-05-17 05:33:32 -0500

Dragon_58 gravatar image

updated 2023-05-31 08:34:19 -0500

I am encountering an issue with message loss when using the mcap storage plugin to compress a ROS 2 bag file. Here are the details of my setup:

ROS 2 version: humble

Storage plugin: rosbag2_storage_mcap

Configuration file: mcap_writer.yml

noChunkCRC: false
noChunking: false
noMessageIndex: false
noSummary: false
chunkSize: 10485760
compression: "Zstd"
compressionLevel: "Slowest"
forceCompression: false

The problem arises when I record for a longer duration, and I notice the following warning message:

[WARN] [1684308501.581414217] [rosbag2_cpp]: Cache buffers lost messages per topic:
    /points_demo_topic: 4745
Total lost: 4745

I suspect that the issue might be related to the configuration options I'm using or the chunk size. However, I have already set the chunk size to 10,485,760 bytes, and compression is enabled with the Zstandard algorithm and the slowest compression level.

I have a few questions regarding this issue:

  • Are there any known limitations or considerations when using the mcap storage plugin with compression in ROS 2 bag recording?
  • Is there any additional configuration or parameter that I need to set to ensure message reliability when using compression?

  • How to compress as smaller as possible ?

I would greatly appreciate any insights, suggestions, or possible solutions to help me address this message loss issue.

edit retag flag offensive close merge delete