Skip to content

Repository files navigation

Drone Autonomy Platform

CI License ROS2 Platform

Autonomous drone platform built on ROS2 Humble and NVIDIA Isaac ROS. Runs real-time RF-DETR object detection and visual SLAM on a Jetson Orin Nano with a Luxonis OAK-D camera, communicating with a Pixhawk 6X flight controller over MAVLink. Focus is on partially autonomous civilian missions only (surveying and agricultural autonomy applications).


Physical Architecture

  GROUND STATION                          RC CONTROLLER
┌───────────────────────────┐       ┌───────────────────────┐
│  Laptop (QGroundControl)  │       │   RadioMaster Boxer   │
│  ┌─────────┐  ┌─────────┐│        │       (ELRS TX)       │
│  │ Mission │  │  Video  ││        └───────────┬───────────┘
│  │ Planner │  │ Display ││                    │
│  └─────────┘  └─────────┘│                    │ ELRS 2.4 GHz
└──────┬─────────────┬──────┘                   │
       │             │                          │
  MAVLink 433 MHz    │ WiFi / WFB-ng            │
       │             │ (video downlink)         │
═══════╪═════════════╪══════════════════════════╪════  AIR
       │             │                          │
┌──────┴─────────────┴──────────────────────────┴──────────┐
│  DRONE                                                   │
│                                                          │
│  ┌─────────────────────────────────────────────────────┐ │
│  │  Jetson Orin Nano                                   │ │
│  │  ┌────────────────────┐                             │ │
│  │  │    ROS2 Humble     │                             │ │
│  │  │    (7 packages)    │                             │ │
│  │  └─────────┬──────────┘                             │ │
│  │       USB 3.1│                                      │ │
│  │  ┌─────────┴──────────┐                             │ │
│  │  │   OAK-D Camera     │                             │ │
│  │  │   RGB + Stereo     │                             │ │
│  │  │   + IMU            │                             │ │
│  │  └────────────────────┘                             │ │
│  └──────────┬──────────────────────────────────────────┘ │
│         UART│(Telem 2)                                   │
│  ┌──────────┴──────────────────────────────────────────┐ │
│  │  Pixhawk 6X (PX4)                                   │ │
│  │    ├── Telem 1 ──▶ SiK 433 MHz antenna              │ │
│  │    ├── Telem 2 ──▶ Jetson Orin companion link       │ │
│  │    ├── Telem 3 ◀── R88 ELRS receiver (CRSF)         │ │
│  │    ├── GPS     ◀── GPS module + antenna             │ │
│  │    └── PWM Out ──▶ ESCs ──▶ Motors (x4)             │ │
│  └─────────────────────────────────────────────────────┘ │
│                                                          │
│  WiFi antenna (Jetson) ──▶ video downlink to GCS         │
└──────────────────────────────────────────────────────────┘

Software Architecture

ROS2 Packages

src/
├── perception/      OAK-D → RF-DETR detection + cuVSLAM odometry (Jetson only)
├── navigation/      Path planning, SLAM, localization (Nav2)
├── control/         Trajectory tracking, MAVROS bridge to Pixhawk
├── autonomy/        Mission logic, behavior trees
├── communication/   MAVLink telemetry, GCS interface
├── safety/          Geofence, failsafe, battery monitor, watchdog
├── mapping/         survey_recorder_node — camera + time-synced pose to a DES-004 dataset
└── common/          Shared headers

The offboard/dual-target photogrammetry reconstruction pipeline (WP-3) lives at tools/photogrammetry — it is not a ROS package; see tools/photogrammetry/README.md.

Perception Pipeline (Jetson Orin)

