





Modularization
The UAV software architecture is heavily modularized, prioritizing operational reliability, maintainability, and safe execution. By separating the system into highly specialized ROS 2 packages—such as `uav_mission_manager`, `uav_navigation`, and `uav_perception`—the architecture rigorously isolates discrete responsibilities. This separation of concerns ensures that low-level flight control interfaces operate independently from high-level mission logic and complex computer vision pipelines. Such a decoupled design inherently supports robustness against component failure; if one module encounters latency or degradation, the remaining subsystems guarantee that core functions remain active and responsive to overarching system commands. This structure enables highly parallelized development across multiple domains and ensures that the system is easily scalable, allowing new capabilities to be integrated seamlessly without compromising the overall stability of the UAV.

Perception and Object Detection
To successfully navigate a maritime environment that inherently lacks stable visual keypoints, the UAV utilizes a highly specialized and robust computer vision pipeline managed by the `uav_perception` package. This bespoke perception stack is built around modular, application-specific detectors designed to operate reliably in highly dynamic open-water conditions. The system features integrated capabilities for ArUco marker recognition, dynamic color thresholding for buoy identification, SIFT-based feature matching, and dedicated landing pad detection algorithms. By relying on these targeted perceptual modalities, the UAV can accurately perform crucial cooperative tasks, such as tracking the USV for precise autonomous landings or locating specific targets amidst significant wave motion and positional noise. This focused, modular perception strategy ensures the drone maintains high situational awareness and reliably executes vision-dependent mission objectives regardless of the challenging visual characteristics of the environment.

Navigation Stack
The UAV's challenging maritime domain demands a highly reliable three-dimensional flight control strategy. To achieve robust offshore performance, the system relies on a customized, highly optimized waypoint-based navigation stack located in the `uav_navigation` package. This architecture leverages ROS 2 action servers to seamlessly process high-level mission commands, such as automated takeoff, search patterns, and point-to-point traversal. These behavioral commands are then translated into executable MAVLink instructions via a dedicated PX4 interface using the uXRCE-DDS middleware. By delegating low-level, high-frequency flight stabilization directly to the PX4 flight controller, the onboard companion computer is freed to focus exclusively on executing complex path planning. This bifurcated approach effectively mitigates positional drift caused by wind and wave motion, maximizing overall flight stability while ensuring precise and resilient execution of waypoint sequences designated by the overarching mission manager.

Behavior-trees
To govern complex decision-making, the UAV leverages Behavior Trees (BTs) implemented through the `py-trees` and `py-trees-ros` libraries. This Python-based BT architecture ensures a highly modular, responsive, and easily maintainable mission management system. Instead of relying on a centralized, monolithic structure spanning all vehicles, the UAV runs an independent behavior tree that integrates seamlessly with ROS 2 action servers. This decentralized setup guarantees the UAV can safely complete tasks or handle abort sequences even during multi-agent communication losses. A critical advantage of this flexible structure is the implementation of an intermediate soft-abort mechanism. Designed as a high-priority BT branch, it safely interrupts running missions by canceling active navigation goals and bringing the UAV into a stable hover at a safe altitude, offering a highly robust and clean alternative to abrupt radio killswitches.
