{
  "id": "ros2/rosbag2-compression-unsupported-format",
  "signature": "[rosbag2_storage] Failed to open bag: unsupported compression format 'lz4' for storage plugin 'sqlite3'",
  "signature_zh": "[rosbag2_storage] 无法打开包：存储插件'sqlite3'不支持的压缩格式'lz4'",
  "regex": "unsupported compression format.*for storage plugin|Failed to open bag.*compression",
  "domain": "ros2",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "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.",
  "root_cause_type": "generic",
  "root_cause_zh": "rosbag2存储插件（如sqlite3）不支持指定的压缩格式（如lz4、zstd）。支持的格式取决于插件版本和构建选项。",
  "versions": [
    {
      "version": "Humble",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Iron",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Rolling",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "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.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing the environment variable only affects recording, not playback. If the bag was recorded with lz4, playback will still fail if lz4 is unsupported.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "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",
      "success_rate": 0.9,
      "how": "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",
      "condition": "",
      "sources": []
    },
    {
      "action": "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",
      "success_rate": 0.85,
      "how": "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",
      "condition": "",
      "sources": []
    },
    {
      "action": "For custom builds, rebuild rosbag2 with the desired compression plugin: colcon build --packages-select rosbag2_compression --cmake-args -DCOMPRESSION_LZ4=ON. Then restart recording.",
      "success_rate": 0.75,
      "how": "For custom builds, rebuild rosbag2 with the desired compression plugin: colcon build --packages-select rosbag2_compression --cmake-args -DCOMPRESSION_LZ4=ON. Then restart recording.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "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."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://github.com/ros2/rosbag2?tab=readme-ov-file#compression",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}