Files
simulation/README.md
2026-02-09 04:52:32 +00:00

104 lines
2.4 KiB
Markdown

# UAV-UGV Simulation
GPS-Denied Navigation with Geofencing
A simulation environment for UAV and UGV development using GPS-denied navigation with vision-based localization, while maintaining GPS-based geofencing for safety.
## GPS-Denied Navigation
**Navigation**: All vehicles navigate using relative positioning only:
- Visual odometry from cameras
- Optical flow sensors
- IMU integration
- Local coordinate frames
**GPS Usage**: GPS is ONLY used for geofencing (safety boundaries), NOT for navigation or position control.
## Requirements
- Ubuntu 22.04 or 24.04 (WSL2 supported)
- 16GB RAM recommended
- 50GB disk space
## Installation
```bash
git clone https://git.sirblob.co/SirBlob/simulation.git
cd simulation
bash setup.sh
```
Installation takes 20-40 minutes (builds ArduPilot from source).
## Quick Start
```bash
cd ~/simulation
source activate_venv.sh
bash scripts/run_simulation.sh
```
For WSL with graphics issues:
```bash
bash scripts/run_simulation.sh --software-render
```
## Controlling the UAV
Once the simulation is running, use MAVProxy commands in the console:
```
mode guided # Switch to GUIDED mode
arm throttle # Arm the drone
takeoff 5 # Takeoff to 5 meters
guided 10 5 -10 # Fly to position (North, East, Down)
rtl # Return to launch
land # Land
```
Or via ROS 2:
```bash
# Arm
ros2 service call /mavros/cmd/arming mavros_msgs/srv/CommandBool "{value: true}"
# Takeoff
ros2 service call /mavros/cmd/takeoff mavros_msgs/srv/CommandTOL "{altitude: 5}"
# Fly to position (local coordinates)
ros2 topic pub /mavros/setpoint_position/local geometry_msgs/PoseStamped \
"{header: {frame_id: 'map'}, pose: {position: {x: 10, y: 5, z: 5}}}"
```
## Simulation Options
```bash
# Default
bash scripts/run_simulation.sh
# Custom world
bash scripts/run_simulation.sh --world iris_runway
# Rover instead of copter
bash scripts/run_simulation.sh --vehicle Rover
# Software rendering (WSL)
bash scripts/run_simulation.sh --software-render
```
## Uninstall
```bash
bash scripts/uninstall.sh # Remove ArduPilot and plugin
bash scripts/uninstall.sh --all # Remove everything
```
## Documentation
- [Setup Guide](docs/setup_guide.md)
- [WSL Setup Guide](docs/wsl_setup_guide.md)
- [Usage Guide](docs/usage.md)
- [Architecture](docs/architecture.md)
- [GPS-Denied Navigation](docs/gps_denied_navigation.md)
- [Troubleshooting](docs/troubleshooting.md)