Skip to content
/ Dronoid Public

Drones that understand natural language - Open-source drone OS with NL control for autonomous facade cleaning

Notifications You must be signed in to change notification settings

enving/Dronoid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš Dronoid - Drones that Understand Natural Language

Vision: Open-source drone operating system with natural language control and computer vision for autonomous facade cleaning.

๐ŸŽฏ Project Goals

  1. Universal Drone OS - Hardware-agnostic system that auto-detects sensors/actuators
  2. Natural Language Control - Fly drones with plain text commands ("takeoff to 10m", "land")
  3. Facade Cleaning - Autonomous dirt detection and cleaning with mounted water system
  4. Simulation First - Test everything in PX4 SITL + Gazebo before hardware deployment
  5. Budget-Friendly - Start with cheap components ($50-200), scalable to industrial ($$$)

โœจ Features

  • ๐Ÿ—ฃ๏ธ Natural Language Interface: Control drone with text commands (English/German)
    • "takeoff" / "abheben"
    • "fly up to 10m" / "fliege hoch auf 10m"
    • "land" / "landen"
  • ๐Ÿค– PX4 SITL Integration: Full simulation environment with Gazebo
  • ๐Ÿ”Œ ROS2 Bridge: DDS communication for advanced features
  • ๐ŸŽฏ Vision-Ready: Prepared for VLM integration (Wall-X, TinyML)
  • ๐Ÿ“ฆ Plug & Play: YAML-based hardware configuration

โšก TL;DR - Fastest Start

git clone https://github.com/enving/Dronoid.git
cd Dronoid
./setup_dependencies.sh  # Download PX4, build deps (~5 min)
./px4-client             # Auto-starts everything!

Type takeoff and watch your drone fly! ๐Ÿš


๐Ÿš€ Quick Start (5 Minutes)

1. Install Dependencies

# Install ROS2 Jazzy (if not already installed)
sudo apt update
sudo apt install -y ros-jazzy-desktop

# Install PX4 dependencies
sudo apt install -y \
    python3-pip \
    git \
    wget \
    gnutls-bin \
    openjdk-11-jre-headless \
    gz-harmonic

# Install Python packages
pip3 install --break-system-packages \
    pymavlink \
    python-dotenv \
    requests \
    kconfiglib \
    pyros-genmsg \
    packaging \
    toml \
    numpy \
    jinja2

# Or use requirements.txt:
pip3 install --break-system-packages -r requirements.txt

2. Clone and Setup

git clone https://github.com/YOUR_USERNAME/Dronoid.git
cd Dronoid

# Download dependencies (PX4, DDS Agent, etc.)
chmod +x setup_dependencies.sh
./setup_dependencies.sh

3. Start the Drone System

./start_drone.sh

This will:

  • Start PX4 SITL (Software In The Loop)
  • Launch Gazebo Harmonic simulator
  • Spawn X500 quadcopter drone
  • Wait for "Ready for takeoff!" message

4. Control the Drone

Easy Mode (auto-starts PX4 if needed):

./px4-client

Manual Mode:

# Make sure PX4 is running first
./start_drone.sh

# Then start control
python3 nl_drone.py

Then type natural language commands:

  • takeoff - Take off to 5m altitude
  • takeoff to 10m - Take off to 10m
  • fly up / abheben - Take off (German)
  • land / landen - Land the drone
  • q - Quit

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Natural Language Interface          โ”‚
โ”‚  (nl_drone.py)                      โ”‚
โ”‚  โ€ข Text parsing (Regex/Cloud LLM)   โ”‚
โ”‚  โ€ข Bilingual support (EN/DE)        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ MAVLink UDP
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PX4 Autopilot (SITL)               โ”‚
โ”‚  โ€ข Flight controller firmware       โ”‚
โ”‚  โ€ข MAVLink communication            โ”‚
โ”‚  โ€ข UDP Port 14580 (Offboard API)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ Gazebo Bridge
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Gazebo Harmonic Simulator          โ”‚
โ”‚  โ€ข Physics simulation               โ”‚
โ”‚  โ€ข X500 quadcopter model            โ”‚
โ”‚  โ€ข 3D visualization                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ROS2 Integration (Future)          โ”‚
โ”‚  โ€ข Micro-XRCE-DDS-Agent             โ”‚
โ”‚  โ€ข px4_msgs                         โ”‚
โ”‚  โ€ข dronecore package                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

Humanoid/
โ”œโ”€โ”€ README.md                       # This file
โ”œโ”€โ”€ start_drone.sh                  # Quick start script
โ”œโ”€โ”€ nl_drone.py                     # Natural language control
โ”œโ”€โ”€ control_drone.py                # Numeric menu control
โ”œโ”€โ”€ quick_test.sh                   # PX4 + Gazebo launcher
โ”‚
โ”œโ”€โ”€ PX4-Autopilot/                  # PX4 firmware (v1.15.4)
โ”‚   โ”œโ”€โ”€ Tools/simulation/gz/        # Gazebo models & worlds
โ”‚   โ””โ”€โ”€ build/px4_sitl_default/     # Build artifacts (git ignored)
โ”‚
โ”œโ”€โ”€ Micro-XRCE-DDS-Agent/           # ROS2 โ†” PX4 bridge
โ”‚   โ””โ”€โ”€ build/                      # Build artifacts (git ignored)
โ”‚
โ”œโ”€โ”€ px4_msgs/                       # ROS2 message definitions
โ”œโ”€โ”€ dronecore/                      # ROS2 control package
โ”‚   โ”œโ”€โ”€ drone_commander.py          # ROS2 node for commands
โ”‚   โ””โ”€โ”€ nl_bridge.py                # FastAPI HTTP server
โ”‚
โ””โ”€โ”€ old_docs/                       # Legacy documentation

