{
  "id": "ros2/nav2-costmap-rolling-window-offset",
  "signature": "[nav2_costmap_2d] Rolling window costmap origin offset mismatch: expected (x, y) but got (x', y')",
  "signature_zh": "[nav2_costmap_2d] 滚动窗口代价地图原点偏移不匹配：预期 (x, y) 但得到 (x', y')",
  "regex": "Rolling window costmap origin offset mismatch: expected \\([-0-9.]+,\\s*[-0-9.]+\\) but got \\([-0-9.]+,\\s*[-0-9.]+\\)",
  "domain": "ros2",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The rolling window costmap's origin is not updated correctly when the robot moves, often due to an incorrect 'rolling_window' parameter or a mismatch between the costmap frame and the robot's odometry frame.",
  "root_cause_type": "generic",
  "root_cause_zh": "滚动窗口代价地图的原点在机器人移动时未正确更新，通常是由于 'rolling_window' 参数设置错误或代价地图帧与机器人里程计帧不匹配。",
  "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": "Set the costmap size to a very large value (e.g., 100x100 meters)",
      "why_fails": "Large costmaps consume excessive memory and slow down planning; the origin offset still drifts.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disable the rolling window and use a static costmap",
      "why_fails": "This changes the navigation behavior (no map following), which may not be acceptable for dynamic environments.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually set the costmap origin in the parameter file to a fixed value",
      "why_fails": "The origin is dynamically updated by the robot's pose; a fixed value will cause the costmap to become misaligned.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure the 'global_frame' parameter in the costmap config matches the frame used by the robot's odometry (e.g., 'odom' or 'map'). Example: global_frame: odom; rolling_window: true; width: 10.0; height: 10.0;",
      "success_rate": 0.9,
      "how": "Ensure the 'global_frame' parameter in the costmap config matches the frame used by the robot's odometry (e.g., 'odom' or 'map'). Example: global_frame: odom; rolling_window: true; width: 10.0; height: 10.0;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add a static transform publisher in the launch file to publish the transform from 'odom' to 'map' if they differ: <node pkg=\"tf2_ros\" exec=\"static_transform_publisher\" args=\"0 0 0 0 0 0 map odom\"/>",
      "success_rate": 0.8,
      "how": "Add a static transform publisher in the launch file to publish the transform from 'odom' to 'map' if they differ: <node pkg=\"tf2_ros\" exec=\"static_transform_publisher\" args=\"0 0 0 0 0 0 map odom\"/>",
      "condition": "",
      "sources": []
    },
    {
      "action": "Update the costmap parameters to set 'always_send_full_costmap: true' in the nav2_params.yaml to force full costmap updates, reducing drift.",
      "success_rate": 0.75,
      "how": "Update the costmap parameters to set 'always_send_full_costmap: true' in the nav2_params.yaml to force full costmap updates, reducing drift.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure the 'global_frame' parameter in the costmap config matches the frame used by the robot's odometry (e.g., 'odom' or 'map'). Example: global_frame: odom; rolling_window: true; width: 10.0; height: 10.0;",
    "Add a static transform publisher in the launch file to publish the transform from 'odom' to 'map' if they differ: <node pkg=\"tf2_ros\" exec=\"static_transform_publisher\" args=\"0 0 0 0 0 0 map odom\"/>",
    "Update the costmap parameters to set 'always_send_full_costmap: true' in the nav2_params.yaml to force full costmap updates, reducing drift."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nav2.org/configuration/packages/costmap-2d.html",
  "official_doc_section": null,
  "error_code": "NAV2_COSTMAP_ROLLING_001",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}