This assignment involves implementing a ROS package for Monte Carlo localization. The completed code should be (more or less) a drop-in replacement for the default ROS localization package.
Complete the unfinished methods in particle_demo.py. You should be able to use the completed script to re-calculate approximate answers for the grid-based localization question from HW2.
You may also test the correctness of your methods by running the tests in tests.py.
Submit your completed file through Web-CAT.
I am providing a partial implementation, including a
fully-functional Particle
class. You should get started
by cloning the appropriate github repository.
The package is organized as follows:
particle_filter/ package.xml CMakeLists.txt launch/ all_but_localization.launch <- launches simulator etc. everything.launch <- launches everything (except teleop.) worlds/ bricks.world <- Gazebo simulation world for testing. rviz/ mc_localization.rviz <- Rviz configuration file. maps/ bricks_map.yaml <- Pre-made map of bricks.world bricks_map.pgm scripts/ map_utils.py mcl_tf.py particle.py mc_localizer.py <- UNFINISHEDThe four Python files in the
scripts
folder serve the
following roles:
map_utils.py
- This is utility code for working with
ROS OccupancyGrid messages. You shouldn't need to modify this code.
mcl_tf.py
- This node broadcasts an appropriate
transform from the odom
to the map
coordinate frame based on the pose estimate provided
by mc_localizer.py
. This page
on ROS coordinate
frame conventions describes the relationship between
the odom
and map
frames.particle.py
- This file contains the definition of
a Particle
class that may be used in the mcl
implementation. You should not need to modify this file, though you
are welcome to do so if you want. You should read this file carefully
so that you understand how to use the Particle
class. mc_localizer.py
UNFINISHED. This should provide a
complete implementation of Monte Carlo localization. Read the Pydoc
comments for specific requirements.