This project implements an autonomous indoor navigation system for an Unmanned Ground Vehicle using LiDAR and a Depth Camera, built on top of the ROS2 Navigation Stack. It enables reliable navigation in indoor environments through real-time mapping, localization, and path planning.
The system uses LiDAR for global mapping and navigation with an A*-based global planner, and a Depth Camera for local obstacle detection. For smooth and adaptive local motion, it employs the Model Predictive Path Integral controller, allowing the UGV to safely maneuver around dynamic obstacles and navigate tight indoor spaces.
For map building, the system uses SLAM Toolbox, which enables online 2D SLAM using LiDAR data. Once a map is created, AMCL is used to localize the robot within that map during autonomous navigation.
You can install and run the project in two ways:
A Docker setup is available for easier and more reproducible deployment.
Note: Make sure you have docker
and docker-compose
installed on your system.
To run the simulation using Docker Compose:
- Clone the repository:
git clone https://github.com/dimianx/autonav
cd autonav/docker
- Build the image:
docker-compose build
- Run the container:
docker-compose up
- Find the container ID of the running simulation container (look for the image dimianx/autonav:devel):
docker container ls
- Access the container's shell (you will need two shell sessions for the container):
docker exec -it <container_id> bash
Replace <container_id>
with the actual ID from the previous command.
- Build the project inside the container:
colcon build
- Source the environment:
source /entrypoint.sh
- First, start the Gazebo simulation:
ros2 launch autonav_gz simulation.launch.py
Note: Run either step 9 or step 10 below, depending on whether you're using navigation with an existing map or building a new map.
- Navigation stack with a pre-built map:
- In a second shell session, access the container again:
docker exec -it <container_id> bash
- Launch the navigation stack:
ros2 launch autonav_navigation gz_autonav_navigation.launch.py
- Mapping Mode (to build the map):
- In a second shell session, access the container again:
docker exec -it <container_id> bash
- Launch the mapping stack:
ros2 launch autonav_navigation gz_autonav_mapping.launch.py
This project requires ROS Humble and Ubuntu 22.04. Make sure ROS is properly installed and sourced before proceeding.
- Clone the repository:
git clone https://github.com/dimianx/autonav
cd autonav
- Create a new ROS workspace:
mkdir -p ./workspace/src
- Move the
autonav_gz
,autonav_navigation
, andautonav_rviz
ROS packages into the created workspace
mv -v ./autonav_gz ./workspace/src
mv -v ./autonav_navigation ./workspace/src
mv -v ./autonav_rviz ./workspace/src
- Install
rosdep
if it's not already installed:
sudo apt install python3-rosdep
- Install Clearpath Robotics Dependencies:
- Add the Clearpath APT repository and update package lists:
wget https://packages.clearpathrobotics.com/public.key -O - | sudo apt-key add - sh -c 'echo "deb https://packages.clearpathrobotics.com/stable/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/clearpath-latest.list' sudo apt update
- Add the Clearpath rosdep source and update rosdep:
wget https://raw.githubusercontent.com/clearpathrobotics/public-rosdistro/master/rosdep/50-clearpath.list \ -O /etc/ros/rosdep/sources.list.d/50-clearpath.list rosdep update
- Install project's dependencies:
cd ./workspace
rosdep install --from-paths src --ignore-src -r -y
- Build the project:
colcon build
- Source the environment:
source ./install/setup.bash
- First, start the Gazebo simulation:
ros2 launch autonav_gz simulation.launch.py
Note: Run either step 10 or step 11 below, depending on whether you're using navigation with an existing map or building a new map.
-
Navigation stack with a pre-built map:
- In a second shell session, source the environment:
source <PATH TO THE PROJECTS ROOT>/workspace/install/setup.bash
Note: Replace
<PATH TO THE PROJECTS ROOT>
with the actual path to your project's root directory.- Launch the navigation stack:
ros2 launch autonav_navigation gz_autonav_navigation.launch.py
-
Mapping Mode (to build the map):
- In a second shell session, source the environment:
source <PATH TO THE PROJECTS ROOT>/workspace/install/setup.bash
Note: Replace
<PATH TO THE PROJECTS ROOT>
with the actual path to your project's root directory.- Launch the mapping stack:
ros2 launch autonav_navigation gz_autonav_mapping.launch.py