{
  "id": "ros2/colcon-build-catkin-package-not-found",
  "signature": "colcon build: CMake Error at CMakeLists.txt: find_package(catkin) failed",
  "signature_zh": "colcon build: CMake错误在CMakeLists.txt: 找不到catkin包",
  "regex": "find_package\\(catkin\\) failed",
  "domain": "ros2",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "A ROS1 (catkin) package is being built in a ROS2 workspace, but catkin is not available or the workspace is not configured for mixed builds.",
  "root_cause_type": "generic",
  "root_cause_zh": "在ROS2工作空间中构建ROS1(catkin)包，但catkin不可用或工作空间未配置为混合构建。",
  "versions": [
    {
      "version": "ROS2 Humble (Ubuntu 22.04)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ROS2 Iron (Ubuntu 22.04)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ROS2 Rolling (Ubuntu 24.04)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Install catkin via apt and rebuild",
      "why_fails": "catkin is not a ROS2 package; even if installed, colcon won't find it without ROS1 bridge setup.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually set CMAKE_PREFIX_PATH to catkin workspace",
      "why_fails": "colcon ignores manual CMAKE_PREFIX_PATH overrides for workspace isolation.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Remove the catkin package from the workspace or migrate it to ament_cmake. If you need ROS1 compatibility, use a separate catkin workspace and source it before building the ROS2 workspace.",
      "success_rate": 0.9,
      "how": "Remove the catkin package from the workspace or migrate it to ament_cmake. If you need ROS1 compatibility, use a separate catkin workspace and source it before building the ROS2 workspace.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use colcon's --merge-install or --cmake-args to include the catkin workspace: colcon build --cmake-args -DCATKIN_DEVEL_PREFIX=/path/to/catkin_ws/devel",
      "success_rate": 0.7,
      "how": "Use colcon's --merge-install or --cmake-args to include the catkin workspace: colcon build --cmake-args -DCATKIN_DEVEL_PREFIX=/path/to/catkin_ws/devel",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "从工作空间中移除catkin包，或将其迁移到ament_cmake。如果需要ROS1兼容性，请使用单独的catkin工作空间，并在构建ROS2工作空间前source它。",
    "使用colcon的--merge-install或--cmake-args包含catkin工作空间：colcon build --cmake-args -DCATKIN_DEVEL_PREFIX=/path/to/catkin_ws/devel"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.ros.org/en/humble/Tutorials/Intermediate/URDF/URDF-Main.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}