# GPS-Denied Drone Landing Simulation ArduPilot + ROS 2 + Gazebo (ARG) simulation for landing on a moving platform. ## Quick Start (2 Terminals) **Terminal 1 - Gazebo:** ```bash source activate.sh ./scripts/run_ardupilot_sim.sh runway ``` **Terminal 2 - Controller:** ```bash source activate.sh ./scripts/run_ardupilot_controller.sh ``` ## World Options ```bash ./scripts/run_ardupilot_sim.sh runway # Default (outdoor) ./scripts/run_ardupilot_sim.sh warehouse # Indoor ./scripts/run_ardupilot_sim.sh custom # Custom landing pad ./scripts/run_ardupilot_sim.sh my_world # gazebo/worlds/my_world.sdf ``` ## Installation ### Ubuntu (Native or WSL2) ```bash ./setup/install_ubuntu.sh ./setup/install_ardupilot.sh source ~/.bashrc ``` ### Windows (via WSL2) ```powershell # PowerShell as Administrator wsl --install -d Ubuntu-24.04 # Restart, then in Ubuntu terminal: ./setup/install_ubuntu.sh --with-ardupilot ``` ### macOS ```bash ./setup/install_macos.sh python standalone_simulation.py # Gazebo not supported ``` See [Installation Guide](docs/installation.md) for detailed platform instructions. ## Project Structure ``` simulation/ ├── config.py ├── src/ │ └── drone_controller.py # Your algorithm ├── scripts/ │ ├── run_ardupilot_sim.sh │ └── run_ardupilot_controller.sh ├── gazebo/ │ ├── worlds/ # Your worlds │ └── models/ # Your models ├── setup/ └── docs/ ``` ## 3-Phase Mission | Phase | Action | |-------|--------| | SEARCH | Find QR code on rover | | COMMAND | Send commands to rover | | LAND | Land on rover | ## Environment Setup Always activate the environment before running: ```bash source activate.sh ``` This sets up: - ROS 2 environment - ArduPilot venv (with empy, pymavlink, etc.) - Gazebo resource paths - ArduPilot tools path ## Troubleshooting **sim_vehicle.py not found:** ```bash source ~/.ardupilot_env ``` **empy not found:** ```bash source ~/venv-ardupilot/bin/activate pip install empy==3.3.4 ``` **Gazebo slow (software rendering):** ```bash glxinfo | grep "OpenGL renderer" # Should show GPU, not "llvmpipe" ``` ## Documentation - [Installation](docs/installation.md) - Full setup for all platforms + WSL - [ArduPilot Guide](docs/ardupilot.md) - SITL setup and troubleshooting - [Drone Controller](docs/drone_guide.md) - Landing algorithm - [Custom Worlds](docs/gazebo_worlds.md) - Create Gazebo environments - [Blender Models](docs/blender_models.md) - 3D model workflow - [Architecture](docs/architecture.md) - System design