Vision-assisted autonomous payload delivery for PX4.
PX4 executes a pre-planned search mission while a Raspberry Pi 5 (with a Hailo-8L accelerator) runs a YOLOv8s-based perception pipeline. When the required target is detected the stack interrupts the mission, aligns the vehicle using OFFBOARD velocity control, descends to a configured drop altitude, triggers the payload release, and then returns or resumes the mission.
Key highlights
- PX4 integration via MAVROS; mission interruption → OFFBOARD → RTL/resume.
- Hailo-8L accelerated YOLOv8s inference for on-device detection.
- Robust detection filtering (min-detections + EWMA smoothing) to avoid jitter.
- OFFBOARD velocity control mapping (pixel error → velocity) with safety fallbacks.
- Hardware-in-the-loop (HIL) tested: laptop (PX4 SITL + Gazebo) ↔ RPi5 (inference + autonomy).
ROS 2 Jazzy package implementing a vision-assisted autonomous payload-drop system for Aerothon 2025 by Team AeroHades (CUSAT).
PX4 executes a pre-planned AUTO.MISSION. A Raspberry Pi 5 running a Hailo-8L accelerator detects a white cylindrical target using a custom YOLOv8s model. When detected, the autonomy stack:
- Interrupts the mission.
- Aligns above the target using vision-based velocity control (OFFBOARD).
- Descends to a configured drop altitude.
- Releases payload.
- Performs RTL (default) or mission resume (parameter controlled).
Note: Early prototypes used landing behavior purely for testing.
The final system performs hover + descend + payload drop, not landing.
- `hades_lander/` — final ROS 2 package (vision node + autonomy node)
- `config/` — MAVROS configuration + future parameters
- `launch/` — launch file for running the nodes
- `archive/` — early monolithic prototypes (v0–v3); kept for history
- `docs/` — system architecture + images/GIFs (expanded later)
- `models/` — notes about
.hefmodel usage (no model files included) - `test/` — optional style/tests from ROS package template
- Hailo-accelerated YOLOv8s target detection
- OFFBOARD velocity control for alignment + descent
- Mission interruption logic (AUTO.MISSION → OFFBOARD → RTL/Resume)
- Supports Hardware-in-the-Loop (HIL) testing
- Cleanly documented evolution (archive v0 → v3 → final ROS2 architecture)
- Ubuntu 24.04 (RPi5)
- ROS 2 Jazzy
- Python 3.12
- PX4 v1.17 (SITL + real flight controller)
- Gazebo Harmonic
- QGroundControl
Tested with:
- HailoRT 4.22.0
- TAPPAS Core 5.0.0
- GStreamer plugins:
hailonet,hailofilter,hailotracker, … - Python binding:
hailo-tappas-core-python-binding 5.0.0 - Dev utilities:
hailo-apps 25.7.0
This repo does not include .hef files or installation instructions.
See models/README.md for how to use your own model.
- PX4 flies GPS-based search mission
- YOLOv8s (Hailo) detects target via downward camera
- Companion switches PX4 to OFFBOARD
- Drone aligns over target
- Drone descends to drop altitude
- Payload released
- RTL or mission resume
Laptop
- PX4 SITL 1.17
- Gazebo Harmonic
- MAVROS
- Camera plugin publishes
/camera/image_raw
RPi5
- ROS 2 Jazzy
hades_landerpackage- Hailo inference running YOLOv8s
.hef - Publishes OFFBOARD velocities to PX4
This enables full autonomy-loop testing with real inference timing.
This setup involves a Laptop (running the simulation) and a Raspberry Pi 5 (running inference and autonomy) connected over the same network.
Before running the stack, ensure the following conditions are met:
-
Network Connectivity: Ensure both the Laptop and Raspberry Pi 5 can communicate over the network (check
ROS_DOMAIN_IDand firewall settings if topics are missing). -
QGC Mission: A valid search mission must be uploaded via QGroundControl prior to takeoff.
cd ~/hades_ws
colcon build --packages-select hades_lander
source install/setup.bashTerminal 1: PX4 SITL
# Launches PX4 with a downward-facing camera in the Baylands world
make px4_sitl gz_x500_mono_cam_down_baylandsTerminal 2: MAVROS
# Start the telemetry link to bridge PX4 and ROS 2
ros2 launch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557"Terminal 3: Gazebo ROS 2 Bridge
# Bridge the specific camera sensor to ROS 2 topics
ros2 run ros_gz_bridge parameter_bridge \
/world/baylands/model/x500_mono_cam_down_0/link/camera_link/sensor/camera/image@sensor_msgs/msg/Image@gz.msgs.Image \
--ros-args --remap \
/world/baylands/model/x500_mono_cam_down_0/link/camera_link/sensor/camera/image:=/camera/image_rawNote: Camera topics depend on the Gazebo world and model. Use
gz topic -land adapt the bridge command accordingly.
Terminal 4: Vision Node (Hailo-8L)
# Runs YOLOv8s inference on the Hailo accelerator
ros2 run hades_lander vision_node \
--ros-args \
-p hades_vision.hef_path:=/home/nyx/yolov8s_circle.hef \
-p hades_vision.class_labels:="['object1','object2']" \
-p hades_vision.target_name:='object1'Terminal 5: Autonomy Node
# Manages the mission state machine
ros2 run hades_lander bullseye_lander_nodeMonitor these topics in a separate terminal to verify system health:
- `/bullseye/debug_image` — Visual confirmation of detections (Open with `rqt_image_view`).
- `/bullseye/pixel_error` — Real-time alignment offset (x, y) data.
- `/mavros/state` — Verify FCU connection and current flight mode.
For field operations where all nodes run locally on the RPi5, use the optimized launch file:
ros2 launch hades_lander hades_launch.pyAutonomous drone operation is hazardous.
Use only:
- in controlled environments
- with RC override
- with proper PX4 failsafes
- in compliance with UAV laws
This software is for research/education only.
- Team AeroHades (CUSAT) – Aerothon 2025
- Autonomy software, HIL setup, system integration:
Gautham P Sankar - YOLO model training / dataset preparation:
Hridik A D
Karun Santhosh
MIT License — see LICENSE.
- Custom-trained YOLOv8s model converted to a Hailo
.hefbinary. - Inference executed on the Raspberry Pi 5 using the Hailo-8L accelerator.
- Post-processing integrates geometric validation to reduce false positives.
- A stabilizing EWMA filter and minimum-detections threshold ensure reliable lock-on before alignment begins.
The mission logic is implemented as a deterministic finite-state machine:
- SEARCH: PX4 flies a preplanned mission (AUTO.MISSION).
- DETECT: Vision node finds the cylindrical target.
- INTERRUPT: Autonomy stack switches PX4 to OFFBOARD mode.
- ALIGN: Pixel error is converted into body-frame velocity commands (proportional control + yaw compensation).
- DESCENT: Controlled vertical descent to a configured drop altitude.
- DROP: Payload release is triggered by software.
- RESUME/RTL: Depending on user parameter, PX4 resumes the mission or returns to launch.
- Image-space pixel error (dx, dy) is mapped to body-frame velocities.
- Converted to world-frame via real-time yaw from PX4 odometry.
- Velocity is saturated and filtered to prevent oscillations or aggressive corrections.
- Descent is independently regulated with a proportional Z-controller.
- Time-based “lost-target” counter returns PX4 to AUTO.MISSION if detection is unstable.
- OFFBOARD mode is only commanded when the vehicle is armed and stable.
- Payload drop occurs only at safe altitude and stable alignment.
- PX4 SITL + Gazebo Harmonic on laptop.
- RPi5 running ROS2 Jazzy + Hailo inference stack.
- Camera stream forwarded from SITL → RPi for inference.
- OFFBOARD velocity commands returned back to PX4 via MAVROS.
Below is a high-level view of the simulation + perception pipeline during HIL test.
Gazebo runs PX4 SITL and publishes the camera stream via a ROS Bridge, which is forwarded(only during testing) to the Raspberry Pi 5 for Hailo-accelerated inference and autonomy execution.
The vision stack performs real-time detection of the target using a Hailo-accelerated YOLOv8s model.
A geometric verification step validates the bounding box, and pixel error is computed for alignment.
The autonomy node logs each major state transition, including when detection becomes stable, OFFBOARD mode begins, alignment thresholds are met, and payload drop is executed.
PX4 flight review shows the corresponding mode transitions:
AUTO.MISSION → LOITER → OFFBOARD → RETURN (post-drop).
Note: This project was validated through extensive HIL simulation. Hardware deployment at Aerothon 2025 encountered environmental challenges, but the software architecture and simulation results demonstrate production-ready autonomous flight capabilities.
The project was validated in a hardware-in-the-loop workflow:
PX4 SITL + Gazebo run on a laptop, while the Raspberry Pi 5 executes perception + autonomy.
Key Metrics:
- Inference: 25fps YOLOv8s on Raspberry Pi 5 with Hailo-8L acceleration
- Control: 50Hz velocity commands with <2cm alignment accuracy in simulation
- Latency: Sub-100ms end-to-end (camera → inference → control command)
- Reliability: Zero crashes across 50+ HIL test flights
The screenshot below shows the real test bench.





