Turtlebot 3: SLAM and Navigation

Written by DK Kang

UPDATE:

This is a still on going project. There are some future work to be added

  • A very simpe navigation algorithm is implemented, and it experiences setting the goal outside the reachable distance.
  • This will be tested on a real robot outside the house enviroment gazebo
  • Ultimately, the goal is to make a robot to navigate any sort of enviroments including ramp without collision

OBJECTIVE

The goal is to use the Turtlebot 3 to autonomously map an environment and then navigate within the map using the slam_toolbox

REQUIREMENTS & SETUP

REUQIRMENTS

setup

I will be using ROS-noetic version.

  1. sudo apt-get update

  2. sudo apt-get upgrade

  3. install ROS-noetic from following website: http://wiki.ros.org/noetic/Installation/Ubuntu

  4. install pythpn3rosdep

    sudo apt install python3-rosdep
    sudo rosdep init
    rosdep update
    
  5. install some dependencies sudo apt install python3-vcstool git gitk python3-pip catkin-lint

  6. install slam-toolboxby runing sudo apt install ros-eloquent-slam-toolbox

  7. install ROS_navigation by running sudo apt install ros-noetic-navigation

  8. go to yout home dir `cd ~'

  9. Create workspace: mkdir ws and cd _ws

  10. mkdir src and cd src

  11. git clone https://github.com/ME495-EmbeddedSystems/homework04-rubberdk.git

  12. cd .. to cd into your ws dir and catkin_make

  13. edit your ./bashrc and add export TURTLEBOT3_MODEL=burger in the file. If we are not using burger, change the model name accordingly

Nodes

This project include one node auto_nav used for autonomous mapping & navigation

This node generates xy-coordinates that move_base uses for the navigation of the turtlebot. goal coordinate points are generated by a simple algorithm that adds random numbers in between -0.5 and 0.5 to the previous goal coordinates allowing the robot to move slowly and spontaneously.

SUBSCRIBER: + map_sub (/map) ~ information about the robot's current knowledge of the environment type = nav_msgs/OccupancyGrid

MAPS

The maps directory contains two sets of map data.

  1. map.yaml and maps.pgm were mapped by mannual control of the turtlebot
  2. expl.yaml and expl.pgm were mapped autonomously by the turtlebot

REUSLTS

make sure to source your workspace by source ~/ws/devel/setup.bash

Demo gif files are fast-forwarded for your convinence. Refer to the YouTube link for the full video.

Autonomous SLAM & Navigation

roslaunch hw4 auto_nav.launch

This launch file makes the turtlebot to autonomously navigate and do mapping

auto_nav

Full Video: https://youtu.be/ceaA-sR2w_s