Localisation project for Udacity's Robotics Software Engineer Nanodegree program where I use EMCL algortihm to localise my custom robot inside the Gazebo World!
👉 Ubuntu 16.04 LTS
👉 ROS Kinetic Kame
👉 Gazebo 7.8.1
👉 rviz 1.12.17
👉 C++ 11
👉 ROS AMCL, Navigation, Move Base and Map Server Kinetic packages.
You might need to install the following packages:
$ sudo apt-get install ros-kinetic-navigation
$ sudo apt-get install ros-kinetic-map-server
$ sudo apt-get install ros-kinetic-move-base
$ sudo apt-get install ros-kinetic-amcl
$ sudo apt-get install libignition-math2-dev protobuf-compiler
First, make sure you have sourced your ROS distro into the terminal environment
source /opt/ros/kinetic/setup.bash
Then, create a catkin workspace (skip this step if you already have one)
mkdir -p /home/workspace/catkin_ws/src/
cd /home/workspace/catkin_ws/src
catkin_init_workspace
Clone this repository inside the catkin_ws
folder
git clone https://github.com/MichelleMouse/Where_Am_I.git .
Build the package and source the .bash
setup into the environment
cd ..
catkin_make
source devel/setup.bash
You might need to clone the pgm_map_creator
repository:
cd /home/workspace/catkin_ws/src/
git clone https://github.com/udacity/pgm_map_creator.git
cd ..
catkin_make
If you have any issues at compiling the project have a look at the tab Issues for possible solutions.
Launch the simulation environment and RViz
roslaunch my_robot world.launch
Then, open a second terminal, source ROS and devel/setup.bash
and run the amcl launch file
cd /home/workspace/catkin_ws/
source devel/setup.bash
roslaunch my_robot amcl.launch
To give the robot a goal position, you can take the following approaches:
- Send a
2D Nav Goal
using rviz - Run the node
teleop_twist_keyboard
in another terminal and use the keyboard to control the robot