1.5 KiB
1.5 KiB
ArduPilot SITL Integration
Run the simulation with a realistic ArduPilot flight controller.
Quick Start
Terminal 1 - Simulation:
source ~/ardu_ws/install/setup.bash
ros2 launch ardupilot_gz_bringup iris_runway.launch.py
Terminal 2 - Control:
mavproxy.py --console --map --master=:14550
Installation
./setup/install_ardupilot.sh
source ~/.bashrc
This installs:
- ArduPilot SITL with DDS
- Gazebo with ardupilot_gz
- MAVProxy
MAVProxy Commands
# Set mode
mode guided
# Arm
arm throttle
# Takeoff
takeoff 5
# Land
mode land
ROS 2 Topics
ArduPilot publishes native ROS 2 topics:
# List topics
ros2 topic list
# View position
ros2 topic echo /ap/geopose/filtered
# View battery
ros2 topic echo /ap/battery
| Topic | Type |
|---|---|
/ap/pose/filtered |
PoseStamped |
/ap/twist/filtered |
TwistStamped |
/ap/imu/filtered |
Imu |
/ap/battery |
BatteryState |
Available Worlds
# Iris on runway
ros2 launch ardupilot_gz_bringup iris_runway.launch.py
# Iris in maze
ros2 launch ardupilot_gz_bringup iris_maze.launch.py
# Rover
ros2 launch ardupilot_gz_bringup wildthumper_playpen.launch.py
Using the Launcher
python run_ardupilot.py --world runway
python run_ardupilot.py --world maze
python run_ardupilot.py --vehicle rover
Troubleshooting
No ROS 2 topics:
# Check DDS is enabled
param set DDS_ENABLE 1
Can't arm:
# Disable pre-arm checks (simulation only)
param set ARMING_CHECK 0