Skip to content

This project involves an autonomous indoor navigation system for a UGV using the ROS 2 Navigation Stack. It integrates SLAM, AMCL localization, global path planning with A*, and local obstacle avoidance via a Model Predictive Path Integral controller. LiDAR handles mapping and navigation, while a depth camera aids in close-range obstacle detection,

License

Notifications You must be signed in to change notification settings

dimianx/autonav

Repository files navigation

Autonomous Indoor Navigation for UGV

Demo

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.

Installation and usage

You can install and run the project in two ways:

1. Using Docker

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:

  1. Clone the repository:
git clone https://github.com/dimianx/autonav
cd autonav/docker
  1. Build the image:
docker-compose build
  1. Run the container:
docker-compose up
  1. Find the container ID of the running simulation container (look for the image dimianx/autonav:devel):
docker container ls
  1. 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.

  1. Build the project inside the container:
colcon build
  1. Source the environment:
source /entrypoint.sh
  1. 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.

  1. Navigation stack with a pre-built map:
    1. In a second shell session, access the container again:
    docker exec -it <container_id> bash
    1. Launch the navigation stack:
    ros2 launch autonav_navigation gz_autonav_navigation.launch.py
  2. Mapping Mode (to build the map):
    1. In a second shell session, access the container again:
    docker exec -it <container_id> bash
    1. Launch the mapping stack:
    ros2 launch autonav_navigation gz_autonav_mapping.launch.py

2. Manual Installation

This project requires ROS Humble and Ubuntu 22.04. Make sure ROS is properly installed and sourced before proceeding.

  1. Clone the repository:
git clone https://github.com/dimianx/autonav
cd autonav 
  1. Create a new ROS workspace:
mkdir -p ./workspace/src
  1. Move the autonav_gz, autonav_navigation, and autonav_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
  1. Install rosdep if it's not already installed:
sudo apt install python3-rosdep
  1. Install Clearpath Robotics Dependencies:
    1. 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
    1. 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
    
  2. Install project's dependencies:
cd ./workspace
rosdep install --from-paths src --ignore-src -r -y
  1. Build the project:
colcon build
  1. Source the environment:
source ./install/setup.bash
  1. 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.

  1. Navigation stack with a pre-built map:

    1. 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.

    1. Launch the navigation stack:
    ros2 launch autonav_navigation gz_autonav_navigation.launch.py
  2. Mapping Mode (to build the map):

    1. 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.

    1. Launch the mapping stack:
    ros2 launch autonav_navigation gz_autonav_mapping.launch.py

About

This project involves an autonomous indoor navigation system for a UGV using the ROS 2 Navigation Stack. It integrates SLAM, AMCL localization, global path planning with A*, and local obstacle avoidance via a Model Predictive Path Integral controller. LiDAR handles mapping and navigation, while a depth camera aids in close-range obstacle detection,

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published