DarkGeekMS / ros-slam-demo

A simple demonstration of Simultaneous Localization and Mapping (SLAM) using ROS and Gazebo simulator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROS SLAM Demo

A simple demonstration of Simultaneous Localization and Mapping (SLAM) using ROS and Gazebo simulator.

Description

  • Algorithm : Grid-Based FastSLAM (from slam-gmapping)

  • Robot : TurtleBot3 Burger (from turtlebot3)

  • Sensor : 360 Laser Distance Sensor LDS-01

  • Environment : Custom

Prerequisites

  • ROS Noetic

  • Rviz 1.14.7

  • Gazebo 11.5

  • ROS Noetic TurtleBot3 : sudo apt install ros-noetic-turtlebot3-*

Usage

  • Setup catkin workspace :

    mkdir -p /home/<username>/workspace/catkin_ws/src
    cd catkin_ws/src/
    catkin_init_workspace
    cd ..
    catkin_make
  • Clone the repo packages :

    cd /home/<username>/workspace/catkin_ws/src
    git clone https://github.com/DarkGeekMS/ros-slam-demo.git
  • Build and source the packages :

    cd /home/<username>/workspace/catkin_ws
    catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3
    source devel/setup.bash
  • Source TurtleBot3 model to ~/.bashrc :

    echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc
    source ~/.bashrc
  • Run the required packages for the demo :

    # Terminal 1 (ROS Master Node)
    roscore
    
    # Terminal 2 (TurtleBot3 Gazebo Simulation)
    cd /home/<username>/workspace/catkin_ws
    source devel/setup.bash
    roslaunch turtlebot3_gazebo turtlebot3_world.launch
    
    # Terminal 3 (TurtleBot3 GMapping SLAM)
    cd /home/<username>/workspace/catkin_ws
    source devel/setup.bash
    roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
    
    # Terminal 3 (TurtleBot3 Teleoperation)
    cd /home/<username>/workspace/catkin_ws
    source devel/setup.bash
    roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
  • Alternatively, you can run the demo using a single launch file [SLOWER] :

    cd /home/<username>/workspace/catkin_ws
    source devel/setup.bash
    roslaunch turtlebot3_gazebo turtlebot3_slam_demo.launch
  • Save the output map :

    rosrun map_server map_saver -f OutMap

Used Packages

Visual Results

Figure(1): World in Gazebo simulator.

Figure(2): A 3D view of TurtleBot3 in Gazebo simulator.

Figure(3): A view of a portion of result occupancy grid map (OGM) in Rvis.

About

A simple demonstration of Simultaneous Localization and Mapping (SLAM) using ROS and Gazebo simulator


Languages

Language:C++ 89.7%Language:CMake 4.5%Language:Python 2.1%Language:TeX 1.0%Language:C 1.0%Language:Lua 0.8%Language:Makefile 0.8%Language:Shell 0.3%