Camera Aruco Tags Dectection

This commit is contained in:
2026-02-12 15:53:36 -05:00
parent 92da41138b
commit c91ea920a8
20 changed files with 688 additions and 470 deletions

View File

@@ -1,13 +1,12 @@
# UAV-UGV Simulation
**GPS-Denied Navigation with Vision-Based Localization**
A ROS 2 simulation environment for UAV and UGV development using GPS-denied navigation with vision-based localization, while maintaining GPS-based geofencing for safety.
## Features
- **GPS-Denied Navigation**: Visual odometry, optical flow, and EKF sensor fusion
- **GPS-Based Geofencing**: Safety boundaries using GPS (navigation remains GPS-free)
- **ArUco Marker Search**: Spiral, lawnmower, and Lévy walk search algorithms
- **Multi-Vehicle Support**: Coordinated UAV and UGV operations
- **ArduPilot SITL**: Full flight controller simulation
- **Gazebo Harmonic**: Modern physics simulation
@@ -32,25 +31,21 @@ Installation takes 20-40 minutes (builds ArduPilot from source).
## Quick Start
### Autonomous Mode (Recommended)
The UAV automatically arms, takes off, and executes a mission:
```bash
cd ~/sim/uav_ugv_simulation
source activate_venv.sh
# Hover mission
bash scripts/run_autonomous.sh --mission hover
# Spiral search (default)
bash scripts/run_autonomous.sh --search spiral
# Square pattern
bash scripts/run_autonomous.sh --mission square
# Lawnmower search
bash scripts/run_autonomous.sh --search lawnmower
# Circle pattern
bash scripts/run_autonomous.sh --mission circle
# Lévy walk search
bash scripts/run_autonomous.sh --search levy
# WSL/Software rendering
bash scripts/run_autonomous.sh --software-render --mission hover
bash scripts/run_autonomous.sh --software-render --search spiral
```
### Manual Mode (MAVProxy)
@@ -70,13 +65,15 @@ source /opt/ros/humble/setup.bash
ros2 launch uav_ugv_simulation full_simulation.launch.py
```
## Mission Types
## Search Algorithms
| Mission | Description |
|---------|-------------|
| `hover` | Take off, hover for 30 seconds, land |
| `square` | Fly a 5m square pattern |
| `circle` | Fly a circular pattern |
| Algorithm | Description |
|-----------|-------------|
| `spiral` | Expanding square spiral from current position |
| `lawnmower` | Systematic back-and-forth lane coverage |
| `levy` | Random walk with Lévy-distributed step lengths |
All search algorithms continuously scan for ArUco markers using the downward camera during flight. Detected markers are logged with their ID, position, and distance.
## GPS-Denied Navigation
@@ -88,6 +85,25 @@ ros2 launch uav_ugv_simulation full_simulation.launch.py
**GPS is ONLY used for geofencing** (safety boundaries), NOT for navigation or position control.
## Speed Limits
Speed and acceleration are capped to prevent aggressive tilting in simulation. Defaults are applied automatically via `configure_speed_limits()` in `setup_ardupilot()`.
| Parameter | Default | Unit |
|-----------|---------|------|
| `WPNAV_SPEED` | 150 | cm/s |
| `WPNAV_ACCEL` | 100 | cm/s² |
| `WPNAV_SPEED_UP` | 100 | cm/s |
| `WPNAV_SPEED_DN` | 75 | cm/s |
| `WPNAV_ACCEL_Z` | 75 | cm/s² |
| `LOIT_SPEED` | 150 | cm/s |
Override in code:
```python
ctrl.configure_speed_limits(wpnav_speed=200, wpnav_accel=150)
```
## Project Structure
```
@@ -98,13 +114,17 @@ uav_ugv_simulation/
│ ├── run_simulation.sh # Manual simulation
│ └── kill_simulation.sh # Cleanup
├── src/
│ ├── control/ # UAV/UGV controllers
│ ├── vision/ # Visual odometry, optical flow
│ ├── main.py # Entry point
│ ├── control/ # UAV controller, search algorithms
│ ├── vision/ # ArUco detector, visual odometry, optical flow
│ ├── localization/ # EKF sensor fusion
│ ├── navigation/ # Path planning
│ └── safety/ # Geofencing, failsafe
├── config/
│ ├── search.yaml # Search algorithm parameters
│ ├── uav.yaml # UAV configuration
│ └── ugv.yaml # UGV configuration
├── launch/ # ROS 2 launch files
├── config/ # Configuration files
├── models/ # Gazebo models
└── worlds/ # Gazebo worlds
```
@@ -113,7 +133,7 @@ uav_ugv_simulation/
| Command | Description |
|---------|-------------|
| `bash scripts/run_autonomous.sh` | Run autonomous simulation |
| `bash scripts/run_autonomous.sh` | Run autonomous search |
| `bash scripts/run_simulation.sh` | Run manual simulation |
| `bash scripts/kill_simulation.sh` | Kill all processes |
| `bash scripts/uninstall.sh` | Uninstall ArduPilot |