OAK-D Camera                     Jetson Orin
┌──────────┐      /oak/rgb/image_raw     ┌──────────────┐      /detections
│ depthai  │────────────────────────────▶│ RF-DETR-S    │────────────────────┐
│ _ros_    │                             │ TensorRT     │                    │
│ driver   │                             │ inference    │                    ▼
└────┬─────┘                             └──────────────┘          ┌──────────────────┐
     │                                                            │  perception_node │
     │ /oak/left/image_raw                                        │  (sensor fusion) │
     │ /oak/right/image_raw                                       └──────────────────┘
     │ /oak/imu/data
     │
     └────────────────────────────────────────────────────────────▶┌──────────────┐
                                                (stereo + IMU)    │   cuVSLAM    │
                                                                  │ Visual SLAM  │
                                                                  └──────────────┘

Node Topics

                    ┌──────────────────┐
  OAK-D ──────────▶│ perception_node  │──▶ ~/sensor_data
  /detections ────▶│                  │
                    └──────────────────┘

                    ┌──────────────────┐
  /mission ───────▶│ navigation_node  │──▶ /trajectory
                    └──────────────────┘

                    ┌──────────────────┐
  /trajectory ────▶│  control_node    │──▶ /attitude_command
                    └──────────────────┘

                    ┌──────────────────┐
  /attitude_command▶│ communication    │──▶ (GCS/MAVLink bridge — planned)
  /mavros/* ───────▶│     _node        │
  /safety_status ──▶│                  │
                    └──────────────────┘

                    ┌──────────────────┐
  /mavros/state ──▶│  safety_node     │──▶ /safety_status
                    └──────────────────┘

                    ┌──────────────────┐
  /mavros/battery ▶│ battery_monitor  │──▶ RTL via /mavros/set_mode
                    └──────────────────┘

                    ┌──────────────────┐
  /survey_request ─▶│ autonomy_node   │──▶ /mission
                    │ (BehaviorTree)  │    /mission_status (reliable, transient_local)
                    └──────────────────┘

                    ┌──────────────────┐
  /oak/rgb/image ──▶│ survey_recorder  │──▶ /data/surveys/<id>/
  /mavros pose+fix ▶│      _node       │    (DES-004 dataset)
  /mission(+status)▶│                  │
                    └──────────────────┘

Message definitions: msgs/ros2 (drone_autonomy_msgs)


Capabilities & Roadmap

Mission-level capabilities are engineered through three nested loops (capability → system → implementation) documented in CLAUDE.md, CONTRIBUTING.md, and .claude/skills/. Each capability has a stakeholder requirement, a target architecture with a machine-checked gap report, and a work-package implementation plan.

Capability Stakeholder req Status Artifacts
CAP-001 — Visual Photogrammetry / Survey Mapping STK-1 WP-1/WP-2 merged, WP-3 in PR #26 — WP-1 (survey mission + coverage trajectory) and WP-2 (survey_recorder_node) merged; WP-3 (dual-target photogrammetry pipeline) in PR #26 — gap 18/18 target elements present with WP-3; WP-4 (e2e validation) remaining capability doc · implementation plan · test plan · gap report

CAP-001 adds a survey mission type and coverage trajectory generator (WP-1), an onboard survey_recorder_node in a new src/mapping package (WP-2), a dual-target tools/photogrammetry reconstruction pipeline — runs on the ground station and on the Orin companion for a ≤15 min post-flight consistency check and onboard reconstruction (WP-3) — and end-to-end validation (WP-4). Design decisions are fixed in DES-003/004/005; src/mapping has landed (WP-2), and tools/photogrammetry lands with WP-3 (PR #26).


Quick Start

x86 Development (Docker)

git clone https://github.com/Darainer/drone_autonomy_platform.git
cd drone_autonomy_platform

# Build — includes all packages except perception runtime deps
docker build -t drone_autonomy_platform .

# Launch core stack (no Jetson required)
docker run -it --rm drone_autonomy_platform \
  ros2 launch /ws/src/drone_autonomy_platform/launch/platform_core.launch.py

Jetson Orin (Full Stack)

# Build with Isaac ROS dev container
docker build -f docker/Dockerfile.dev -t drone_dev .

# Generate TensorRT engine (once per device)
# See docs/architecture/perception_architecture.md for details

# Launch full platform with perception
docker run -it --rm --privileged --network host \
  --runtime nvidia -e NVIDIA_VISIBLE_DEVICES=all \
  --device /dev/ttyUSB0 \
  drone_dev \
  ros2 launch /ws/src/drone_autonomy_platform/launch/platform.launch.py

Perception Launch Modes

The perception package exposes three Jetson launch modes:

# 1. Perception only: OAK-D RGB + RF-DETR + perception_node
ros2 launch perception perception_only.launch.py

# 2. VSLAM only: OAK-D stereo/IMU + cuVSLAM
ros2 launch perception vslam_only.launch.py

# 3. Full stack: RF-DETR + cuVSLAM + perception_node
ros2 launch perception full_stack.launch.py

For live annotated output during perception-only runs:

ros2 launch perception detection_viz.launch.py

Development Loop

docker run -it --rm \
  -v $(pwd):/ws/src/drone_autonomy_platform \
  drone_autonomy_platform bash

# Inside the container:
cd /ws && colcon build --merge-install \
  --base-paths src/drone_autonomy_platform/msgs src/drone_autonomy_platform/src \
  --packages-ignore common \
  --cmake-args -DBUILD_TESTING=OFF
source install/setup.bash
ros2 launch launch/platform_core.launch.py

Project Structure

drone_autonomy_platform/
├── Dockerfile                 # x86 build (ros:humble, all packages except perception runtime)
├── docker/
│   ├── Dockerfile.dev         # Jetson Orin build (Isaac ROS + OAK-D + MAVROS)
│   ├── docker-compose.yml     # Agent workforce (Temporal + workers)
│   └── local-agent/           # Local Ollama LLM for agent dev
├── src/                       # ROS2 packages (see above)
├── msgs/                      # Custom message definitions (SensorData, Mission, etc.)
├── launch/
│   ├── platform.launch.py     # Full platform (Jetson — includes perception/full_stack.launch.py)
│   └── platform_core.launch.py # Core stack (x86/CI — excludes perception)
├── agents/                    # AI agent workforce (Temporal-based)
├── scripts/                   # submit_task.py, traceability/gap/C4 checkers
└── docs/
    ├── requirements/          # StrictDoc requirements (single source of UIDs)
    ├── capabilities/          # Capability docs + implementation plans (CAP-*)
    ├── architecture/          # Architecture docs, target specs, generated C4 views
    ├── design/                # Design docs (DES-*)
    ├── test_plans/            # Test plans (TP-*) with Verifies: linkage
    └── reports/               # Generated traceability matrix, gap reports

Notes on Perception

The perception_node binary builds on x86 — it only depends on rclcpp, sensor_msgs, vision_msgs, and drone_autonomy_msgs. The full Jetson perception stack (RF-DETR TensorRT, cuVSLAM, depthai_ros_driver) runs only on Jetson Orin. These are declared as exec_depend in package.xml so the package compiles anywhere but launches fully only on Jetson.

See docs/architecture/perception_architecture.md for model selection, TensorRT engine generation, and latency analysis.

Hardware Reference

Full frame specs, wiring, power system, and antenna placement are in docs/architecture/drone_hardware.md. Telemetry and video downlink details are in docs/architecture/telemetry.md. PX4 flight-controller port assignments and companion-link parameters are in docs/architecture/px4_setup.md.

Component Spec
Frame Tarot 650 Sport
Autopilot Pixhawk 6X — PX4
Companion Jetson Orin Nano (JetPack 6.x)
Camera Luxonis OAK-D (USB 3.1)
RC RadioMaster Boxer + R88 (ELRS)
Telemetry SiK V3 433 MHz
Battery 6S 10,000 mAh LiPo

License

Apache 2.0 — see LICENSE

About

AI-powered drone autonomy development platform with Claude agent workforce for safety-critical UAV software development

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages