This project form part of the Udacity's Robotics Software Engineer Nanodegree. It is aimed at demonstrating how to localize a mobile robot in ROS using the Adaptive Monte Carlo Localization (AMCL). The repository consist of the following:
- A Gazebo world and a mobile robot coloned from this repo.
- ROS packages: map_server, amcl, and move_base.
- The
maps
directory containing pgm map file generated using the pgm_map_creator.
- ROS and Gazebo running on Linux.
- CMake and gcc/g++.
- Install dependencies using the following commands:
$ sudo apt-get update $ sudo apt-get upgrade -y $ sudo apt-get install ros-<your distro>-map-server $ sudo apt-get install ros-<your distro>-amcl $ sudo apt-get install ros-<your distro>-move-base
-
Clone the repo to the src folder of your catkin workspace
$ git clone https://github.com/yabdulra/Where-Am-I.git
Follow this guide to create a catkin workspace if you do not have one.
-
Within the same src folder, clone the teleop package
$ git clone https://github.com/ros-teleop/teleop_twist_keyboard
-
Change directory to
catkin_ws
and build.$ cd .. $ catkin_make
-
Source your workspace and launch the simulation world.
$ source devel/setup.bash $ roslaunch my_robot world.launch
-
In a new terminal, source your workspace and launch the amcl.
$ source devel/setup.bash $ roslaunch my_robot amcl.launch
This will launch the map_server, move_base, and the amcl.
-
In a new terminal. source your workspace and run the
teleop
node.$ source devel/setup.bash $ rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Use this terminal to move the robot around. You will observe on rviz how AMCL is updating the particles as the robot pose is updated.
You should consider checking the
sample_screenshots
folder for views of the robot localizing itself at different positions on the map.