{
  "schemaVersion": "1.0",
  "item": {
    "slug": "ardupilot",
    "name": "ArduPilot Drone Control",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/LuweiLiao/ardupilot",
    "canonicalUrl": "https://clawhub.ai/LuweiLiao/ardupilot",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/ardupilot",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=ardupilot",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/ardupilot"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/ardupilot",
    "agentPageUrl": "https://openagent3.xyz/skills/ardupilot/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ardupilot/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ardupilot/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "ArduPilot 无人机控制 Skill",
        "body": "通过 pymavlink 连接并控制 ArduPilot 无人机 (如 CubeOrange 等)。"
      },
      {
        "title": "⚠️ 重要：起飞核心流程",
        "body": "起飞必须连续发送命令，不要等待！\n\n# 1. 等待飞控稳定 (status=3)\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\n\n# 2. 连续发送：ARM → GUIDED → TAKEOFF (不要等待!)\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)  # ARM (force=21196)\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])  # GUIDED\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5)  # TAKEOFF 5m\n\n# 3. 监控高度\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt >= 4.5:\n            print('✅ 到达目标高度!')\n            break\n\n关键点：\n\n发送 ARM 后立即发送 GUIDED 和 TAKEOFF，不要等待\n如果等待，飞控会重新上锁\nforce=21196 是 ArduPilot 的 magic value"
      },
      {
        "title": "连接",
        "body": "from pymavlink import mavutil\n\nmaster = mavutil.mavlink_connection('tcp:localhost:5762')\nmaster.wait_heartbeat(timeout=10)\n\nsystem_id = master.target_system  # 通常是 1\ncomponent_id = master.target_component"
      },
      {
        "title": "1. 检查状态",
        "body": "# 获取飞控状态\nmsg = master.wait_heartbeat(timeout=5)\nprint(f'status: {msg.system_status}')  # 0=boot, 3=standby, 4=armed\n\n# 获取高度\nmsg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=1)\nprint(f'高度: {msg.relative_alt / 1000}m')\n\n# 获取 GPS\nmsg = master.recv_match(type='GPS_RAW_INT', timeout=1)\nprint(f'GPS: {msg.satellites_visible}颗, fix={msg.fix_type}')\n\n# 获取电池\nmsg = master.recv_match(type='SYS_STATUS', timeout=1)\nprint(f'电池: {msg.voltage_battery / 1000}V')"
      },
      {
        "title": "2. 起飞 (关键流程)",
        "body": "# ⚠️ 必须等待飞控稳定 (status=3)\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\n\n# ⚠️ 连续发送命令，不要等待!\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)  # ARM\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])  # GUIDED\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 8)  # TAKEOFF 8m\n\n# 闭环监控\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        print(f'{i*0.5:.1f}s → {alt:.2f}m')\n        if alt >= 7.2:  # 90% 目标\n            print('✅ 到达!')\n            break"
      },
      {
        "title": "3. 降落",
        "body": "# 切换到 LAND 模式\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['LAND'])\n\n# ⚠️ 必须持续发送 LAND 命令\nfor i in range(60):\n    master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)\n    import time\n    time.sleep(0.5)\n    \n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt < 0.3:\n            print('✅ 降落完成!')\n            break"
      },
      {
        "title": "4. 相对移动 (LOCAL_POSITION_NED)",
        "body": "# 获取当前位置\nlocal = master.recv_match(type='LOCAL_POSITION_NED', timeout=1)\n\n# X轴前进2米 (NED: X=北)\nmaster.mav.set_position_target_local_ned_send(\n    0, system_id, component_id,\n    mavutil.mavlink.MAV_FRAME_LOCAL_NED,\n    0b0000111111111000,\n    local.x + 2, local.y, local.z,\n    0, 0, 0, 0, 0, 0, 0, 0\n)"
      },
      {
        "title": "坐标系 (NED)",
        "body": "X轴: 北 (正=北)\nY轴: 东 (正=东)\nZ轴: 向下 (负值=向上=高度)"
      },
      {
        "title": "完整示例",
        "body": "from pymavlink import mavutil\nimport time\n\nmaster = mavutil.mavlink_connection('tcp:localhost:5762')\nmaster.wait_heartbeat(timeout=10)\n\nprint('=== 起飞到 5m ===')\n\n# 1. 等待飞控稳定\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\nprint('飞控就绪')\n\n# 2. 连续发送: ARM → GUIDED → TAKEOFF\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5)\nprint('ARM + GUIDED + TAKEOFF')\n\n# 3. 闭环监控\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        print(f'{i*0.5:.1f}s → {alt:.2f}m')\n        if alt >= 4.5:\n            print('✅ 5m!')\n            break\n\n# === 降落 ===\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['LAND'])\n\nfor i in range(60):\n    master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)\n    time.sleep(0.5)\n    \n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt < 0.3:\n            print('✅ 降落完成!')\n            break"
      },
      {
        "title": "注意事项",
        "body": "起飞：连续发送命令，不要等待\n降落：持续发送 LAND 命令\n闭环检查：每次操作前后获取状态\nGUIDED 模式：自主飞行必须用 GUIDED\nGPS：确保 fix_type >= 3\n端口：常用 TCP 5762"
      },
      {
        "title": "依赖",
        "body": "pip install pymavlink"
      }
    ],
    "body": "ArduPilot 无人机控制 Skill\n\n通过 pymavlink 连接并控制 ArduPilot 无人机 (如 CubeOrange 等)。\n\n⚠️ 重要：起飞核心流程\n\n起飞必须连续发送命令，不要等待！\n\n# 1. 等待飞控稳定 (status=3)\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\n\n# 2. 连续发送：ARM → GUIDED → TAKEOFF (不要等待!)\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)  # ARM (force=21196)\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])  # GUIDED\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5)  # TAKEOFF 5m\n\n# 3. 监控高度\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt >= 4.5:\n            print('✅ 到达目标高度!')\n            break\n\n\n关键点：\n\n发送 ARM 后立即发送 GUIDED 和 TAKEOFF，不要等待\n如果等待，飞控会重新上锁\nforce=21196 是 ArduPilot 的 magic value\n连接\nfrom pymavlink import mavutil\n\nmaster = mavutil.mavlink_connection('tcp:localhost:5762')\nmaster.wait_heartbeat(timeout=10)\n\nsystem_id = master.target_system  # 通常是 1\ncomponent_id = master.target_component\n\n1. 检查状态\n# 获取飞控状态\nmsg = master.wait_heartbeat(timeout=5)\nprint(f'status: {msg.system_status}')  # 0=boot, 3=standby, 4=armed\n\n# 获取高度\nmsg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=1)\nprint(f'高度: {msg.relative_alt / 1000}m')\n\n# 获取 GPS\nmsg = master.recv_match(type='GPS_RAW_INT', timeout=1)\nprint(f'GPS: {msg.satellites_visible}颗, fix={msg.fix_type}')\n\n# 获取电池\nmsg = master.recv_match(type='SYS_STATUS', timeout=1)\nprint(f'电池: {msg.voltage_battery / 1000}V')\n\n2. 起飞 (关键流程)\n# ⚠️ 必须等待飞控稳定 (status=3)\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\n\n# ⚠️ 连续发送命令，不要等待!\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)  # ARM\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])  # GUIDED\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 8)  # TAKEOFF 8m\n\n# 闭环监控\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        print(f'{i*0.5:.1f}s → {alt:.2f}m')\n        if alt >= 7.2:  # 90% 目标\n            print('✅ 到达!')\n            break\n\n3. 降落\n# 切换到 LAND 模式\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['LAND'])\n\n# ⚠️ 必须持续发送 LAND 命令\nfor i in range(60):\n    master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)\n    import time\n    time.sleep(0.5)\n    \n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt < 0.3:\n            print('✅ 降落完成!')\n            break\n\n4. 相对移动 (LOCAL_POSITION_NED)\n# 获取当前位置\nlocal = master.recv_match(type='LOCAL_POSITION_NED', timeout=1)\n\n# X轴前进2米 (NED: X=北)\nmaster.mav.set_position_target_local_ned_send(\n    0, system_id, component_id,\n    mavutil.mavlink.MAV_FRAME_LOCAL_NED,\n    0b0000111111111000,\n    local.x + 2, local.y, local.z,\n    0, 0, 0, 0, 0, 0, 0, 0\n)\n\n坐标系 (NED)\nX轴: 北 (正=北)\nY轴: 东 (正=东)\nZ轴: 向下 (负值=向上=高度)\n完整示例\nfrom pymavlink import mavutil\nimport time\n\nmaster = mavutil.mavlink_connection('tcp:localhost:5762')\nmaster.wait_heartbeat(timeout=10)\n\nprint('=== 起飞到 5m ===')\n\n# 1. 等待飞控稳定\nwhile True:\n    msg = master.wait_heartbeat(timeout=3)\n    if msg and msg.system_status == 3:\n        break\nprint('飞控就绪')\n\n# 2. 连续发送: ARM → GUIDED → TAKEOFF\nmaster.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['GUIDED'])\nmaster.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5)\nprint('ARM + GUIDED + TAKEOFF')\n\n# 3. 闭环监控\nfor i in range(40):\n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)\n    if msg:\n        alt = msg.relative_alt / 1000\n        print(f'{i*0.5:.1f}s → {alt:.2f}m')\n        if alt >= 4.5:\n            print('✅ 5m!')\n            break\n\n# === 降落 ===\nmode_map = master.mode_mapping()\nmaster.set_mode(mode_map['LAND'])\n\nfor i in range(60):\n    master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)\n    time.sleep(0.5)\n    \n    msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)\n    if msg:\n        alt = msg.relative_alt / 1000\n        if alt < 0.3:\n            print('✅ 降落完成!')\n            break\n\n注意事项\n起飞：连续发送命令，不要等待\n降落：持续发送 LAND 命令\n闭环检查：每次操作前后获取状态\nGUIDED 模式：自主飞行必须用 GUIDED\nGPS：确保 fix_type >= 3\n端口：常用 TCP 5762\n依赖\npip install pymavlink"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/LuweiLiao/ardupilot",
    "publisherUrl": "https://clawhub.ai/LuweiLiao/ardupilot",
    "owner": "LuweiLiao",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/ardupilot",
    "downloadUrl": "https://openagent3.xyz/downloads/ardupilot",
    "agentUrl": "https://openagent3.xyz/skills/ardupilot/agent",
    "manifestUrl": "https://openagent3.xyz/skills/ardupilot/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/ardupilot/agent.md"
  }
}