Autonomous Robot Navigation

May 2026GitHub

ROS2 · Python · Nav2 · Gazebo · Docker

A full ROS2 mapping and navigation pipeline for TurtleBot3 in Gazebo, from SLAM map generation to autonomous multi-goal execution.

  1. 1. Context
  2. 2. System Architecture
  3. 3. Execution Flow
  4. 4. Results
  5. 5. Engineering Decisions and Reliability Work
  6. 6. Deliverable Value

1. Context

Built as an intern onboarding task for the MD25010 grant project at New Uzbekistan University, this project implements a full SLAM and autonomous navigation pipeline in ROS2 using TurtleBot3 in Gazebo.

The objective was to produce a reproducible, end-to-end robotics workflow: containerized setup, map creation, autonomous mission execution, and measurable results.

2. System Architecture

The stack combines ROS2, Nav2, SLAM Toolbox, Gazebo, and RViz inside Docker, with browser-based VNC for launching and observing the robotics desktop environment.

  • ROS2 package build and runtime orchestration inside a consistent container
  • Gazebo simulation for robot/world dynamics
  • SLAM Toolbox for map generation in lifelong mapping mode
  • Nav2 for localization, planning, and goal-following
  • RViz for map and navigation state inspection

This architecture avoids local dependency drift and makes reruns predictable across machines.

3. Execution Flow

The workflow is intentionally divided into three stages so each milestone is independently verifiable.

Docker container · ROS2 Humbledockercompose upcolcon buildmd25010_navGazeboTurtleBot3 simSLAM Toolboxlifelong modeteleopkeyboardRVizlive mapsend_nav_goals5 goalsNav2 + AMCLplan + localizemaps/ volume.pgm .yaml .csv
Docker Compose builds one container with ROS2 Humble, Gazebo, Nav2 and SLAM Toolbox, so every run starts from the same environment. Then colcon builds the md25010_nav package inside it.
How data moves through the pipeline, from container build to autonomous navigation.

Part A - Environment and Package Setup

  • Build and launch containerized workspace with Docker Compose
  • Build the ROS2 package via colcon
  • Configure TurtleBot3 model and runtime environment

Part B - Mapping (SLAM)

  • Launch Gazebo + RViz + SLAM stack
  • Teleoperate the robot to maximize map coverage
  • Export occupancy grid map artifacts for reuse

Part C - Autonomous Navigation

  • Switch from mapping to full navigation stack
  • Run scripted multi-goal execution (send_nav_goals) or manual goal placement
  • Log mission outcomes into CSV for evaluation

4. Results

Navigation evaluation reached 5 out of 5 goal completions with low terminal error, and every run produced auditable artifacts (saved maps, screenshots, and navigation logs).

  • Goal completion: 5/5 SUCCESS
  • Arrival error range: approximately 0.03m to 0.11m
  • Runtime metrics: per-goal timing stored for comparison and tuning
1234start / goal 5
  • Robot. A TurtleBot3; the blue wedge is its front.
  • Laser scan. What the robot can see right now; obstacles block it and leave shadows.
  • Obstacle. A pillar the robot has to drive around.
  • Goal. A target to reach; it turns green once the robot arrives.
  • Path. The route driven so far.
  • Start. Where the run begins and ends (goal 5).
goal_1 at (1.5, 0.0) m: reached in 135 s with 0.04 m arrival error.time135 s
The five-goal run: 5/5 reached. Room layout is a schematic; coordinates, times and errors are from the real run.

5. Engineering Decisions and Reliability Work

A key part of the project was making robotics-in-container execution reliable enough for repeated testing.

  • Enabled software rendering (LIBGL_ALWAYS_SOFTWARE=1) to stabilize Gazebo without GPU passthrough
  • Mounted map directories to preserve outputs between container sessions
  • Blocked problematic external model host lookup to prevent startup hangs

These choices improved startup stability and made the environment practical for iterative experimentation.

6. Deliverable Value

This repository is a reference implementation for ROS2 simulation workflows that need repeatability, observability, and measurable navigation outcomes.

It provides a clean base for future extensions such as Nav2 parameter tuning, map quality analysis, expanded waypoint missions, and benchmarking alternative planning strategies.