Python implementation of a Particle Filter for robot localization. This work was done for Machine Learning and Artificial Intelligence for Robotics, an elective course I took in my MSR journey. The implementation is based on the particle filter as explained in Probabilistic Robotics, by Thrun, Sebastian; Wolfram, Burgard; Fox, Dieter. MIT Press Books, 2006.
This is a modified version of the one requested for the aforementioned course.
main.py
- the executabledata_utils.py
- utilities for dealing with the datasetmeasurement_model.py
- implementation of measurement model and helper functionsmotion_model.py
- implementation of motion model for diff drive robotparticle_filter.py
- class that represents a particle filterplotting.py
- utilities for plottingprob_utils.py
- probability function helpersstate.py
- pseudo-enum that represents a state
The user should run main.py
to run the particle filter on the provided data. This provides an estimation of location in a map, while also plotting ground truth data.
At the top of main
some variables allow to tinker with parameters easily.
The dataset used is a modified version of the work made available by Keith Leung, Yoni Halpern, Tim Barfoot, and Hugh Liu [*]. It was provided by Prof. Brenna Argall in the Fall 2023 edition of the course Machine Learning and Artificial Intelligence for Robotics at Northwestern University.
[*] Leung K Y K, Halpern Y, Barfoot T D, and Liu H H T. “The UTIAS Multi-Robot Cooperative Localization and Mapping Dataset”. International Journal of Robotics Research, 30(8):969–974, July 2011.
This work was made in an academic environment, with certain restrictions for pedagogic purposes.
This code is not guaranteed to be free of bugs.
This code was tested using:
python 3.9.6
numpy 1.26.3
matplotlib 3.8.2