Files
RDC_Simulation/README.md
2026-01-02 21:45:16 +00:00

4.4 KiB

Drone Landing Simulation (GPS-Denied)

A GPS-denied drone landing simulation using relative sensors (IMU, altimeter, camera, landing pad detection) with multiple backends:

  • PyBullet - Lightweight physics simulation
  • Gazebo - Full robotics simulator
  • ArduPilot SITL - Realistic flight controller with MAVProxy

Quick Start

Standalone Mode (Any Platform - No ROS 2 Required)

source activate.sh  # Linux/macOS
. .\activate.ps1    # Windows

python standalone_simulation.py --pattern circular --speed 0.3

PyBullet + ROS 2 (Two Terminals)

Terminal 1 - Simulator:

python simulation_host.py

Terminal 2 - Bridge + Controllers:

python run_bridge.py --pattern circular --speed 0.3

Gazebo + ROS 2 (Two Terminals - Linux/WSL2)

Terminal 1 - Launch Gazebo + Bridge:

ros2 launch gazebo/launch/drone_landing.launch.py

Terminal 2 - Run Controllers:

python run_gazebo.py --pattern circular --speed 0.3

ArduPilot SITL + Gazebo (Three Terminals - Realistic Flight Controller)

Terminal 1 - Launch Gazebo with ArduPilot world:

ros2 launch gazebo/launch/ardupilot_drone.launch.py

Terminal 2 - Start ArduPilot SITL:

cd ~/ardupilot
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console

Terminal 3 - Run MAVLink Bridge + Controllers:

python run_ardupilot.py --no-sitl --pattern circular

Installation

Platform Command
Ubuntu/Debian ./setup/install_ubuntu.sh
Arch Linux ./setup/install_arch.sh
macOS ./setup/install_macos.sh
Windows .\setup\install_windows.ps1

Platform Compatibility

Feature Ubuntu Arch macOS Windows WSL2
Standalone
PyBullet + ROS 2 ⚠️
Gazebo + ROS 2 ⚠️
ArduPilot + Gazebo ⚠️

Files

File Description
standalone_simulation.py All-in-one (no ROS 2 required)
simulation_host.py PyBullet simulator server
run_bridge.py PyBullet bridge + Controllers
run_gazebo.py Gazebo bridge + Controllers
run_ardupilot.py ArduPilot SITL + MAVLink bridge
mavlink_bridge.py MAVLink ↔ ROS 2 bridge
config.py Configuration file (edit to customize)
drone_controller.py Your landing algorithm (edit this!)
rover_controller.py Moving landing pad controller

Configuration

Edit config.py to customize:

  • Drone/rover starting positions
  • Physical properties (mass, size)
  • Controller gains (Kp, Kd)
  • Landing detection thresholds

Command Line Options

# Standalone (no ROS 2)
python standalone_simulation.py --pattern circular --speed 0.3

# PyBullet + ROS 2
python run_bridge.py --pattern circular --speed 0.3 --host <SIMULATOR_IP>

# Gazebo + ROS 2  
python run_gazebo.py --pattern circular --speed 0.3

Options:
  --pattern, -p   stationary, linear, circular, square, random
  --speed, -s     Speed in m/s (default: 0.5)
  --amplitude, -a Amplitude in meters (default: 2.0)
  --host, -H      Simulator IP (default: 0.0.0.0)

GPS-Denied Sensors

Sensor Data
IMU Orientation (roll, pitch, yaw), angular velocity
Altimeter Altitude, vertical velocity
Velocity Estimated horizontal velocity (x, y, z)
Camera 320x240 downward-facing JPEG image
Landing Pad Relative position when visible in camera FOV

Documentation

Document Description
Installation Platform setup guides + WSL2
Architecture System components diagram
Gazebo Guide Gazebo-specific instructions
PyBullet Guide PyBullet-specific instructions
ArduPilot Guide ArduPilot SITL + MAVProxy
Protocol Sensor data formats
Drone Guide Landing algorithm guide

Network Setup (Remote Simulator)

Run simulator on one machine, controllers on another:

Machine 1 (with display):

python simulation_host.py  # Listens on 0.0.0.0:5555

Machine 2 (headless):

python run_bridge.py --host 192.168.1.100  # Connect to Machine 1