3.7 KiB
3.7 KiB
Installation Guide
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| OS | Ubuntu 22.04 | Ubuntu 24.04 |
| RAM | 8 GB | 16 GB |
| Disk | 10 GB | 20 GB |
| GPU | OpenGL 3.3 | NVIDIA dedicated |
Ubuntu 25.x+ users: Native installation has dependency issues. Use Docker instead (recommended).
Windows users: Use WSL2 with Ubuntu 24.04 (see below) or Docker.
Installation Options
| Method | Best For |
|---|---|
| Docker (Recommended) | Ubuntu 25+, consistent environments, no host modifications |
| Native Install | Ubuntu 22.04/24.04, full control |
| WSL2 | Windows users |
Quick Install (Ubuntu 22.04/24.04)
# Clone repository
git clone <repo-url> ~/RDC_Simulation
cd ~/RDC_Simulation
# Run full installer (20-30 minutes)
./setup/install_ubuntu.sh
# Activate environment
source activate.sh
This installs:
- ✅ Python 3 + virtual environment
- ✅ Gazebo Harmonic
- ✅ ArduPilot SITL
- ✅ ArduPilot Gazebo plugin
- ✅ MAVProxy
Windows (WSL2)
Step 1: Install WSL2
Open PowerShell as Administrator:
wsl --install -d Ubuntu-24.04
Restart your computer, then open "Ubuntu" from the Start menu.
Step 2: Install in WSL
# Update system
sudo apt update && sudo apt upgrade -y
# Clone and install
git clone <repo-url> ~/RDC_Simulation
cd ~/RDC_Simulation
./setup/install_ubuntu.sh
# Activate environment
source activate.sh
WSL2 Tips
- GUI: Windows 11 has WSLg built-in. Gazebo should work automatically.
- GPU: Install NVIDIA WSL driver for GPU acceleration
- Performance: Keep files in Linux filesystem (
~/), not Windows (/mnt/c/) - Memory: WSL may need more RAM. Create
~/.wslconfigin Windows:[wsl2] memory=8GB
Arch Linux
./setup/install_arch.sh
source activate.sh
macOS
macOS doesn't support Gazebo Harmonic. Options:
- Docker: Run Linux in container
- VM: Use UTM/Parallels with Ubuntu
- Basic: PyBullet-only simulation
./setup/install_macos.sh
Verify Installation
# Check ArduPilot environment
# Activate environment & check
source activate.sh
python -c "import em; print('empy: OK')"
which sim_vehicle.py
# Check Gazebo
gz sim --version
# Check ArduPilot plugin
ls ~/ardupilot_gazebo/build/libArduPilotPlugin.so
First Run
Terminal 1 - Gazebo
cd ~/RDC_Simulation
./scripts/run_ardupilot_sim.sh runway
Wait for the drone to appear!
Terminal 2 - SITL
source activate.sh
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console
Wait for "JSON received:" messages.
Terminal 3 - Controller
cd ~/RDC_Simulation
source activate.sh
python scripts/run_ardupilot.py --pattern square
Troubleshooting
"empy not found"
source activate.sh
pip install empy==3.3.4
"sim_vehicle.py not found"
source ~/.ardupilot_env
# Or add to PATH manually:
export PATH=$PATH:~/ardupilot/Tools/autotest
"No JSON sensor message"
SITL isn't receiving data from Gazebo.
- Start Gazebo FIRST
- Wait for world to fully load
- Then start SITL
Gazebo crashes or slow
# Check GPU
glxinfo | grep "OpenGL renderer"
# Force software rendering (slow but works)
export LIBGL_ALWAYS_SOFTWARE=1
WSL: Display not working
# Check WSLg
ls /mnt/wslg
# Update WSL if missing
wsl --update
ArduPlane instead of ArduCopter
If mode list shows FBWA, FBWB (plane modes):
pkill -9 -f sim_vehicle
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console --wipe-eeprom