# 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:** - Micro-XRCE-DDS-Gen (required for DDS) - ArduPilot SITL - ardupilot_gz (Gazebo integration) - MAVProxy (`~/.local/bin/mavproxy.py`) **Run (2 terminals):** Terminal 1: ```bash source ~/ardu_ws/install/setup.bash ros2 launch ardupilot_gz_bringup iris_runway.launch.py ``` Terminal 2: ```bash 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. Use standalone mode. --- ## Manual Install ```bash python3 -m venv venv source venv/bin/activate pip install -r requirements.txt 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')" ``` --- ## Troubleshooting ### MAVProxy not found ```bash # Install pip3 install --user mavproxy # Add to PATH echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc source ~/.bashrc # Verify which mavproxy.py ``` ### microxrceddsgen not found ```bash # Install (needed for ArduPilot DDS) git clone --recurse-submodules https://github.com/eProsima/Micro-XRCE-DDS-Gen.git ~/Micro-XRCE-DDS-Gen cd ~/Micro-XRCE-DDS-Gen ./gradlew assemble # Add to PATH echo 'export PATH=$PATH:~/Micro-XRCE-DDS-Gen/scripts' >> ~/.bashrc source ~/.bashrc ``` ### Build errors ```bash # Rebuild with override flag cd ~/ardu_ws colcon build --packages-up-to ardupilot_gz_bringup --allow-overriding ros_gz_bridge ros_gz_sim sdformat_urdf ```