Code reorganization and Drone Logic Update
This commit is contained in:
@@ -1,110 +1,62 @@
|
||||
# Installation Guide
|
||||
# Installation
|
||||
|
||||
## Quick Install
|
||||
|
||||
```bash
|
||||
./setup/install_ubuntu.sh
|
||||
source activate.sh
|
||||
python standalone_simulation.py
|
||||
```
|
||||
|
||||
## Scripts
|
||||
|
||||
| Platform | Command |
|
||||
|----------|---------|
|
||||
| Ubuntu/Debian | `./setup/install_ubuntu.sh` |
|
||||
| ArduPilot SITL | `./setup/install_ardupilot.sh` |
|
||||
| macOS | `./setup/install_macos.sh` |
|
||||
| Windows | `.\setup\install_windows.ps1` |
|
||||
|
||||
## Platform Support
|
||||
|
||||
| Mode | Ubuntu | macOS | Windows |
|
||||
|------|--------|-------|---------|
|
||||
| Standalone | ✅ | ✅ | ✅ |
|
||||
| Gazebo | ✅ | ❌ | WSL2 |
|
||||
| ArduPilot | ✅ | ❌ | WSL2 |
|
||||
|
||||
---
|
||||
|
||||
## Ubuntu/Debian
|
||||
|
||||
```bash
|
||||
./setup/install_ubuntu.sh
|
||||
source activate.sh
|
||||
```
|
||||
|
||||
Installs: ROS 2, Gazebo, PyBullet, OpenCV, pymavlink
|
||||
|
||||
---
|
||||
|
||||
## ArduPilot SITL
|
||||
|
||||
```bash
|
||||
./setup/install_ardupilot.sh
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
Installs: ArduPilot SITL, ardupilot_gazebo, MAVProxy
|
||||
## What Gets Installed
|
||||
|
||||
**Run:**
|
||||
```bash
|
||||
./scripts/run_ardupilot_sim.sh camera
|
||||
```
|
||||
| Component | Location |
|
||||
|-----------|----------|
|
||||
| ArduPilot SITL | `~/ardupilot` |
|
||||
| ardupilot_gazebo | `~/ardupilot_gazebo` |
|
||||
| Gazebo Harmonic | System |
|
||||
| ROS 2 | System |
|
||||
| MAVProxy | `~/.local/bin` |
|
||||
|
||||
---
|
||||
|
||||
## GPU Support
|
||||
|
||||
The simulation auto-detects GPU:
|
||||
|
||||
| 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
|
||||
glxinfo | grep "OpenGL renderer"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Manual Install
|
||||
## Dependencies
|
||||
|
||||
```bash
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python standalone_simulation.py
|
||||
```
|
||||
|
||||
---
|
||||
- pybullet
|
||||
- numpy
|
||||
- pillow
|
||||
- opencv-python
|
||||
- pymavlink
|
||||
- pexpect
|
||||
|
||||
## Verify Installation
|
||||
|
||||
```bash
|
||||
sim_vehicle.py --help
|
||||
gz sim --help
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Simulation is laggy
|
||||
|
||||
```bash
|
||||
# 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
|
||||
```
|
||||
|
||||
### MAVProxy not found
|
||||
|
||||
```bash
|
||||
pip3 install --user mavproxy
|
||||
export PATH=$PATH:~/.local/bin
|
||||
```
|
||||
|
||||
### sim_vehicle.py not found
|
||||
|
||||
```bash
|
||||
export PATH=$PATH:~/ardupilot/Tools/autotest
|
||||
```
|
||||
|
||||
### mavproxy.py not found
|
||||
```bash
|
||||
export PATH=$PATH:~/.local/bin
|
||||
```
|
||||
|
||||
### pexpect error
|
||||
```bash
|
||||
pip install pexpect
|
||||
```
|
||||
|
||||
### Gazebo slow
|
||||
```bash
|
||||
glxinfo | grep "OpenGL renderer"
|
||||
```
|
||||
Should show GPU, not "llvmpipe".
|
||||
|
||||
Reference in New Issue
Block a user