← All projects

Simulation project

Autonomous Cave Exploration & Obstacle-Avoidance Drone

A simulated drone that explores caves, tunnels and mines without GPS. It builds a live 3D map from a LiDAR, plans collision-free routes through it, picks its own next target and recovers when it gets stuck.

ROS 2Autonomous UAV3D MappingPath PlanningFrontier ExplorationGPS-Denied NavigationObstacle Avoidance

Overview

Caves, tunnels and mines have no GPS, little light and tight walls. This project is the software brain for a drone that can enter such a place by itself: it maps what it sees in 3D, plans a safe path, chooses where to explore next and steers along the path without touching the walls.

It is built on ROS 2 Humble and Ignition Gazebo Fortress with a quadrotor carrying a 3D LiDAR, and has been developed and tested in simulation.

What the project is about

A drone flying through a cave cannot use GPS, cannot count on light, and has walls only a metre or two away on every side. This project gives it a way to cope: it builds a 3D map while it flies, plans a safe path through that map, chooses where to explore next and steers along the path on its own. Everything was developed and tested in simulation.

Coloured 3D voxel map of a tunnel built live from the drone's LiDAR
The tunnel as the drone sees it: a 3D map built live from LiDAR, coloured by height.

How it works

  • Mapping: a 3D LiDAR on the drone feeds OctoMap, which turns the laser points into a grid of small cubes marking free and occupied space.
  • Planning: a D* Lite planner searches that 3D grid for a route with no collisions, and repairs the route when new obstacles appear instead of starting again.
  • Exploring: a frontier explorer finds the edge between mapped and unknown space, picks a safe spot there and sends it to the planner as the next goal.
  • Flying: a tunnel controller follows the planned path by looking ahead along it, holds a safe altitude and keeps away from the walls.
System architecture from simulator and bridge through mapping, planning and flight control
How the pieces connect: the simulator and bridge feed mapping, the planner and explorer decide where to go, and the controller turns the path into flight commands.

Staying out of trouble

Caves are full of dead ends, so the system is built to notice and recover rather than assume the plan always works.

  • The planner keeps a safety margin around every obstacle and smooths the path so the drone never has to make a sharp turn.
  • The explorer rejects targets that sit too close to a wall.
  • If the drone is told to move but barely moves for a couple of seconds, it stops, reverses and turns to give the LiDAR a new view, then plans again.
RViz showing the 3D map during a mission next to the planner and controller terminals
A mission in progress: the 3D map in RViz, with the planner and flight-controller terminals alongside.

Maps and test worlds

The map is stored as small cubes, so the planner works with solid obstacles instead of millions of raw laser points. The system was exercised in several simulated worlds: a rough cave, a mine, a collapsed building and a warehouse.

Occupancy voxels around the drone in RViz
Occupied space around the drone, close up.
The simulated quadrotor in a warehouse test world
The simulated quadrotor in one of the test worlds.

Main settings

PartSetting
Map cell size10 cm
Planner updateabout every 0.8 s
Hover height0.8 m
Top speed0.8 m/s
Look-ahead distance1.0 m

A single command starts the whole mission: the simulator, the transform bridge, mapping and planning, the flight controller and the explorer, each in its own terminal.

RViz with the occupancy grid, path and TF displays enabled
The RViz setup used while developing: occupancy grid, planned path and coordinate frames.

Where it stands

This is a simulation project. The repository documents the system and its tuning values, but there is no formal benchmark of success rate or area covered, so none is claimed here. The planning and control parts are separate from the simulator, so moving them to a real vehicle is a matter of replacing the simulated sensors and flight interface.

Code, launch instructions and configuration are in the project repository.

Media

Coloured 3D voxel map of a tunnel built live from the drone's LiDAR
Coloured 3D voxel map of a tunnel built live from the drone's LiDAR
System architecture from simulator and bridge through mapping, planning and flight control
System architecture from simulator and bridge through mapping, planning and flight control
RViz showing the 3D map during a mission next to the planner and controller terminals
RViz showing the 3D map during a mission next to the planner and controller terminals
Occupancy voxels around the drone in RViz
Occupancy voxels around the drone in RViz
RViz with the occupancy grid, path and TF displays enabled
RViz with the occupancy grid, path and TF displays enabled
The simulated quadrotor in a warehouse test world
The simulated quadrotor in a warehouse test world