{
  "id": "ros2/nav2-costmap-layer-buffer-overflow",
  "signature": "[costmap_2d] Failed to update costmap layer 'obstacle_layer': buffer overflow in mark function",
  "signature_zh": "[costmap_2d] 更新代价地图层'obstacle_layer'失败：标记函数缓冲区溢出",
  "regex": "Failed to update costmap layer '.*': buffer overflow in mark function",
  "domain": "ros2",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The obstacle layer's internal buffer for marking obstacles overflows when too many points are added in a single update cycle, often due to a high-rate sensor publishing an excessive number of points.",
  "root_cause_type": "generic",
  "root_cause_zh": "当单个更新周期内添加过多点时，障碍物层的内部标记缓冲区会溢出，通常是由于高频率传感器发布了过多点。",
  "versions": [
    {
      "version": "ros2-humble",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ros2-iron",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ros2-rolling",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Buffer overflow is a symptom of excessive data rate; increasing buffer may delay overflow but not prevent it.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling obstacle layer removes obstacle avoidance, making navigation unsafe.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce the sensor's point cloud publish rate: in the sensor driver configuration, set 'publish_rate: 5.0' (Hz) or use a filter like 'voxel_grid' to downsample.",
      "success_rate": 0.85,
      "how": "Reduce the sensor's point cloud publish rate: in the sensor driver configuration, set 'publish_rate: 5.0' (Hz) or use a filter like 'voxel_grid' to downsample.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase the costmap update frequency and decrease the obstacle layer's 'combination_method' to '1' (max) to reduce buffer usage: set 'update_frequency: 10.0' and 'obstacle_layer.combination_method: 1' in costmap_common_params.yaml.",
      "success_rate": 0.8,
      "how": "Increase the costmap update frequency and decrease the obstacle layer's 'combination_method' to '1' (max) to reduce buffer usage: set 'update_frequency: 10.0' and 'obstacle_layer.combination_method: 1' in costmap_common_params.yaml.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "降低传感器点云发布频率：在传感器驱动配置中设置'publish_rate: 5.0'（Hz），或使用'voxel_grid'滤波器进行降采样。",
    "提高代价地图更新频率并将障碍物层的'combination_method'设置为'1'（最大值）以减少缓冲区使用：在costmap_common_params.yaml中设置'update_frequency: 10.0'和'obstacle_layer.combination_method: 1'。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nav2.org/configuration/packages/costmap-2d/index.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2024-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}