Docs Update
This commit is contained in:
@@ -3,21 +3,17 @@
|
||||
## Quick Install
|
||||
|
||||
```bash
|
||||
# Ubuntu/Debian
|
||||
./setup/install_ubuntu.sh
|
||||
source activate.sh
|
||||
|
||||
# Test
|
||||
python standalone_simulation.py
|
||||
```
|
||||
|
||||
## Install Scripts
|
||||
## 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` |
|
||||
|
||||
@@ -26,8 +22,8 @@ python standalone_simulation.py
|
||||
| Mode | Ubuntu | macOS | Windows |
|
||||
|------|--------|-------|---------|
|
||||
| Standalone | ✅ | ✅ | ✅ |
|
||||
| Gazebo + ROS 2 | ✅ | ❌ | WSL2 |
|
||||
| ArduPilot SITL | ✅ | ❌ | WSL2 |
|
||||
| Gazebo | ✅ | ❌ | WSL2 |
|
||||
| ArduPilot | ✅ | ❌ | WSL2 |
|
||||
|
||||
---
|
||||
|
||||
@@ -36,74 +32,46 @@ python standalone_simulation.py
|
||||
```bash
|
||||
./setup/install_ubuntu.sh
|
||||
source activate.sh
|
||||
python standalone_simulation.py
|
||||
```
|
||||
|
||||
**Installs:**
|
||||
- ROS 2 Humble/Jazzy
|
||||
- Gazebo
|
||||
- Python packages (pybullet, numpy, opencv, pymavlink)
|
||||
Installs: ROS 2, Gazebo, PyBullet, 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`)
|
||||
Installs: ArduPilot SITL, ardupilot_gazebo, MAVProxy
|
||||
|
||||
**Run (2 terminals):**
|
||||
|
||||
Terminal 1:
|
||||
**Run:**
|
||||
```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
|
||||
./scripts/run_ardupilot_sim.sh camera
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Windows (WSL2)
|
||||
## GPU Support
|
||||
|
||||
1. Install WSL2:
|
||||
```powershell
|
||||
wsl --install -d Ubuntu-22.04
|
||||
```
|
||||
The simulation auto-detects GPU:
|
||||
|
||||
2. Open Ubuntu and run:
|
||||
| Priority | GPU Type | Notes |
|
||||
|----------|----------|-------|
|
||||
| 1 | NVIDIA | Best performance |
|
||||
| 2 | Intel integrated | Good for laptops |
|
||||
| 3 | AMD | Good performance |
|
||||
| 4 | Software (llvmpipe) | Slow fallback |
|
||||
|
||||
Check your GPU:
|
||||
```bash
|
||||
./setup/install_ubuntu.sh
|
||||
source activate.sh
|
||||
python standalone_simulation.py
|
||||
glxinfo | grep "OpenGL renderer"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
@@ -115,49 +83,28 @@ python standalone_simulation.py
|
||||
|
||||
---
|
||||
|
||||
## Verification
|
||||
## Troubleshooting
|
||||
|
||||
### Simulation is laggy
|
||||
|
||||
```bash
|
||||
python -c "import pybullet; print('PyBullet OK')"
|
||||
python -c "import cv2; print('OpenCV OK')"
|
||||
python -c "from pymavlink import mavutil; print('pymavlink OK')"
|
||||
# Check GPU (should NOT show "llvmpipe")
|
||||
glxinfo | grep "OpenGL renderer"
|
||||
|
||||
# Install GPU drivers
|
||||
sudo apt install mesa-utils # Intel/AMD
|
||||
sudo apt install nvidia-driver-535 # NVIDIA
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
export PATH=$PATH:~/.local/bin
|
||||
```
|
||||
|
||||
### microxrceddsgen not found
|
||||
### sim_vehicle.py 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
|
||||
export PATH=$PATH:~/ardupilot/Tools/autotest
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user