🤖
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
  1. Probabilistic Robotics

Particle Filter

PreviousKalman FilterNextDiscrete Bayes Filter

Last updated 1 year ago

Particle filter is a non-parametric filter. The main idea is to use "particles" to represent the distribution. The algorithm involves sampling data from a given distribution. To some extent, we can view it as a mini simulation.

Before presenting the pseudo code, let's first see an example. Suppose we have a state graph where a node represents a state and an edge represents the station transition. Each edge has a weight which corresponds to the probability of the transition from the source state to the destination state.

For example, the first state is the start state, there is a 80% chance it will go to the A1 state and another 20% chance to the A2 state. Now, the question is how we can figure our the distribution of states in the third level (i.e. B1, ..., B5). If the transition graph is simple, we may be able to manually calculate the distribution of states. As things are often complicated in real world, it can be challenging to come with the closed-form of the distribution. An alternative is to simulate the state transition. At a given state, we generate a sample of next state according to the transition probability. We repeat this process until we have sufficient data to approximate the real distribution.

Particle Filter Algorithm

(source: Probabilistic Robotics)