2026-02-23 21:20:55 -05:00
2026-02-23 16:00:12 -05:00
2026-02-23 15:40:43 -05:00
2026-02-09 05:51:51 +00:00
2026-02-23 16:00:12 -05:00
2026-02-23 16:00:12 -05:00
2026-02-23 16:00:12 -05:00
2026-02-22 17:23:54 -05:00
2026-02-22 17:23:54 -05:00
2026-02-09 03:39:49 +00:00
2026-02-23 21:20:55 -05:00
2026-02-11 03:02:01 +00:00
2026-02-09 03:39:49 +00:00

UAV-UGV Simulation

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
  • ROS 2 Integration: Full ROS 2 Humble/Jazzy support

Requirements

  • Ubuntu 22.04 or 24.04 (WSL2 supported)
  • 16GB RAM recommended
  • 50GB disk space
  • NVIDIA GPU recommended (software rendering available)
  • ffmpeg, x11-utils, xdotool (for simulation recording)

Installation

git clone <repository-url> ~/sim/uav_ugv_simulation
cd ~/sim/uav_ugv_simulation
bash setup.sh

Installation takes 20-40 minutes (builds ArduPilot from source).

Quick Start

cd ~/sim/uav_ugv_simulation
source activate_venv.sh

# Spiral search (default)
bash scripts/run_autonomous.sh --search spiral

# Lawnmower search
bash scripts/run_autonomous.sh --search lawnmower

# Lévy walk search
bash scripts/run_autonomous.sh --search levy

# WSL/Software rendering
bash scripts/run_autonomous.sh --software-render --search spiral

Manual Mode (MAVProxy)

bash scripts/run_simulation.sh
# Wait for EKF initialization (~15 seconds), then:
# mode guided
# arm throttle force
# takeoff 5

ROS 2 Mode

source /opt/ros/humble/setup.bash
ros2 launch uav_ugv_simulation full_simulation.launch.py

Search Algorithms

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

Navigation uses only relative positioning:

  • Visual odometry from cameras
  • Optical flow sensors
  • IMU integration
  • Local coordinate frames (NED)

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:

ctrl.configure_speed_limits(wpnav_speed=200, wpnav_accel=150)

Commands

Command Description
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

Documentation

Description
No description provided
Readme 646 KiB
Languages
Python 78.7%
Shell 21.3%