๐ŸŽฎ Control Methods

1. Natural Language (Recommended)

python3 nl_drone.py

Text commands with intelligent parsing.

2. Numeric Menu

python3 control_drone.py

Simple 1-4 menu for basic commands.

3. ROS2 Commands (Advanced)

# Build dronecore package first
cd dronecore && colcon build
source install/setup.bash

# Launch ROS2 nodes
ros2 run dronecore drone_commander

๐Ÿง  Natural Language Processing

Dronoid supports two modes for understanding your commands:

1. Regex Parser (Default - Lightweight)

  • โšก Fast: Instant response
  • ๐Ÿ’ป No internet needed: Works offline
  • ๐Ÿชถ Lightweight: No ML model, runs on any hardware
  • ๐Ÿ“ Pattern matching: "takeoff" โ†’ takeoff()

Perfect for: Weak laptops, offline use, predictable commands

2. Cloud LLM via OpenRouter (Optional - Smart)

  • ๐Ÿค– Intelligent: Understands context and synonyms
  • ๐ŸŒ Multilingual: Works in any language
  • ๐Ÿ’ก Flexible: "fly a bit higher" โ†’ understands intent
  • ๐Ÿ†“ Free tier available: Google Gemini Flash 1.5

Setup (optional):

# 1. Get free API key: https://openrouter.ai/keys
# 2. Copy example config
cp .env.example .env

# 3. Edit .env and add your key
nano .env  # or use any text editor

The system automatically falls back to regex if OpenRouter is unavailable!

๐Ÿ›ก๏ธ Robust Connection Handling

Dronoid includes smart connection management to make your experience smooth:

Auto-Recovery Features

  • 10 Retry Attempts: Automatically retries connection if PX4 is starting
  • Intelligent Port Detection: Tests multiple MAVLink ports
  • Clear Error Messages: Helpful troubleshooting hints if connection fails
  • Auto-Start Wrapper: px4-client checks if PX4 is running and starts it automatically

How It Works

./px4-client
  โ†“
Checks: Is PX4 running?
  โ”œโ”€ Yes โ†’ Connect to drone โœ“
  โ””โ”€ No  โ†’ Start PX4 โ†’ Wait for ready โ†’ Connect โœ“

This means you never have to manually start PX4 - just run ./px4-client and fly!

๐Ÿ”ง Configuration

Environment Variables

Create .env file (not tracked in git):

# Optional: Cloud LLM for advanced NL processing
OPENROUTER_API_KEY=your-key-here

Hardware Configuration (Future)

YAML-based plug & play:

# drone_config.yaml
hardware:
  flight_controller: px4
  camera:
    type: raspberry_pi_camera_v2
    resolution: 1920x1080
  water_system:
    pump: 12v_dc
    pressure_sensor: analog

๐Ÿ“Š System Requirements

Minimum (Simulation)

  • CPU: Dual-core 2.0 GHz
  • RAM: 4GB (note: Gazebo can be heavy)
  • Storage: 10GB free
  • OS: Ubuntu 24.04 (or 22.04)

Recommended (Hardware + Vision)

  • CPU: Quad-core 2.5 GHz+
  • RAM: 8GB+
  • GPU: For VLM inference (optional)
  • Additional: Raspberry Pi 4 (4GB) for onboard processing

๐ŸŽฏ Roadmap

โœ… Phase 1: COMPLETED

  • PX4 SITL + Gazebo setup
  • MAVLink communication
  • Natural language control (regex-based)
  • Basic commands (arm, takeoff, land)

๐Ÿšง Phase 2: IN PROGRESS

  • Cloud LLM integration (OpenRouter)
  • Advanced command parsing
  • HTTP API for remote control
  • ROS2 full integration

๐Ÿ“‹ Phase 3: PLANNED

  • VLM integration (Wall-X / TinyML)
  • Dirt detection on facades
  • Water system control
  • Autonomous cleaning routines

๐Ÿ“‹ Phase 4: FUTURE

  • Hardware deployment (Raspberry Pi + PX4)
  • Real-world testing
  • Multi-drone coordination
  • Industrial scalability

๐Ÿ› Troubleshooting

Drone won't connect

# Check if PX4 is running
ps aux | grep px4

# Restart system
./start_drone.sh

Gazebo GUI not showing drone

# Check environment variables
echo $GZ_SIM_RESOURCE_PATH

# Should include PX4 models path
export GZ_SIM_RESOURCE_PATH=$PWD/PX4-Autopilot/Tools/simulation/gz/models:$PWD/PX4-Autopilot/Tools/simulation/gz/worlds

Python connection timeout

# PX4 MAVLink should be on port 14580
lsof -i UDP:14580

# If port is closed, PX4 isn't running

๐Ÿค Contributing

This is an open-source project! Contributions welcome:

  • ๐Ÿ› Bug reports via GitHub Issues
  • ๐Ÿ’ก Feature suggestions
  • ๐Ÿ”ง Pull requests
  • ๐Ÿ“– Documentation improvements

๐Ÿ“š Related Projects

๐Ÿ“ License

MIT License - See LICENSE file

๐Ÿ‘ค Author

Tristan - Universal Drone OS Project

Built with Claude Code ๐Ÿค–


Note: This project is in active development. Star โญ the repo to follow progress!

About

Drones that understand natural language - Open-source drone OS with NL control for autonomous facade cleaning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published