ros2
data_error
ai_generated
true
rosbag2存储:无法打开包:存储插件'sqlite3'不支持压缩格式'zstd'
rosbag2_storage: Failed to open bag: unsupported compression format 'zstd' for storage plugin 'sqlite3'
ID: ros2/rosbag2-compression-format-mismatch
90%修复率
85%置信度
1证据数
2024-03-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| ros2-humble | active | — | — | — |
| ros2-iron | active | — | — | — |
| ros2-rolling | active | — | — | — |
根因分析
rosbag2的sqlite3存储插件不支持zstd压缩;默认只支持lz4,且未安装zstd的自定义插件。
English
The rosbag2 sqlite3 storage plugin does not support zstd compression; only lz4 is supported by default, and custom plugins for zstd are not installed.
官方文档
https://docs.ros.org/en/rolling/Tutorials/Advanced/Recording-A-Bag-With-Compression.html解决方案
-
安装rosbag2_compression_zstd插件:sudo apt install ros-humble-rosbag2-compression-zstd
-
将包转换为lz4压缩:ros2 bag compress --input /path/to/bag --output /path/to/output --compression-queue-size 1 --compression-mode file --compression-format lz4
无效尝试
常见但无效的做法:
-
80% 失败
Default sqlite3 plugin code doesn't support zstd; requires a separate plugin package.
-
90% 失败
Environment variable alone doesn't install the required plugin; the plugin must be built and loaded.