ROS 2 + PX4 Offboard Autonomy
Vision-guided offboard control using ROS 2, PX4 SITL, and ArUco-based mission logic
What I built
Developed a ROS 2–based offboard autonomy stack integrated with PX4 SITL to execute waypoint missions and vision-triggered behaviors. The system combines PX4 flight control with ROS 2 mission logic and ArUco marker detection to dynamically alter flight behavior during runtime, demonstrating middleware integration, autonomy logic, and perception-driven control.
Problem
Design an offboard autonomy workflow that allows high-level mission logic and vision-based triggers to influence PX4-controlled flight behavior, while maintaining stable low-level flight control and clean separation between autonomy and autopilot responsibilities.
Approach
- Set up PX4 SITL with Gazebo and QGroundControl for simulation-based development and testing.
- Implemented ROS 2 nodes for offboard control, waypoint publishing, and mission state management.
- Integrated PX4 offboard mode to accept position setpoints from ROS 2 at a fixed control rate.
- Used ArUco marker detection as a perception trigger to switch mission phases (e.g., waypoint update or spiral descent).
- Designed spiral and waypoint trajectories in ROS 2 rather than embedding mission logic inside PX4 firmware.
- Managed multi-process execution (PX4 SITL, ROS 2 nodes, vision pipeline) with clear startup and timing coordination.
Engineering decisions
Offboard autonomy instead of PX4 firmware modification
Kept PX4 as a stable low-level flight controller while implementing mission logic in ROS 2 for flexibility, debuggability, and faster iteration.
Vision as a mission trigger, not a control loop
Used ArUco detection to trigger discrete mission state changes rather than directly closing a visual servoing loop, improving robustness.
Simulation-first development
Developed and validated mission logic entirely in PX4 SITL before considering hardware execution.
Ownership
- PX4 SITL setup and configuration (Gazebo + QGroundControl).
- ROS 2 offboard control node design and implementation.
- Mission logic for waypoint navigation and spiral trajectories.
- Vision pipeline integration using ArUco markers.
- System-level debugging across PX4, ROS 2, and simulation tools.
Results
- Successfully executed offboard waypoint missions controlled entirely from ROS 2.
- Demonstrated vision-triggered mission transitions using ArUco marker detection.
- Validated a modular autonomy architecture separating perception, mission logic, and flight control.