No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.

ros2_slam_auto_navigation package from ros2-slam-auto-navigation repo

ros2_slam_auto_navigation

Package Summary

Tags No category tags.
Version 0.0.0
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description Autonomous Mapping and Navigation Using SLAM Toolbox, Nav2, Gazebo, and Rviz Visualization
Checkout URI https://github.com/taherfattahi/ros2-slam-auto-navigation.git
VCS Type git
VCS Version master
Last Updated 2025-02-04
Dev Status UNKNOWN
CI status No Continuous Integration
Released UNRELEASED
Tags robotics navigation wheel gazebo slam autonomous-driving ros2 autonomous-robots navigation2 rviz2 slam-toolbox ros2-humble
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

SLAM(Simultaneous Localization and Mapping) and navigate autonomusly using NAV2

Additional Links

No additional links.

Maintainers

  • Taher Fattahi

Authors

No additional authors.

ROS2 SLAM Autonomous Navigation with SLAM Toolbox and Nav2

Use the SLAM Toolbox to generate a map of the environment, then utilize the Nav2 stack for autonomous navigation within that mapped space. Rviz provides visualization of the robot, its surroundings, and ongoing navigation tasks.

Demo Video

IMAGE

Overview

This project provides:

  • Gazebo simulation environment.
  • ROS2 Control integration to handle the robot’s joints and controllers.
  • SLAM Toolbox for online (asynchronous) map building as the robot explores.
  • Nav2 stack to plan paths and autonomously navigate in the mapped environment.
  • Rviz2 visualization for monitoring robot state, the map, and navigation plans.

Transform frame

tf2_frames

Dependencies and Setup

sudo apt install ros-<distro-name>-xacro 

  • Gazebo ROS Packages
sudo apt install ros-<distro-name>-gazebo-ros-pkgs

  • ROS2 Control
sudo apt install ros-<distro-name>-ros2-control ros-<distro-name>-ros2-controllers ros-<distro-name>-gazebo-ros2-control

  • SLAM Toolbox
sudo apt install ros-<distro-name>-slam-toolbox

  • Nav2 and Twist Mux
sudo apt install ros-<distro-name>-navigation2 sudo apt install ros-<distro-name>-nav2-bringup sudo apt install ros-<distro-name>-twist-mux

Building the Package

After cloning this repository into your workspace’s

``` directory:

```sh
cd <your_ros2_ws>
colcon build
source install/setup.bash

Usage

  1. Launch the Simulation Run the Gazebo simulation environment and spawn the robot:
ros2 launch ros2_slam_auto_navigation launch_sim.launch.py world_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/worlds/simple.world

  1. Launch SLAM and Navigation In a new terminal (with the workspace sourced), launch the SLAM Toolbox and Nav2 bringup with Rviz:
ros2 launch ros2_slam_auto_navigation slam_navigation.launch.py slam_params_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/config/mapper_params_online_async.yaml use_sim_time:=true

  1. Use Rviz2 for Visualization: Rviz2 should start automatically from the second launch file. In Rviz2:
    • You can visualize the robot’s pose, sensors, and the map being built.
    • Interactively set navigation goals using the “2D Nav Goal” tool once the map and localization are stable.
  2. Autonomous Navigation: Once you have a map (even partial), you can send navigation goals to the robot via Rviz. Nav2 will compute a path and command the robot to reach the desired destination.

Launch Simulator-SLAM-Navigation-RViz commands individually

  1. Launching the Simulation Environment
ros2 launch ros2_slam_auto_navigation launch_sim.launch.py world_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/worlds/simple.world

  1. Starting the SLAM Toolbox (Online, Asynchronous Mode)
ros2 launch slam_toolbox online_async_launch.py slam_params_file:=/home/taher/ros2_ws/src/ros2-slam-auto-navigation/config/mapper_params_online_async.yaml use_sim_time:=true

  1. Initializing the Navigation Stack
ros2 launch nav2_bringup navigation_launch.py use_sim_time:=True

  1. Opening RViz with Navigation Visualization
ros2 run rviz2 rviz2 use_sim_time:=True -d /opt/ros/humble/share/nav2_bringup/rviz/nav2_default_view.rviz

Troubleshooting

  • Simulation Issues: Ensure that Gazebo, ROS2 Control, and joint publisher packages are correctly installed.

  • TF or Robot Description Issues: Check the URDF/Xacro files and the rsp.launch.py to ensure the robot description is being published correctly.

  • Navigation Errors: Confirm that SLAM Toolbox is running and providing a map. Ensure that Nav2 parameters match your robot’s configuration (e.g., footprint, sensor sources).

Contributing

Contributions are welcome. If you find a bug or have a feature request, please open an issue or submit a pull request.

Resources

CHANGELOG
No CHANGELOG found.

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_slam_auto_navigation at Robotics Stack Exchange

No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.