Uncrewed aerial vehicle (UAV) research and development is characterized by recurring engineering challenges in flight control, sensor integration, and autonomous behaviour implementation. Over the past decade, open-source software frameworks have matured considerably, becoming widely adopted foundations for UAV research and development. However, limited visibility and insufficient knowledge transfer have resulted in recent architectural advances remaining underutilized, with many existing workflows continuing to rely on integration paradigms that predate recent developments.
This study presents a reference architecture for implementing custom autonomous behaviours using off-the-shelf autopilot hardware and a fully open-source software stack. The architecture integrates recent developments in the open-source UAV ecosystem, including the PX4 ROS 2 Interface Library’s Control Interface for external modes and setpoint interfaces, with ROS 2 providing a standardized communication layer and DDS-based middleware enabling distributed system integration. The interfaces support a broad range of control abstractions, from navigation tasks to direct actuator control for low-level research applications and high-level trajectory planning. A central feature is a unified ROS 2 interface through which custom autonomy can coexist and interact with native PX4 modes while maintaining integration with PX4 mode management and failsafe mechanisms. Furthermore, the architecture generalizes across multirotor, fixed-wing, and VTOL platforms.
The contribution is twofold. First, the work provides a practical and reproducible demonstration of scalable, safety-aware, and maintainable UAV autonomy built upon established open-source tooling. The architecture was validated through software-in-the-loop simulations and experimental flights on Pixhawk-based platforms. Second, it presents a structured technical assessment of the open-source UAV ecosystem from a developer and researcher perspective. The analysis focuses on software architecture, interface abstractions, and middleware design rather than treating the flight stack as a black box, with the aim of lowering the adoption barrier for modern open-source flight software in both research and industrial applications.