{
  "id": "ros2/lifecycle-node-configure-failure-no-parameters",
  "signature": "[ERROR] [my_lifecycle_node]: Failed to configure: required parameter 'my_param' not set",
  "signature_zh": "[错误] [my_lifecycle_node]: 配置失败：未设置必需参数 'my_param'",
  "regex": "\\[ERROR\\] \\[.+\\]: Failed to configure: required parameter '.+' not set",
  "domain": "ros2",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A lifecycle node's on_configure callback requires a parameter that is not provided in the node's parameter list, causing the transition to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "生命周期节点的 on_configure 回调需要一个未在节点参数列表中提供的参数，导致转换失败。",
  "versions": [
    {
      "version": "ROS2 Foxy",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ROS2 Galactic",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "ROS2 Humble",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "rclcpp 16.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The parameter may still not be set if the user doesn't provide a value; the error occurs only if the parameter is explicitly required without a default.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Parameters must be declared before configure; reordering doesn't fix missing parameter values.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The lifecycle state machine prevents activation without successful configuration.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Provide the missing parameter via a YAML file or command line: 'ros2 run my_package my_lifecycle_node --ros-args -p my_param:=value'",
      "success_rate": 0.95,
      "how": "Provide the missing parameter via a YAML file or command line: 'ros2 run my_package my_lifecycle_node --ros-args -p my_param:=value'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Modify the node's on_configure to use a default value if the parameter is not set: if (!this->get_parameter('my_param', my_param_)) { my_param_ = default_value; }",
      "success_rate": 0.85,
      "how": "Modify the node's on_configure to use a default value if the parameter is not set: if (!this->get_parameter('my_param', my_param_)) { my_param_ = default_value; }",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过 YAML 文件或命令行提供缺失的参数：'ros2 run my_package my_lifecycle_node --ros-args -p my_param:=value'",
    "修改节点的 on_configure 以在参数未设置时使用默认值：if (!this->get_parameter('my_param', my_param_)) { my_param_ = default_value; }"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.ros.org/en/humble/Tutorials/Intermediate/Lifecycle/Lifecycle.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-04-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}