Project: Particle Filter-Based Robot Localization
November 12, 2023
Abstract
Based on the information from the ”Particle Filter” slides, here is a project idea for students
involving the implementation of a Particle Filter for localization and navigation using Python. The
project is designed to be straightforward enough for students with some programming experience,
yet challenging enough to provide a comprehensive understanding of Particle Filters in a practical
scenario.
1 Project Description
In this project, students will implement a Particle Filter to estimate the position of a robot moving in
a two-dimensional space. The robot’s environment will be represented as a grid, where each cell can
be either an obstacle or free space. The robot will have access to a simple sensor that provides noisy
measurements of its distance to the nearest obstacle in its front, left, right, and back directions.
1.1 Objectives
• Implement a Particle Filter: Students will develop a Particle Filter to estimate the robot’s
location based on sensor readings and a map of the environment.
• Simulate Robot Movement: Create a simulation where the robot moves a certain number of
steps in the environment, making random turns and moves.
• Sensor Data Simulation: Generate simulated sensor data based on the robot’s actual position
and the map.
• Visualization: Implement real-time visualization of the particle cloud and the estimated posi
tion of the robot in comparison to its actual position.
1.2 Implementation Approaches
Basic Python Implementation:- Use standard Python libraries (‘numpy‘, ‘matplotlib‘ for visu
alization).- Represent the map as a 2D array, the robot’s position as coordinates, and particles as
objects with position and weight attributes.- Implement particle resampling, motion update, and
measurement update functions.
Object-Oriented Approach:- Define classes for the Robot, Particle, and Map.- Implement
methods for movement, sensing, and updating in each class.- Use inheritance to showcase different
types of particles or robots, if desired.
Advanced Visualization with Pygame:- Utilize the ‘pygame‘ library for more interactive
and sophisticated visualization.- Allow real-time interaction, e.g., manually controlling the robot’s
movement or altering the environment.
Particle filter
Example
Here is the example of particle filter localization on the 2D space.
Usage
This repository contains landmark-based particle filter localization. You can run script with:
python run.py [-h] [--width WIDTH] [--height HEIGHT] [--landmarks LANDMARKS] [--particles PARTICLES]
[--std_position STD_POSITION] [--std_heading STD_HEADING] [--steps STEPS]