Udacity Robotics Software Engineer Nanodegree is one of Udacity classes, in which there are lectures about how to emulate and control robots in ROS environment including gazebo, RViz, and so on. The goal of this project "Where Am I" is to implement source code to estimate current state of a robot car moving in the house, and navigate to designated position in the map. To estimate the position from LIDAR mounted in front of the car, Udacity encourage to use ROS package amcl which implements adaptive Monte Carlo localization algorithm. Using amcl, robot car can recognize current state probabilistically.
In project 2, I implemented algorithm of robot car chasing white ball located in the house using image captured by camera. In project 3, I modified source code implemented in project 2 so as to use amcl localization package, and move_base navigation package.
After launching the environment, robot car is placed on the map in RViz window. If you specify In RViz window If you click the 2D Nav Goal button in the toolbar, then click and drag on the map, you can send the goal to the robot. It will start moving and localize itself in the process.
This gif animation of localization example is shown below.
- Install ROS kinetic in Ubuntu 16.04 environment (time consuming step)
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-desktop-full
- Install ROS packages used in this project.
$ 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
- Clone this github repository.
$ git clone https://github.com/tnakae/Udacity-RoboND-p3-WhereAmI.git
- Build.
$ cd Udacity-RoboND-p3-WhereAmI/catkin_ws/
$ catkin_make
- Launch environment in Ubuntu GUI. It launches gazebo and RViz.
$ source devel/setup.bash
$ roslaunch my_robot world.launch
- Open another terminal, and launch AMCL algorithm.
$ cd Udacity-RoboND-p3-WhereAmI/catkin_ws/
$ source devel/setup.bash
$ roslaunch my_robot amcl.launch
- In RViz window, select
File
->Open Config File
, and opencatkin_ws/src/config.rviz
. Map is shown around the robot in RViz window. - Push
2D Nav Goal
button in the toolbar of RViz, and, then click and drag on the map to send the goal to the robot. It will start moving and localize itself in the process.