2026-01-11 00:25:41 +00:00
2026-01-10 22:56:43 +00:00
2026-01-09 20:51:14 +00:00
2026-01-10 22:56:43 +00:00
2026-01-09 21:12:06 +00:00
2026-01-09 20:51:14 +00:00
2026-01-04 01:42:01 +00:00
2026-01-09 20:16:07 +00:00
2026-01-11 00:23:45 +00:00
2026-01-09 20:51:14 +00:00
2026-01-10 23:12:47 +00:00
2026-01-09 21:16:23 +00:00
2026-01-11 00:25:41 +00:00

RDC Simulation

GPS-Denied Drone Landing Simulation using ArduPilot and Gazebo.

Quick Start

Prerequisites

  • Ubuntu 22.04/24.04 (or WSL2 on Windows)
  • Python 3.10+
  • ~10GB disk space

Installation

# Clone the repository
git clone <repo-url> RDC_Simulation
cd RDC_Simulation

# Full installation (20-30 minutes)
./setup/install_ubuntu.sh

# Activate environment
source activate.sh

Run the Simulation (3 Terminals)

Terminal 1 - Start Gazebo FIRST:

cd ~/RDC_Simulation
./scripts/run_ardupilot_sim.sh runway
# WAIT until you see the drone in Gazebo!

Terminal 2 - Start ArduCopter SITL:

source activate.sh
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console
# Wait for "JSON received:" messages (shows Gazebo is connected)

Terminal 3 - Run Controller:

cd ~/RDC_Simulation
source activate.sh
python scripts/run_ardupilot.py --pattern square

Flight Patterns

# Fly a square pattern (default)
python scripts/run_ardupilot.py --pattern square --size 5

# Fly a circle
python scripts/run_ardupilot.py --pattern circle --size 5

# Just hover in place
python scripts/run_ardupilot.py --pattern hover

# Custom altitude
python scripts/run_ardupilot.py --pattern square --altitude 10

# Use GPS mode instead of GPS-denied
python scripts/run_ardupilot.py --pattern square --gps

Project Structure

RDC_Simulation/
├── scripts/
│   ├── run_ardupilot_sim.sh      # Launch Gazebo
│   ├── run_ardupilot_controller.sh # Launch SITL + Controller
│   └── run_ardupilot.py          # Flight controller entry point
├── src/
│   ├── drone_controller.py       # Main drone controller class
│   ├── rover_controller.py       # Moving landing pad (ROS 2)
│   └── camera_viewer.py          # Camera viewer (ROS 2)
├── setup/
│   ├── install_ubuntu.sh         # Ubuntu/WSL installer
│   ├── install_ardupilot.sh      # ArduPilot installer
│   └── install_arch.sh           # Arch Linux installer
├── gazebo/
│   └── models/                   # Custom Gazebo models
├── docs/                         # Documentation
└── config.py                     # Configuration

Troubleshooting

"No JSON sensor message received"

Gazebo isn't sending data to SITL.

  • Fix: Start Gazebo FIRST, wait for it to fully load, THEN start SITL.

"empy not found" or wrong Python

Wrong virtual environment.

source activate.sh
pip install empy==3.3.4

"sim_vehicle.py not found"

ArduPilot tools not in PATH.

source activate.sh

Drone won't arm

  • Make sure SITL is in STABILIZE or GUIDED mode
  • Check for pre-arm errors in MAVProxy console
  • Try in MAVProxy: arm throttle force

Wrong vehicle type (ArduPlane instead of ArduCopter)

You see modes like FBWA, FBWB, QSTABILIZE.

# Kill old processes
pkill -9 -f sim_vehicle

# Start with explicit ArduCopter
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console --wipe-eeprom

Documentation

Description
No description provided
Readme 632 KiB
Languages
Python 66.3%
Shell 25.4%
PowerShell 4.5%
Dockerfile 3.8%