f489bfbad9e391fd0462e873723abeb614417e85
Drone Landing Simulation (GPS-Denied)
A GPS-denied drone landing simulation using relative sensors (IMU, altimeter, camera, landing pad detection) with PyBullet and Gazebo simulators.
Quick Start
# Install (Ubuntu)
./setup/install_ubuntu.sh
source activate.sh
# Run PyBullet simulation
python simulation_host.py # Terminal 1: Simulator
python ros_bridge.py # Terminal 2: ROS bridge
python controllers.py # Terminal 3: Drone + Rover controllers
# With moving rover
python controllers.py --pattern circular --speed 0.3
Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ simulation_host │◄── UDP:5555 ──────►│ ros_bridge.py │ │
│ │ (PyBullet) │ └────────────┬─────────────┘ │
│ └──────────────────┘ │ │
│ OR │ │
│ ┌──────────────────┐ ┌────────────┴─────────────┐ │
│ │ Gazebo │◄── ROS Topics ────►│ gazebo_bridge.py │ │
│ └──────────────────┘ └────────────┬─────────────┘ │
│ │ │
│ ┌────────────▼─────────────┐ │
│ │ controllers.py │ │
│ │ ┌─────────────────────┐ │ │
│ │ │ DroneController │ │ │
│ │ │ RoverController │ │ │
│ │ └─────────────────────┘ │ │
│ └──────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
Files
| File | Description |
|---|---|
simulation_host.py |
PyBullet physics simulator |
ros_bridge.py |
UDP ↔ ROS 2 bridge |
gazebo_bridge.py |
Gazebo ↔ ROS 2 bridge |
controllers.py |
Runs drone + rover together |
drone_controller.py |
Drone landing logic (edit this) |
rover_controller.py |
Moving landing pad |
Controller Options
python controllers.py --help
Options:
--pattern, -p Rover pattern: stationary, linear, circular, random, square
--speed, -s Rover speed in m/s (default: 0.5)
--amplitude, -a Rover amplitude in meters (default: 2.0)
GPS-Denied Sensors
The drone has no GPS. Available sensors:
| Sensor | Data |
|---|---|
| IMU | Orientation, angular velocity |
| Altimeter | Altitude, vertical velocity |
| Velocity | Estimated horizontal velocity |
| Camera | 320x240 downward-facing image (base64 JPEG) |
| Landing Pad | Relative position when visible (may be null) |
Documentation
| Document | Description |
|---|---|
| Installation | Setup for Ubuntu, macOS, Windows |
| Architecture | System components and data flow |
| Protocol | Sensor data formats |
| Drone Guide | How to implement landing logic |
| Rover Controller | Movement patterns |
| PyBullet | PyBullet-specific setup |
| Gazebo | Gazebo-specific setup |
Getting Started
- Read docs/drone_guide.md
- Edit
drone_controller.py - Implement
calculate_landing_maneuver() - Run:
python controllers.py --pattern stationary - Increase difficulty:
python controllers.py --pattern circular
Description
Languages
Python
66.3%
Shell
25.4%
PowerShell
4.5%
Dockerfile
3.8%