Camera Aruco Tags Dectection
This commit is contained in:
@@ -66,15 +66,15 @@ Camera → Visual Odometry → Position Estimator → Controller
|
||||
#### Control Pipeline
|
||||
|
||||
```
|
||||
Mission Planner → UAV Controller → MAVROS → ArduPilot
|
||||
→ UGV Controller → cmd_vel
|
||||
Search Algorithm → UAV Controller → MAVROS → ArduPilot
|
||||
→ UGV Controller → cmd_vel
|
||||
```
|
||||
|
||||
| Node | Function |
|
||||
|------|----------|
|
||||
| `uav_controller` | GUIDED mode control, auto-arm |
|
||||
| `ugv_controller` | Differential drive control |
|
||||
| `mission_planner` | Multi-vehicle coordination |
|
||||
| `search` | Spiral, lawnmower, Lévy walk algorithms |
|
||||
|
||||
#### Safety Pipeline
|
||||
|
||||
@@ -138,23 +138,25 @@ GPS → Geofence Monitor → Failsafe Handler → Emergency Action
|
||||
|
||||
```
|
||||
src/
|
||||
├── main.py # Entry point
|
||||
├── vision/
|
||||
│ ├── visual_odometry.py # Feature tracking VO
|
||||
│ ├── optical_flow.py # LK optical flow
|
||||
│ └── camera_processor.py # Image processing
|
||||
│ ├── object_detector.py # ArUco marker detection
|
||||
│ ├── visual_odometry.py # Feature tracking VO
|
||||
│ ├── optical_flow.py # LK optical flow
|
||||
│ └── camera_processor.py # Gazebo camera feeds
|
||||
├── localization/
|
||||
│ ├── position_estimator.py # Weighted fusion
|
||||
│ └── ekf_fusion.py # EKF fusion
|
||||
│ ├── position_estimator.py # Weighted fusion
|
||||
│ └── ekf_fusion.py # EKF fusion
|
||||
├── navigation/
|
||||
│ ├── local_planner.py # Path planning
|
||||
│ └── waypoint_follower.py # Waypoint tracking
|
||||
│ ├── local_planner.py # Path planning
|
||||
│ └── waypoint_follower.py # Waypoint tracking
|
||||
├── control/
|
||||
│ ├── uav_controller.py # UAV flight control
|
||||
│ ├── ugv_controller.py # UGV drive control
|
||||
│ └── mission_planner.py # Coordination
|
||||
│ ├── uav_controller.py # UAV flight control
|
||||
│ ├── ugv_controller.py # UGV drive control
|
||||
│ └── search.py # Search algorithms
|
||||
└── safety/
|
||||
├── geofence_monitor.py # GPS boundaries
|
||||
└── failsafe_handler.py # Emergency handling
|
||||
├── geofence_monitor.py # GPS boundaries
|
||||
└── failsafe_handler.py # Emergency handling
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@@ -175,3 +177,14 @@ vo_weight: 0.6 # Visual odometry
|
||||
optical_flow: 0.3 # Optical flow
|
||||
imu: 0.1 # IMU integration
|
||||
```
|
||||
|
||||
### Speed Limits
|
||||
|
||||
```yaml
|
||||
WPNAV_SPEED: 150 # Horizontal speed (cm/s)
|
||||
WPNAV_ACCEL: 100 # Horizontal acceleration (cm/s/s)
|
||||
WPNAV_SPEED_UP: 100 # Climb speed (cm/s)
|
||||
WPNAV_SPEED_DN: 75 # Descent speed (cm/s)
|
||||
WPNAV_ACCEL_Z: 75 # Vertical acceleration (cm/s/s)
|
||||
LOIT_SPEED: 150 # Loiter speed (cm/s)
|
||||
```
|
||||
|
||||
@@ -127,6 +127,6 @@ bash scripts/uninstall.sh --all
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Run a test simulation: `bash scripts/run_autonomous.sh --mission hover`
|
||||
1. Run a test simulation: `bash scripts/run_autonomous.sh --search spiral`
|
||||
2. Read the [Usage Guide](usage.md)
|
||||
3. Check [Troubleshooting](troubleshooting.md) if issues arise
|
||||
|
||||
@@ -56,7 +56,7 @@ bash scripts/kill_simulation.sh
|
||||
lsof -i :5760
|
||||
|
||||
# Restart simulation
|
||||
bash scripts/run_autonomous.sh --mission hover
|
||||
bash scripts/run_autonomous.sh --search spiral
|
||||
```
|
||||
|
||||
### MAVROS Connection Failed
|
||||
@@ -247,7 +247,7 @@ bash scripts/kill_simulation.sh
|
||||
sleep 5
|
||||
|
||||
# Restart
|
||||
bash scripts/run_autonomous.sh --mission hover
|
||||
bash scripts/run_autonomous.sh --search spiral
|
||||
```
|
||||
|
||||
### Full Reset
|
||||
@@ -262,7 +262,7 @@ pkill -9 -f ros2
|
||||
rm -rf ~/.ardupilot/eeprom.bin
|
||||
|
||||
# Restart
|
||||
bash scripts/run_autonomous.sh --mission hover
|
||||
bash scripts/run_autonomous.sh --search spiral
|
||||
```
|
||||
|
||||
### Reinstall
|
||||
|
||||
@@ -2,27 +2,30 @@
|
||||
|
||||
## Running the Simulation
|
||||
|
||||
### Option 1: Autonomous Mode (Recommended)
|
||||
### Option 1: Autonomous Search (Recommended)
|
||||
|
||||
The simplest way to run - the UAV automatically arms, takes off, and flies:
|
||||
The UAV automatically arms, takes off, and searches for ArUco markers:
|
||||
|
||||
```bash
|
||||
source activate_venv.sh
|
||||
bash scripts/run_autonomous.sh --mission hover
|
||||
bash scripts/run_autonomous.sh --search spiral
|
||||
```
|
||||
|
||||
**Mission types:**
|
||||
- `hover` - Take off to 5m, hover 30 seconds, land
|
||||
- `square` - Fly a 5m square pattern
|
||||
- `circle` - Fly a circular pattern (5m radius)
|
||||
**Search algorithms:**
|
||||
- `spiral` - Expanding square spiral from current position
|
||||
- `lawnmower` - Systematic back-and-forth lane coverage
|
||||
- `levy` - Random walk with Lévy-distributed step lengths
|
||||
|
||||
**Options:**
|
||||
```bash
|
||||
# Software rendering (WSL/no GPU)
|
||||
bash scripts/run_autonomous.sh --software-render --mission hover
|
||||
bash scripts/run_autonomous.sh --software-render --search spiral
|
||||
|
||||
# Custom altitude and duration
|
||||
python3 src/autonomous_controller.py --altitude 10 --duration 60 --mission hover
|
||||
# Custom altitude
|
||||
bash scripts/run_autonomous.sh --search lawnmower --altitude 10
|
||||
|
||||
# Run directly
|
||||
python3 src/main.py --search spiral --altitude 5
|
||||
```
|
||||
|
||||
### Option 2: Manual Mode (MAVProxy)
|
||||
@@ -104,30 +107,6 @@ ros2 topic pub /ugv/goal_pose geometry_msgs/PoseStamped \
|
||||
"{header: {frame_id: 'odom'}, pose: {position: {x: 5, y: 5, z: 0}}}"
|
||||
```
|
||||
|
||||
## Mission Planner
|
||||
|
||||
Run coordinated multi-vehicle missions:
|
||||
|
||||
```bash
|
||||
ros2 run uav_ugv_simulation mission_planner
|
||||
```
|
||||
|
||||
Send commands:
|
||||
```bash
|
||||
# Load demo mission
|
||||
ros2 topic pub /mission/command std_msgs/String "data: 'load'"
|
||||
|
||||
# Start mission
|
||||
ros2 topic pub /mission/command std_msgs/String "data: 'start'"
|
||||
|
||||
# Pause/Resume
|
||||
ros2 topic pub /mission/command std_msgs/String "data: 'pause'"
|
||||
ros2 topic pub /mission/command std_msgs/String "data: 'resume'"
|
||||
|
||||
# Abort
|
||||
ros2 topic pub /mission/command std_msgs/String "data: 'abort'"
|
||||
```
|
||||
|
||||
## Stopping the Simulation
|
||||
|
||||
```bash
|
||||
@@ -141,10 +120,9 @@ bash scripts/kill_simulation.sh
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `config/uav_params.yaml` | UAV navigation/vision parameters |
|
||||
| `config/ugv_params.yaml` | UGV motion parameters |
|
||||
| `config/mavros_params.yaml` | MAVROS connection settings |
|
||||
| `config/geofence_params.yaml` | Geofence boundaries |
|
||||
| `config/search.yaml` | Search algorithm parameters |
|
||||
| `config/uav.yaml` | UAV navigation/vision parameters |
|
||||
| `config/ugv.yaml` | UGV motion parameters |
|
||||
| `config/ardupilot_gps_denied.parm` | ArduPilot EKF configuration |
|
||||
|
||||
## Next Steps
|
||||
|
||||
@@ -93,7 +93,7 @@ bash setup.sh
|
||||
|
||||
```bash
|
||||
source activate_venv.sh
|
||||
bash scripts/run_autonomous.sh --software-render --mission hover
|
||||
bash scripts/run_autonomous.sh --software-render --search spiral
|
||||
```
|
||||
|
||||
## Performance Tips
|
||||
@@ -178,7 +178,7 @@ cd ~/sim/uav_ugv_simulation
|
||||
source activate_venv.sh
|
||||
|
||||
# 4. Run with software rendering
|
||||
bash scripts/run_autonomous.sh --software-render --mission hover
|
||||
bash scripts/run_autonomous.sh --software-render --search spiral
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
Reference in New Issue
Block a user