🤖
Introduction to ROS2 and Robotics
  • Introduction
  • ROS2
    • Index
    • IDE and CMake Setup
      • How to add additional include search path
    • ROS2 Building Blocks
      • ROS Workspace and Package Layout
      • Launch File
      • tf2
      • Quality of Service
      • Configurations
        • Rviz Configuration
      • Built-in Types
        • Built-in Message Type
    • ROS Architecture
      • Intra-process Communication
    • Navigation and Planning
      • Navigation Stack and Concepts
      • Navigation2 Implementation Overview
        • 🏗️Cost Map
        • Obstacle Avoidance and DWB Controller
      • DWB Controller
      • Page 5
    • How to launch the Nav2 stack
    • ROS2 Control
      • Online Resources
      • Overview of Codebase
    • 🍳Cookbook
      • Useful Commands
      • How to specify parameters
      • How to build the workspace
      • 🏗️How to publish message to a topic from command line?
      • How to inspect service and make a service call
      • How to properly terminate ROS and Gazebo
      • How to add and remove models in Gazebo simulation dynamically
      • 🚧How to spin nodes
    • 🛒Tutorials
      • Services and Communication between ROS2 and Gazebo
      • Subscription and Message Filters Demo
      • Executor and Spin Explained
      • Lifecycle Node Demo
      • Robotic Arm Demo
      • ⚒️Multiple Robotic Arms Simulation Demo
      • 🚧Introduction to xacro
    • Page
    • 🍺Tech Blog
      • Difference between URDF and SDF and how to convert
  • Gazebo
    • Index
    • Terminology
    • GUI
    • World Frame and Axis
    • Cookbook
    • Page 1
  • Programming in Robotics
    • C++
      • CMake
    • Python
    • Rust
  • Mathematics in Robotics
    • Linear Algebra
    • Matrix Properties
    • Probability
      • Expectation-Maximization Algorithm
    • Multivariable Function and Derivatives
  • Physics in Robotics
  • Control of Dynamic Systems
    • Dynamic Response and Transfer Function
    • Block Diagram
    • PID Controller
  • Robot Modeling and Control
    • Rotation and Homogeneous Transformation
  • Probabilistic Robotics
    • Bayes Filter
    • Kalman Filter
    • Particle Filter
    • Discrete Bayes Filter
    • Motion Model
    • Perception Model
    • Localization
    • SLAM
  • Miscellany
  • Concept Index
    • Quaternions
Powered by GitBook
On this page
  • Bayes Filer Algorithm
  • Map Representation
  • Different Types of SLAM Algorithm
  • SLAM with Extended Kalman Filters
  • GraphSLAM Algorithm
  • FastSLAM Algorithm
  1. Probabilistic Robotics

SLAM

PreviousLocalizationNextMiscellany

Last updated 1 year ago

In this article, we attempt to give a high-level presentation of the SLAM(Simultaneous Localization and Mapping) based on the book Probabilistic Robotics. For the purpose of simplicity, the mathematical derivation will be omitted because they are technical details and are not strictly necessary for understanding the main idea of SLAM.

Bayes Filer Algorithm

Let's start with the Bayes Filter algorithm

xtx_txt​, utu_tut​ and ztz_tzt​ represent state, control and measurement respectively. The p(xt∣ut,xt−1)p(x_t|u_t, x_{t-1})p(xt​∣ut​,xt−1​) part in line 3 is called the motion model and it describes the state transition given a specific control. The p(zt∣xt)p(z_t|x_t)p(zt​∣xt​)in line 3 is called the measurement model or perception model and it describes the (expected) distribution of sensor data given the (current) state of the robot. Obviously, the motion model depends on how the robot moves and the measurement model depends on the sensors. The details of these two parts are not super important in our discussion about the SLAM algorithm.

The Bayes Filter algorithm listed above is such a general framework that three out of four parts of the book Probabilistic Robotics are discussing its application. It can be used to solve the localization problems and the mapping problems. One of the reasons why it's so powerful is that state is a general concept. If the state consists of the 2D-robot pose (x,y,z,θ)(x, y, z, \theta)(x,y,z,θ), the Bayes Filter solves the localization problem; if the state consists of both the robot pose and mapping, the Bayes Filter solves the localization and mapping problem simultaneously (SLAM).

Map Representation

TODO

Different Types of SLAM Algorithm

A SLAM algorithm has the following dimensions:

  • Motion models

  • Measurement models

  • Online SLAM vs full SLAM

  • Feature-based map vs grid

The first two dimensions are not specific to SLAM and as we've seen earlier, they are part fo the general Bayes Filter algorithm. Online SLAM means our target is the snapshot at time ttt: p(xt,m,ct∣z1:t,u1:t)p(x_t, m, c_t|z_{1:t}, u_{1:t})p(xt​,m,ct​∣z1:t​,u1:t​) while the full SLAM means the target is the full history: p(x1:t,m,c1:t∣z1:t,u1:t)p(x_{1:t}, m, c_{1:t}|z_{1:t},u_{1:t})p(x1:t​,m,c1:t​∣z1:t​,u1:t​). As a practical consideration, a full SLAM algorithm requires more memory because it needs to track the full history. Therefore, special attention is required in the implementation. The last dimension is about map representation. Most of the algorithm described in the book use feature-based map and with a feature-based map, we can further divide the problem into two categories: (1) problem with known correspondence, and (2) problem with unknown correspondence. A problem with known correspondence means when we receive the sensor data, we know it's measurement of a specific feature in the environment. This correspondence information is not always available. For example, if the robot is put in a completely unknown environment or the environment has many symmetric structure, it's not an easy task to establish the correspondence relationship between the sensor data and a location in the environment. When the correspondence is unknown, the SLAM algorithm needs to take care of two more tasks:

  • how to identify the correspondence

  • how to know if the sensor is for a new feature that we haven't see before

In next section, we follow the book Probabilistic Robotics and provide a brief discussion on three SLAM algorithms.

SLAM with Extended Kalman Filters

TODO

GraphSLAM Algorithm

TODO

FastSLAM Algorithm

TODO