소스 정보
- 저장소
- johnalbertini14-glitch/openclaw-skills
- 최근 소스 활동
- 2026년 2월 15일 14:28
- 감지된 SKILL.md 언어
- 중국어
- 스타
- 1
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/johnalbertini14-glitch/openclaw-skills --skill ardupilot명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | ardupilot |
| description | 通过 pymavlink 连接并控制 ArduPilot 无人机。使用此 skill 来操作无人机起飞、降落、移动等。 |
通过 pymavlink 连接并控制 ArduPilot 无人机 (如 CubeOrange 等)。
起飞必须连续发送命令,不要等待!
# 1. 等待飞控稳定 (status=3)
while True:
msg = master.wait_heartbeat(timeout=3)
if msg and msg.system_status == 3:
break
# 2. 连续发送:ARM → GUIDED → TAKEOFF (不要等待!)
master.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0) # ARM (force=21196)
mode_map = master.mode_mapping()
master.set_mode(mode_map['GUIDED']) # GUIDED
master.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5) # TAKEOFF 5m
# 3. 监控高度
for i in range(40):
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)
if msg:
alt = msg.relative_alt / 1000
if alt >= 4.5:
print('✅ 到达目标高度!')
break
关键点:
from pymavlink import mavutil
master = mavutil.mavlink_connection('tcp:localhost:5762')
master.wait_heartbeat(timeout=10)
system_id = master.target_system # 通常是 1
component_id = master.target_component
# 获取飞控状态
msg = master.wait_heartbeat(timeout=5)
print(f'status: {msg.system_status}') # 0=boot, 3=standby, 4=armed
# 获取高度
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=1)
print(f'高度: {msg.relative_alt / 1000}m')
# 获取 GPS
msg = master.recv_match(type='GPS_RAW_INT', timeout=1)
print(f'GPS: {msg.satellites_visible}颗, fix={msg.fix_type}')
# 获取电池
msg = master.recv_match(type='SYS_STATUS', timeout=1)
print(f'电池: {msg.voltage_battery / 1000}V')
# ⚠️ 必须等待飞控稳定 (status=3)
while True:
msg = master.wait_heartbeat(timeout=3)
if msg and msg.system_status == 3:
break
# ⚠️ 连续发送命令,不要等待!
master.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0) # ARM
mode_map = master.mode_mapping()
master.set_mode(mode_map['GUIDED']) # GUIDED
master.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 8) # TAKEOFF 8m
# 闭环监控
for i in range(40):
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)
if msg:
alt = msg.relative_alt / 1000
print(f'{i*0.5:.1f}s → {alt:.2f}m')
if alt >= 7.2: # 90% 目标
()
# 切换到 LAND 模式
mode_map = master.mode_mapping()
master.set_mode(mode_map['LAND'])
# ⚠️ 必须持续发送 LAND 命令
for i in range(60):
master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)
import time
time.sleep(0.5)
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)
if msg:
alt = msg.relative_alt / 1000
if alt < 0.3:
print('✅ 降落完成!')
break
# 获取当前位置
local = master.recv_match(type='LOCAL_POSITION_NED', timeout=1)
# X轴前进2米 (NED: X=北)
master.mav.set_position_target_local_ned_send(
0, system_id, component_id,
mavutil.mavlink.MAV_FRAME_LOCAL_NED,
0b0000111111111000,
local.x + 2, local.y, local.z,
0, 0, 0, 0, 0, 0, 0, 0
)
from pymavlink import mavutil
import time
master = mavutil.mavlink_connection('tcp:localhost:5762')
master.wait_heartbeat(timeout=10)
print('=== 起飞到 5m ===')
# 1. 等待飞控稳定
while True:
msg = master.wait_heartbeat(timeout=3)
if msg and msg.system_status == 3:
break
print('飞控就绪')
# 2. 连续发送: ARM → GUIDED → TAKEOFF
master.mav.command_long_send(1, 1, 400, 0, 1, 21196, 0, 0, 0, 0, 0)
mode_map = master.mode_mapping()
master.set_mode(mode_map['GUIDED'])
master.mav.command_long_send(1, 1, 22, 0, 0, 0, 0, 0, 0, 0, 5)
print('ARM + GUIDED + TAKEOFF')
# 3. 闭环监控
for i in range(40):
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.5)
if msg:
alt = msg.relative_alt /
()
alt >= :
()
# === 降落 ===
mode_map = master.mode_mapping()
master.set_mode(mode_map['LAND'])
for i in range(60):
master.mav.command_long_send(1, 1, 21, 0, 0, 0, 0, 0, 0, 0, 0)
time.sleep(0.5)
msg = master.recv_match(type='GLOBAL_POSITION_INT', timeout=0.3)
if msg:
alt = msg.relative_alt / 1000
if alt < 0.3:
print('✅ 降落完成!')
break
pip install pymavlink