Files
RDC_Simulation/docs/installation.md
2026-01-04 00:24:46 +00:00

126 lines
2.0 KiB
Markdown

# Installation Guide
## Quick Install
```bash
# Ubuntu/Debian
./setup/install_ubuntu.sh
source activate.sh
# Test
python standalone_simulation.py
```
## Install Scripts
| Platform | Command |
|----------|---------|
| Ubuntu/Debian | `./setup/install_ubuntu.sh` |
| ArduPilot SITL | `./setup/install_ardupilot.sh` |
| Arch Linux | `./setup/install_arch.sh` |
| macOS | `./setup/install_macos.sh` |
| Windows | `.\setup\install_windows.ps1` |
## Platform Support
| Mode | Ubuntu | macOS | Windows |
|------|--------|-------|---------|
| Standalone | ✅ | ✅ | ✅ |
| Gazebo + ROS 2 | ✅ | ❌ | WSL2 |
| ArduPilot SITL | ✅ | ❌ | WSL2 |
---
## Ubuntu/Debian
```bash
./setup/install_ubuntu.sh
source activate.sh
python standalone_simulation.py
```
**Installs:**
- ROS 2 Humble/Jazzy
- Gazebo
- Python packages (pybullet, numpy, opencv, pymavlink)
---
## ArduPilot SITL
For realistic flight controller simulation:
```bash
./setup/install_ardupilot.sh
source ~/.bashrc
```
**Installs:**
- ArduPilot SITL
- ardupilot_gz (Gazebo integration)
- MAVProxy
**Run:**
```bash
# Terminal 1
source ~/ardu_ws/install/setup.bash
ros2 launch ardupilot_gz_bringup iris_runway.launch.py
# Terminal 2
mavproxy.py --console --map --master=:14550
```
---
## Windows (WSL2)
1. Install WSL2:
```powershell
wsl --install -d Ubuntu-22.04
```
2. Open Ubuntu and run:
```bash
./setup/install_ubuntu.sh
source activate.sh
python standalone_simulation.py
```
---
## macOS
```bash
./setup/install_macos.sh
source activate.sh
python standalone_simulation.py
```
**Note:** ROS 2 and Gazebo not supported on macOS. Use standalone mode.
---
## Manual Install
```bash
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install packages
pip install -r requirements.txt
# Run
python standalone_simulation.py
```
---
## Verification
```bash
python -c "import pybullet; print('PyBullet OK')"
python -c "import cv2; print('OpenCV OK')"
python -c "from pymavlink import mavutil; print('pymavlink OK')"
```