AI News HubLIVE
In-site rewrite6 min read

Show HN: Aerial-autonomy-stack – open-source perception-based drone swarms

Aerial-autonomy-stack (AAS) is an open-source, batteries-included software stack for developing, simulating, and deploying multi-drone autonomy. It supports ROS2, PX4, and ArduPilot, integrates YOLO and 3D LiDAR for perception and control, and can be deployed on NVIDIA Jetson. The project provides detailed installation guides, multi-drone simulation environments with various 3D worlds, Gazebo physics, Docker support, and a Gymnasium reinforcement learning interface.

SourceHacker News AIAuthor: SufficientFix42

Notifications You must be signed in to change notification settings

Fork 89

Star 500

BranchesTags

Open more actions menu

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

1,117 Commits

1,117 Commits

.github/workflows

.github/workflows

aas-gym

aas-gym

aircraft

aircraft

ground

ground

simulation

simulation

tools_and_docs

tools_and_docs

.dockerignore

.dockerignore

.gitignore

.gitignore

LICENSE

LICENSE

README.md

README.md

Repository files navigation

Aerial autonomy stack (AAS) is a batteries included software stack to:

Develop multi-drone autonomy—with ROS2, PX4, and ArduPilot

Simulate faster-than-real-time perception and control—with YOLO and 3D LiDAR

Deploy in real drones—with JetPack, DeepStream, and NVIDIA Orin

For an example bill of materials, read BOM.md; for motivation, read RATIONALE.md

aerial-autonomy-stack-v3.mp4

Features (click to expand)

PX4 and ArduPilot multi-vehicle simulation (quadrotors and VTOLs)

ROS2 action-based autopilot interface (via XRCE-DDS or MAVROS)

YOLO (with ONNX GPU Runtimes) and LiDAR Odometry (with KISS-ICP)

3D worlds for perception-based simulation

Steppable Gymnasium environment and faster-than-real-time, multi-instance simulation

Gazebo's wind effects and waves plugins

Dockerized simulation based on Ubuntu with CUDA and cuDNN

Dockerized deployment based on NVIDIA JetPack with DeepStream

Windows 11 compatibility via WSL

Multi-Jetson-in-the-loop (HITL) simulation to test NVIDIA- and ARM-based on-board compute

Dual network to separate simulated sensors (SIM_SUBNET) and inter-vehicle comms (AIR_SUBNET)

Zenoh inter-vehicle ROS2 bridge

PX4 Offboard interface (e.g. CTBR/VehicleRatesSetpoint for agile, GNSS-denied flight)

ArduPilot Guided interface (i.e. setpoint_velocity, setpoint_accel references)

Logs analysis with flight_review (.ulg), MAVExplorer (.bin), and PlotJuggler (rosbag)

  1. Installation

AAS is developed on Ubuntu 24.04 with nvidia-driver-580 using an i7-11 with 16GB RAM and RTX 3060

Read REQUIREMENTS_UBUNTU.md (or REQUIREMENTS_WSL.md for Windows 11) to install the requirements

sudo apt update && sudo apt install -y git xterm xfonts-base wget unzip git clone https://github.com/JacopoPan/aerial-autonomy-stack.git && cd aerial-autonomy-stack/tools_and_docs/ ./tests/check_requirements.sh # AAS requires nvidia-driver-580, docker, and nvidia-container-toolkit ./sim_build.sh # The 1st build takes ~45' with good internet (Ctrl + c and restart if needed, cached stages will be preserved)

ghcr.io pre-built images (click to expand)

ghcr.io images are re-built from main every Friday night

for name in aircraft ground simulation; do docker pull ghcr.io/jacopopan/${name}-image:latest docker tag ghcr.io/jacopopan/${name}-image:latest ${name}-image:latest done

  1. Multi-drone Simulation

Start AAS:

cd aerial-autonomy-stack/tools_and_docs/ AUTOPILOT=px4 NUM_QUADS=1 NUM_VTOLS=1 WORLD=swiss_town HEADLESS=false RTF=3.0 ./sim_run.sh # Start a simulation, check the script for more options (note: ArduPilot SITL checks take ~30s of simulated time before being ready to arm)

There are 3 main ways to autonomously fly the drones (plus QGroundControl for operator supervision)

From the Ground's Xterm terminal, fly all drones in a synchronized formation with dtc_controller_node:

ros2 run drone_traffic_controller dtc_controller --ros-args -p use_sim_time:=true

From any QUAD/VTOL Xterm terminal, fly a behavior tree mission (e.g., yalla.yaml):

ros2 run mission mission --conops yalla.yaml --ros-args -r __ns:=/Drone$DRONE_ID -p use_sim_time:=true

