px4-multicopter-dev
PX4 软件在环仿真 (SITL) 环境设置与运行 - 支持 Gazebo、jMAVSim、SIH 仿真器
by MIUAV★ 30 GitHub stars
Install px4-multicopter-dev in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
PX4 SITL 仿真技能
用于设置和运行 PX4 软件在环仿真环境
何时使用
当需要以下帮助时使用此技能:
- 在电脑上运行 PX4 仿真
- 测试飞行控制算法
- 验证无人机配置
- 调试自主飞行任务
快速参考
基础命令
# 克隆 PX4 源码
git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot
# 使用 Gazebo 启动 SITL (推荐)
make px4_sitl gz_x500
# 使用 jMAVSim 启动 SITL
make px4_sitl jmavsim
# 使用 SIH 启动 SITL (无依赖)
make px4_sitl_sih sihsim_quadx
仿真中控制无人机
# 在 PX4 控制台中起飞
commander takeoff
# 降落
commander land
# 切换模式
mode offboard
mode position
# 查看状态
status
支持的仿真器
| 仿真器 | 特点 | 适用场景 |
|---|---|---|
| Gazebo | 3D渲染、丰富传感器、ROS集成 | 视觉导航、避障、多机仿真 |
| jMAVSim | 轻量、快速启动 | 快速迭代、控制算法测试 |
| SIH | 无外部依赖、可在FC上运行 | 硬件集成测试、快速验证 |
多旋翼机型
# 四旋翼 (默认)
make px4_sitl gz_x500
# 六旋翼
make px4_sitl gz_x600
# 带光流的四旋翼
make px4_sitl gz_x500_opt_flow
# 带RTK GPS的四旋翼
make px4_sitl gz_x500_rtk
加速仿真
# 2倍速仿真
PX4_SIM_SPEED_FACTOR=2 make px4_sitl gz_x500
# 最多10倍速
PX4_SIM_SPEED_FACTOR=10 make px4_sitl gz_x500
连接到外部控制
QGroundControl
仿真默认连接到 QGroundControl (UDP 端口 14550)
MAVROS / MAVSDK
# 监听 offboard API 端口 (14540)
# 使用 MAVROS 连接
ros2 run mavros mavros_node _udp_port:=14540
常用配置
使用自定义机型
export PX4_SIM_MODEL=iris
make px4_sitl gz
添加环境变量
# 设置仿真速度
export PX4_SIM_SPEED_FACTOR=2
# 设置日志级别
export PX4_LOG_LEVEL=info
# 启动仿真
make px4_sitl gz_x500
故障排除
Gazebo 启动失败
# 确保 Gazebo 已安装
which gz
# 使用 jMAVSim 作为替代
make px4_sitl jmavsim
端口被占用
# 检查端口
netstat -an | grep 14550
# 使用不同端口(需要修改配置)
构建失败
# 清理并更新子模块
make distclean
git submodule update --recursive
# 重新构建
make px4_sitl gz_x500
相关文档
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the px4-multicopter-dev skill do?
PX4 软件在环仿真 (SITL) 环境设置与运行 - 支持 Gazebo、jMAVSim、SIH 仿真器
How do I install the px4-multicopter-dev skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the px4-multicopter-dev skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…