Open-source framework to control ArduPilot drones with ROS2. Test missions in SITL simulation, then deploy to real hardware.
Validated on real flights with Cube Orange flight controller and Raspberry Pi 4.
| Step | Description | Guide |
|---|---|---|
| 1 | Install - ROS2, MAVROS, ArduPilot SITL | Installation Guide |
| 2 | Use - Test in simulation, deploy to hardware | Workflow Guide |
Already have ROS2 + MAVROS + ArduPilot installed? Skip to Quick Start below.
┌─────────────────────────────────────────────────────────────────────┐
│ Your Mission Script │
│ (Python / ROS2 Node) │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ MAVROS (ROS2) │
│ Translates ROS2 ↔ MAVLink Protocol │
└─────────────────────────────────────────────────────────────────────┘
│
┌─────────────┴─────────────┐
▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ SITL Simulator │ │ Real Hardware │
│ (UDP:14550) │ │ (/dev/ttyACM0) │
│ │ │ │
│ ArduPilot │ │ Cube Orange │
│ Virtual Drone │ │ Flight Controller│
└───────────────────┘ └───────────────────┘
│
▼
┌───────────────┐
│ Drone │
└───────────────┘
Same mission code works for both paths - only the MAVROS connection changes.
- Companion Computer Control - Command drone autonomously from Raspberry Pi in GUIDED mode
- SITL & Hardware Testing - Test missions in simulation, then deploy same code to real drone
- Flight Validated - Tested on FuryVision AAV in autonomous flight
- Safety First - Comprehensive pre-flight checks and emergency procedures
- Ground Station Optional - Mission Planner/QGroundControl for monitoring
- Complete Workflow - SITL testing → Bench testing → Flight testing documented
- Open Hardware Reference - Test platform fully documented (CAD, assembly, wiring)
- ROS2 Humble on Ubuntu 22.04
- ArduPilot SITL (for simulation)
- MAVROS installed
Don't have these? See Installation Guide
# 1. Clone this repository
git clone https://github.com/sidharthmohannair/ros2-ardupilot-sitl-hardware.git
cd ros2-ardupilot-sitl-hardware
# 2. Build packages
colcon build
source install/setup.bash
# 3. Make scripts executable (first time only)
chmod +x launch/*.sh
# 4. Start SITL (Terminal 1)
./launch/start_sitl.sh
# 5. Start MAVROS (Terminal 2)
./launch/start_mavros.sh
# 6. Run autonomous mission (Terminal 3)
source install/setup.bash
python3 scripts/missions/mission_simple.py
# 7. Stop cleanly when done
./launch/stop_all.shWatch your drone takeoff in the SITL map!
After SITL testing succeeds:
# 1. Stop SITL completely
./launch/stop_all.sh
# 2. Connect Cube Orange via USB to Raspberry Pi
# 3. Start MAVROS for hardware (Terminal 1)
./launch/start_mavros_real.sh
# Answer safety prompts
# 4. Run SAME mission (Terminal 2)
source install/setup.bash
python3 scripts/missions/mission_simple.pySee WORKFLOW.md for:
- Detailed SITL testing procedure
- Hardware transition steps
- Helper script reference
- Troubleshooting common issues
- Best practices
├── src/ # ROS2 packages
│ ├── simtofly_mavros_sitl/ # SITL simulation configuration
│ └── simtofly_mavros_real/ # Real hardware configuration
├── scripts/missions/ # Autonomous mission examples
├── launch/ # Helper scripts (start/stop)
├── docs/ # Complete documentation
└── README.md # You are here
- Installation Guide - Install ROS2, MAVROS, ArduPilot SITL
- SITL Simulation - Test missions safely in simulation
- Complete Workflow - SITL → Bench → Flight testing progression
- Real Hardware Setup - Deploy on Raspberry Pi + Flight Controller
- Mission Planner Connection - Ground station monitoring (optional)
- Hardware Platform - FuryVision AAV specifications and test data
- Mission Examples - Write autonomous missions in Python
- Troubleshooting - Common issues and solutions
This framework has been validated on the following configuration:
Flight Controller: Cube Orange+ (Pixhawk)
Companion Computer: Raspberry Pi 4 (8GB)
Firmware: ArduCopter v4.5.7
ROS2 Version: Humble Hawksbill
OS: Ubuntu 22.04 LTS
FuryVision AAV hovering - Hardware platform used for framework testing
Complete Hardware Details: FuryVision AAV - Open Source Drone
Why This Platform:
- ✅ Fully open source - CAD files, assembly guide, wiring diagrams available
- ✅ Flight tested - 8+ minutes flight time, stable autonomous performance
- ✅ Well documented - Complete build and test procedures
| Component | Validated | Notes |
|---|---|---|
| Flight Controllers | ||
| Cube Orange+ | ✅ Tested | Primary platform |
| Cube Orange | Should work with same setup | |
| Pixhawk 4 | Should work with same setup | |
| Pixhawk 6C | Should work with same setup | |
| Companion Computers | ||
| Raspberry Pi 4 (4GB+) | ✅ Tested | Ubuntu 22.04 native |
| Raspberry Pi 5 | May require Docker (Ubuntu 22.04 support) | |
| Jetson Nano | Different architecture, may need adjustments |
Note: "Compatible" means theoretically supported but not tested by maintainer. Some hardware may work without changes, others may require minor modifications such as serial port names, baud rates, or Docker setup for OS compatibility. Community testing and feedback welcome!
For complete hardware specifications: Hardware Reference
Before testing on real hardware:
- ✅ Remove all propellers during bench testing
- ✅ Secure drone on stable surface
- ✅ Have RC transmitter ready for manual override
- ✅ Read the Real Hardware Setup Guide
- ✅ Follow local drone regulations
Motors WILL spin when armed - propellers off = safe testing!
This project is actively maintained and welcomes contributions!
We're building this based on community feedback and real-world usage. Your input helps make this better for everyone.
Ways to contribute:
- Report bugs or hardware compatibility issues
- Suggest features or improvements
- Improve documentation
- Test on different hardware configurations
- Share your mission examples
See CONTRIBUTING.md for guidelines.
Planned improvements based on feedback:
- More mission examples (waypoint patterns, search patterns)
- Additional hardware configurations (Jetson, RPi5)
- Computer vision integration examples
- Multi-drone coordination examples
- Video tutorials
Your suggestions welcome in Discussions!
This project is licensed under the Apache License 2.0 - see LICENSE file.
When using this work, please credit:
Based on work by Sidharth Mohan Nair
https://github.com/sidharthmohannair/ros2-ardupilot-sitl-hardware
- ROS2 community
- ArduPilot developers
- MAVROS maintainers
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Author: Sidharth Mohan Nair
If this project helps you, consider giving it a ⭐ on GitHub.

