ros2
resource_error
ai_generated
true
[rosbag2_storage] 无法打开包:存储插件'sqlite3'不支持的压缩格式'lz4'
[rosbag2_storage] Failed to open bag: unsupported compression format 'lz4' for storage plugin 'sqlite3'
ID: ros2/rosbag2-compression-unsupported-format
80%修复率
83%置信度
1证据数
2024-07-12首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Humble | active | — | — | — |
| Iron | active | — | — | — |
| Rolling | active | — | — | — |
根因分析
rosbag2存储插件(如sqlite3)不支持指定的压缩格式(如lz4、zstd)。支持的格式取决于插件版本和构建选项。
English
The rosbag2 storage plugin (e.g., sqlite3) does not support the specified compression format (e.g., lz4, zstd). Supported formats depend on the plugin version and build options.
官方文档
https://github.com/ros2/rosbag2?tab=readme-ov-file#compression解决方案
-
Check supported compression formats: ros2 bag info /path/to/bag. If unsupported, re-record the bag without compression: ros2 bag record -o my_bag --no-compression /topic1 /topic2. Then play back: ros2 bag play my_bag
-
If you need compression, use a supported format like 'zstd'. Record with: ros2 bag record -o my_bag --compression-mode file --compression-format zstd /topic1. Ensure zstd is installed: sudo apt-get install libzstd-dev
-
For custom builds, rebuild rosbag2 with the desired compression plugin: colcon build --packages-select rosbag2_compression --cmake-args -DCOMPRESSION_LZ4=ON. Then restart recording.
无效尝试
常见但无效的做法:
-
90% 失败
The system library is not enough; rosbag2 must be built with lz4 support enabled at compile time. Simply having the library doesn't enable the plugin.
-
85% 失败
Changing the environment variable only affects recording, not playback. If the bag was recorded with lz4, playback will still fail if lz4 is unsupported.