{
  "id": "ros2/rosbag2-compression-ratio-exceeded",
  "signature": "[rosbag2_compression] Compression ratio exceeded threshold: 10.5 (max 5.0). Bag file may be corrupted.",
  "signature_zh": "[rosbag2_compression] 压缩比超过阈值：10.5（最大 5.0）。包文件可能已损坏。",
  "regex": "Compression ratio exceeded threshold: [0-9.]+ \\(max [0-9.]+\\)",
  "domain": "ros2",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The compression algorithm (e.g., zstd) produced a compressed file larger than the uncompressed data, often due to incompressible data (e.g., random noise from sensors like lidar or radar) or a misconfigured compression level.",
  "root_cause_type": "generic",
  "root_cause_zh": "压缩算法（例如 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": "Jazzy",
      "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": "Increase the compression level to 22 (max for zstd)",
      "why_fails": "Higher compression levels can make the ratio worse for incompressible data, as overhead increases.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable compression entirely and store bags uncompressed",
      "why_fails": "This solves the warning but defeats the purpose of using compression for storage efficiency.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "Change the compression format to 'lz4'",
      "why_fails": "LZ4 is faster but has even worse compression ratios for incompressible data and may still trigger the warning.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the compression ratio threshold in the storage options: ros2 bag record -o my_bag --compression-mode file --compression-format zstd --compression-queue-size 100 --max-compression-ratio 20.0 /topic1 /topic2",
      "success_rate": 0.9,
      "how": "Increase the compression ratio threshold in the storage options: ros2 bag record -o my_bag --compression-mode file --compression-format zstd --compression-queue-size 100 --max-compression-ratio 20.0 /topic1 /topic2",
      "condition": "",
      "sources": []
    },
    {
      "action": "Filter out noisy topics (e.g., raw sensor data) from recording to avoid incompressible data: ros2 bag record -o my_bag --exclude '/noisy_lidar/.*' /important_topic",
      "success_rate": 0.85,
      "how": "Filter out noisy topics (e.g., raw sensor data) from recording to avoid incompressible data: ros2 bag record -o my_bag --exclude '/noisy_lidar/.*' /important_topic",
      "condition": "",
      "sources": []
    },
    {
      "action": "Preprocess sensor data to reduce noise (e.g., downsampling or filtering) before recording, using a separate node that publishes filtered messages.",
      "success_rate": 0.75,
      "how": "Preprocess sensor data to reduce noise (e.g., downsampling or filtering) before recording, using a separate node that publishes filtered messages.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the compression ratio threshold in the storage options: ros2 bag record -o my_bag --compression-mode file --compression-format zstd --compression-queue-size 100 --max-compression-ratio 20.0 /topic1 /topic2",
    "Filter out noisy topics (e.g., raw sensor data) from recording to avoid incompressible data: ros2 bag record -o my_bag --exclude '/noisy_lidar/.*' /important_topic",
    "Preprocess sensor data to reduce noise (e.g., downsampling or filtering) before recording, using a separate node that publishes filtered messages."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://github.com/ros2/rosbag2/blob/humble/rosbag2_compression/README.md",
  "official_doc_section": null,
  "error_code": "ROSBAG2_COMPRESSION_001",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-04-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}