# ND2 - Project 2 - localization - writeup

utilize ROS packages to accurately localize a mobile robot inside a provided map in the Gazebo and RViz simulation envs.

Building a mobile robot for simulated tasks.

Creating a ROS package -> launches a custom robot model in a Gazebo world and utilizes AMCL & Navigation Stack.

tuning specific parameters

URDF

Launch

maps

URDF = Unified Robot Description Format

Xacro (XML Macros) = shorter and more readable XML files by using macros that expand to larger XML expressions.

udacity\_bot.xacro = \[1]robot specific information like links, joints, actuators, etc.\[2] visual + collision + inertial

.gazebo = add plugin for driver / camera image / hokuyo

[DiffDrivePlugin.cc](https://bitbucket.org/osrf/gazebo/src/afe08834571835008fa7419f1feba5b7f89b9d62/plugins/DiffDrivePlugin.cc?at=gazebo7\&fileviewer=file-view-default\\)

Gazebo is a physics simulator,

[RViz](https://classroom.udacity.com/nanodegrees/nd209/parts/c199593e-1e9a-4830-8e29-2c86f70f489e/modules/8855de3f-2897-46c3-a805-628b5ecf045b/lessons/91d017b1-4493-4522-ad52-04a74a01094c/concepts/809ef993-dbbb-49d4-8520-0bae34921a60) can visualize any type of sensor data being published over a ROS topic like camera images, point clouds, Lidar data, etc.

Adaptive Monte Carlo Localization (AMCL) dynamically adjusts the number of particles. This adaptive process offers a significant computational advantage over MCL.

[http://wiki.ros.org/amcl](http://wiki.ros.org/amcl)

* The`robot_state_publisher`built out the entire tf tree of your robot based on the URDF file. But it didn't extend that tree by linking in the 'map' frame. The amcl package does that automatically by linking the 'map' and 'odom' frames.
* The amcl package relies entirely on the robot’s odometry and the laser scan data.

[http://wiki.ros.org/move\_base](http://wiki.ros.org/move_base)

move\_base utilizes a costmap - where each part of the map is divided into occupied / unoccupied. As the robot moves around, a local costmap(seeing by laser range finder), in relation to the global costmap, keeps getting updated allowing the package to define a continuous path for the robot to move along.

built-in corrective behaviors

Each arrow is essentially a particle defining the pose of the robot that your localization package created. Your goal is to add/tune the parameters that will help localize your robot better and thereby improve the pose array.
