GithubHelp home page GithubHelp logo

sharma-n / slam Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 5.0 11.17 MB

Implementations of various Simultaneous Localization and Mapping (SLAM) algorithms using Octave / MATLAB.

License: MIT License

MATLAB 100.00%
slam slam-algorithms ekf-slam ukf-slam fast-slam ls-slam graph-slam matlab octave robotics

slam's Introduction

Simultaneous Localization and Mapping (SLAM)

Simultaneous Localization and Mapping (SLAM) is an important problem in robotics aimed at solving the chicken-and-egg problem of figuring out the map of the robot's environment while at the same time trying to keep track of it's location in that environment. There are multiple methods of solving the SLAM problem, with varying performances. This repository aims to provide a backbone for some approaches to SLAM. This repository was a result of following Prof. Cyrill Stachniss' lectures from this YouTube playlist.

Approaches to SLAM problem

Solutions to the SLAM problem usually fall into 3 broad categories:

  1. Kalman filter based: EKF, UKF, EIF
  2. Particle filter based: FastSLAM
  3. Graph based: lsSLAM

In addition to the method used, SLAM algorithms also differ in terms of their representation of the map. They can be either (or both):

  1. Landmark maps: At every instant, the observations are locations of specific landmarks. This requires some sort of landmark association from one frame to the next frame (using something like SIFT). Kalman filter based SLAM methods usually use this representation.
  2. Grid based maps: The map is divided into boxes (hence grid), and each box can be one of three values: empty, filled or unknown. The observations collected can be, for example, lidar points showing the presence of an obstacle. Landmark maps vs. Grid maps

Some Results

Shown below are the results of each framework in the repo:

  1. Command model: Given a robot position, and an odometry command, calculate the next position of the robot. Odometry model
  2. Extended Kalman Filter (EKF): EKF linearly approximates a non-linear function (the odometry model) around a given point using Taylor expansion, and then applies the Kalman Filter to solve the SLAM problem. In blue are the predicted positions of the landmarks, with the confidence bound drawn as an ellipse. Extended Kalman Filter
  3. Unscented Kalman Filter (UKF): UKF is an extension of EKF: instead of using Taylor expansion, it uses an unscented transform to compute a set of sigma-points which are then passed through the non-linear function. This provides a better gaussian approximation of the non-linear function. Unscented Kalman Filter
  4. Grid Maps: Solves the mapping problem (only) for a grid map representation. This assumes that localization is perfect without any errors (which obviously doesn't hold in real life). Below we see the effect of having a coarse(left) or fine(right) grid.
Coarse grid (0.5m) Fine grid (0.1m)
Coarse gridmap Fine gridmap
  1. Particle Filters: Implements the movement of particles in a particle filter under odometry commands but without any sort of correction.
  2. FastSLAM: A particle filter based SLAM algorithm. The green dots show the particle set at every iteration. The "jumping" of the predictions is because at the next iteration a new particle may be chosen as the most probable one. FastSLAM
  3. Odometry Calibration: Uses least squares method to remove any systematic errors in odometry readings from the robot. Odometry Calibration
  4. lsSLAM: A graph based algorithm using least squares method to optimize the graph structure.
Intel Research Lab DLR building, Institue of Robotics and Mechatronics
Intel research lab DLR

Running the Code

The above code is programmed in Octave / MATLAB. It can be run by simply running the scripts in the octave folder of each sub-section.

Acknowledgements

The skeleton code / data in this repository was taken from Robot Mapping - WS 2019/20 originally authored by Prof. Cyrill Stachniss' as a part of the Robot Mapping module in University of Freiburg.

My contribution to the code was the completion of the code as required by the module assignments.

slam's People

Contributors

sharma-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.