Skip to content

This project implements grid-based FastSLAM1.0 and FastSLAM2.0 algorithms to solve SLAM problem in a simulated environment.

Notifications You must be signed in to change notification settings

meh-maw/FastSLAM

 
 

Repository files navigation

FastSLAM

Courtesy of https://github.com/yingkunwu/FastSLAM

Introduction

The purpose of this project is to simulate a Simultaneously Localization and Mapping problem by allowing a robot with beam sensors to navigate in a 2D grid map. In this project, I implemented both the famous particle filter based SLAM algorithm, FastSLAM1.0 and FastSLAM2.0, in python. The program is able to work in any given grid map as long as the environment is static and each grid is either free (0) or occupied (1).

Usage

Run the following command to run FastSLAM1.0:

python fastslam1.py -m [given map] -p [number of particles]

Similarly, run the following command to run FastSLAM2.0:

python fastslam2.py -m [given map] -p [number of particles]

For now the given map should be either 'scene-1' or 'scene-2', and the number of particles should be a integer.

Result

FastSLAM 1.0

result

result

FastSLAM 2.0

result

result

References

Dependencies

You need to install opencv-python and matplotlib. After installing matplotlib you might need to downgrade your numpy to version 1.23.

What you need to do

  • Note that this implementation uses a simple model for the robot. In your case you need to use a model that reflects the motion of the car. Note that you do not need to drive fast when doing the SLAM, keep it slow. Then using kinematic bicycle model would be valid.
  • In the current implementation the control inputs are pre-determined and are loaded using config.yaml. In your case you need to calculate them on-the-fly.
  • Use a simple controller to travel along the circuit (e.g. your wall following algorithm) to collect measurements and complete the localisation and mapping task.

About

This project implements grid-based FastSLAM1.0 and FastSLAM2.0 algorithms to solve SLAM problem in a simulated environment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%