From any QUAD/VTOL Xterm terminal, use ROS2 actions for px4_offboard/ardupilot_guided:

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/takeoff_action \ autopilot_interface_msgs/action/Takeoff '{takeoff_altitude: 30.0}'"

Press Enter to cancel the action or regain the terminal when it finishes

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/offboard_action \ autopilot_interface_msgs/action/Offboard \ '{controller_name: att-test, max_duration_sec: 10.0}'"

Add or re-implement offboard controllers in px4_offboard.cpp, ardupilot_guided.cpp

./sim_run.sh options:

  • AUTOPILOT=px4, ardupilot
  • HEADLESS/CAMERA/LIDAR=true, false
  • NUM_QUADS/NUM_VTOLS=0, 1, ...
  • WORLD=impalpable_greyness, apple_orchard, shibuya_crossing, swiss_town, waterworld
  • RTF=1.0, 2.0, ... (real-time-factor, use 0.0 for "as fast as possible)
  • INSTANCE=0, 1, ... (integer ID to run multiple parallel simulations)

WORLDs: (i) apple_orchard, a GIS world created using BlenderGIS / (ii) impalpable_greyness, an empty world with simple shapes / (iii) shibuya_crossing, a 3D world adapted from cgtrader / (iv) swiss_town, a photogrammetry world courtesy of Pix4D / pix4d.com / (v) waterworld, a dynamic world using the asv_wave_sim wave plugin

Tip

Edit sensor_config.yaml, then run sim_build.sh, to customize the sensor parameters

Use ROS2 drone and gimbal control primitives from CLI (click to expand)

Takeoff action (quads and VTOLs)

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/takeoff_action autopilot_interface_msgs/action/Takeoff '{takeoff_altitude: 40.0, vtol_transition_heading: 330.0, vtol_loiter_nord: 200.0, vtol_loiter_east: 100.0, vtol_loiter_alt: 120.0}'"

Land (at home) action (quads and VTOLs)

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/land_action autopilot_interface_msgs/action/Land '{landing_altitude: 60.0, vtol_transition_heading: 60.0}'"

Orbit action (quads and VTOLs)

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/orbit_action autopilot_interface_msgs/action/Orbit '{east: 500.0, north: 0.0, altitude: 150.0, radius: 200.0}'"

Reposition service (quads only)

ros2 service call /Drone${DRONE_ID}/set_reposition autopilot_interface_msgs/srv/SetReposition '{east: 50.0, north: 100.0, altitude: 60.0}'

Offboard action (Specify the flight behavior via controller_name, e.g., "traj-test" for PX4 or "vel-test" for ArduPilot)

cancellable_action "ros2 action send_goal /Drone${DRONE_ID}/offboard_action autopilot_interface_msgs/action/Offboard '{controller_name: traj-test, max_duration_sec: 5.0}'"

SetSpeed service (always limited by the autopilot params, for quads applies from the next command, not effective on ArduPilot VTOLs)

ros2 service call /Drone${DRONE_ID}/set_speed autopilot_interface_msgs/srv/SetSpeed '{speed: 3.0}'

Gimbal status and position control (in radians)

ros2 topic echo /gimbal_state ros2 topic pub -1 /gimbal_pitch_cmd std_msgs/msg/Float64 "{data: 1.57}"

To analyze the flight logs, in the Simulation's Xterm terminal:

/aas/simulation_resources/scripts/plot_logs.sh # Analyze the flight logs at http://10.42.90.100:5006/browse or in MAVExplorer

Add or disable wind effects, in the Simulation's Xterm terminal (click to expand)

python3 /aas/simulation_resources/scripts/gz_wind.py --from_west 0.0 --from_south 3.0 python3 /aas/simulation_resources/scripts/gz_wind.py --stop_wind

Develop within live containers (click to expand)

Launching the sim_run.sh script with DEV=true, does not start the simulation and mounts folders [aircraft|ground|simulation]_resources, [aircraft|ground]_ws/src as volumes to more easily track, commit, push changes while building and testing them within the containers:

cd aerial-autonomy-stack/tools_and_docs/ DEV=true ./sim_run.sh # Starts one simulation-image, one ground-image, and one aircraft-image where the *_resources/ and *_ws/src/ folders are mounted from the host

To build changes—made on the host—in the Ground or QUAD Xterm terminal:

cd /aas/aircraft_ws/ # Or cd /aas/ground_ws/ colcon build --symlink-install

To start the simulation, in the QUAD Xterm terminal:

tmuxinator start -p /aas/aircraft.yml.erb

In the Ground Xterm terminal:

tmuxinator start -p /aas/ground.yml.erb

In the Simulation Xterm terminal:

tmuxinator start -p /aas/simulation.yml.erb

To end the simulation, in each terminal detach Tmux with Ctrl + b, then d; kill all lingering processes with tmux kill-server && pkill -f gz

  1. Deployment on Jetson

AAS is tested on a Holybro Jetson Baseboard with Pixhawk 6X and NVIDIA Orin NX 16GB

The default quad is a Holybro X650 with the IMX219 camera and the Livox Mid-360S LiDAR

Read SETUP_AVIONICS.md and BOM.md to setup the requirements on the Jetson and configure the Pixhawk

Read SETUP_CHRONY.md to let the Jetson timesync to the ground-image computer when w/o internet

sudo apt update && sudo apt install -y git git clone https://github.com/JacopoPan/aerial-autonomy-stack.git && cd aerial-autonomy-stack/tools_and_docs/ ./deploy_build.sh # Build for arm64, on Jetson Orin NX the first build takes ~50', including building onnxruntime-gpu with TensorRT support from source

On a Jetson Orin, start the aircraft-image:

cd aerial-autonomy-stack/tools_and_docs/ AUTOPILOT=px4 DRONE_ID=1 CAMERA=true LIDAR=false AIR_SUBNET=10.223 HEADLESS=true ./deploy_run.sh

The 1st run of ./deploy_run.sh requires ~10' to build the FP16 TensorRT cache

./deploy_run.sh options:

  • DRONE_TYPE=quad, vtol
  • AUTOPILOT=px4, ardupilot
  • DRONE_ID=1, 2, ... (ROS_DOMAIN_ID of the drone, matching the MAV_SYS_ID/SYSID_THISMAV of the autpilot)
  • HEADLESS/CAMERA/LIDAR=true, false

On a laptop, start the ground-image (QGC, Zenoh, SSH, and GStreamer):

cd aerial-autonomy-stack/tools_and_docs/ ./sim_build.sh # Build all images for amd64, including ground-image GROUND=true NUM_QUADS=1 AIR_SUBNET=10.223 HEADLESS=false ./deploy_run.sh

HITL Simulation (click to expand)

Note: HITL simulation validates the Jetson compute and the inter-vehicle network. Use USB2.0 ASIX Ethernet adapters to add multiple network interfaces to the Jetson baseboards

Set up a LAN on an arbitrary SIM_SUBNET with netmask 255.255.0.0 (e.g. 172.30.x.x) between:

One simulation computer, with IP [SIM_SUBNET].90.100

One ground computer, with IP [SIM_SUBNET].90.101

N Jetson Baseboards with IPs [SIM_SUBNET].90.1, ..., [SIM_SUBNET].90.N

Optionally, set up a second LAN :AIR_SUBNET with netmask 255.255.0.0 (e.g. 10.223.x.x) between:

One ground computer, with IP [AIR_SUBNET].90.101

N Jetson Baseboards with IPs [AIR_SUBNET].90.1, ..., [AIR_SUBNET].90.N

First, start all aircraft containers, one on each Jetson (e.g. via SSH):

On the Jetson with IPs ending in 90.1

HITL=true DRONE_ID=1 SIM_SUBNET=172.30 AIR_SUBNET=10.223 ./deploy_run.sh # Add HEADLESS=false if a screen is connected to the Jetson

On the Jetson with IPs ending in 90.2

HITL=true DRONE_ID=2 SIM_SUBNET=172.30 AIR_SUBNET=10.223 ./deploy_run.sh # Add HEADLESS=false if a screen is connected to the Jetson

Then, start the simulation:

On the computer with IPs ending in 90.100

HITL=true NUM_QUADS=2 SIM_SUBNET=172.30 ./sim_run.sh

Finally, start QGC and the Zenoh bridge:

On the computer with IPs ending in 90.101

HITL=true GROUND=true NUM_QUADS=2 AIR_SUBNET=10.223 HEADLESS=false ./deploy_run.sh

Note: running only the first 3 commands with GND_CONTAINER=false puts the Zenoh bridge on the SIM_SUBNET, removing the need for the optional AIR_SUBNET and the computer with IP ending in 90.101

Once done, detach Tmux (and remove the containers) with Ctrl + b, then d

  1. Gymnasium RL Environment

Using a Python venv or a conda environment is optional but recommended (click to expand)

wget https://repo.anaconda.com/archive/Anaconda3-2025.12-2-Linux-x86_64.sh # Or a newer version in https://repo.anaconda.com/archive/ bash Anaconda3-2025.12-2-Linux-x86_64.sh # Install; start a new terminal conda config --set auto_activate_base false # Turn off auto initialization of (base); start a new terminal conda update --all -n base -c defaults # Update to the latest conda version conda create -n aas python=3.12 # Latest Python version beyond "bugfix" status https://devguide.python.org/versions/

Install the aas-gym package (after completing the steps in "In

[truncated for AI cost control]