Bayesian Filtering Dieter Fox Probabilistic Robotics Key idea: Explicit representation of uncertainty (using the calculus of probability theory) Perception.

Slides:



Advertisements
Similar presentations
Mobile Robot Localization and Mapping using the Kalman Filter
Advertisements

EKF, UKF TexPoint fonts used in EMF.
Probabilistic Robotics
Probabilistic Robotics
Probabilistic Robotics
Probabilistic Robotics SLAM. 2 Given: The robot’s controls Observations of nearby features Estimate: Map of features Path of the robot The SLAM Problem.
Advanced Mobile Robotics
(Includes references to Brian Clipp
Lab 2 Lab 3 Homework Labs 4-6 Final Project Late No Videos Write up
Probabilistic Robotics
Markov Localization & Bayes Filtering 1 with Kalman Filters Discrete Filters Particle Filters Slides adapted from Thrun et al., Probabilistic Robotics.
Simultaneous Localization and Mapping
SA-1 Probabilistic Robotics Probabilistic Sensor Models Beam-based Scan-based Landmarks.
Probabilistic Robotics Bayes Filter Implementations Particle filters.
Introduction to Mobile Robotics Bayes Filter Implementations Gaussian filters.
Recursive Bayes Filtering Advanced AI
Localization David Johnson cs6370. Basic Problem Go from thisto this.
Probabilistic Robotics: Kalman Filters
Stanford CS223B Computer Vision, Winter 2007 Lecture 12 Tracking Motion Professors Sebastian Thrun and Jana Košecká CAs: Vaibhav Vaish and David Stavens.
Introduction to Kalman Filter and SLAM Ting-Wei Hsu 08/10/30.
Probabilistic Robotics
CS 547: Sensing and Planning in Robotics Gaurav S. Sukhatme Computer Science Robotic Embedded Systems Laboratory University of Southern California
SLAM: Simultaneous Localization and Mapping: Part I Chang Young Kim These slides are based on: Probabilistic Robotics, S. Thrun, W. Burgard, D. Fox, MIT.
Probabilistic Robotics
Monte Carlo Localization
1 CMPUT 412 Autonomous Map Building Csaba Szepesvári University of Alberta TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Probabilistic Robotics Introduction Probabilities Bayes rule Bayes filters.
A Probabilistic Approach to Collaborative Multi-robot Localization Dieter Fox, Wolfram Burgard, Hannes Kruppa, Sebastin Thrun Presented by Rajkumar Parthasarathy.
Probabilistic Robotics
Probabilistic Robotics Bayes Filter Implementations Particle filters.
Stanford CS223B Computer Vision, Winter 2007 Lecture 12 Tracking Motion Professors Sebastian Thrun and Jana Košecká CAs: Vaibhav Vaish and David Stavens.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
Bayesian Filtering for Location Estimation D. Fox, J. Hightower, L. Liao, D. Schulz, and G. Borriello Presented by: Honggang Zhang.
HCI / CprE / ComS 575: Computational Perception
ROBOT MAPPING AND EKF SLAM
Bayesian Filtering for Robot Localization
Markov Localization & Bayes Filtering
Efficient Approaches to Mapping with Rao- Blackwellized Particle Filters Department of Computer Science University of Freiburg, Germany Wolfram Burgard.
9-1 SA-1 Probabilistic Robotics: SLAM = Simultaneous Localization and Mapping Slide credits: Wolfram Burgard, Dieter Fox, Cyrill Stachniss, Giorgio Grisetti,
From Bayesian Filtering to Particle Filters Dieter Fox University of Washington Joint work with W. Burgard, F. Dellaert, C. Kwok, S. Thrun.
Probabilistic Robotics: Monte Carlo Localization
Probabilistic Robotics Robot Localization. 2 Localization Given Map of the environment. Sequence of sensor measurements. Wanted Estimate of the robot’s.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
1 Robot Environment Interaction Environment perception provides information about the environment’s state, and it tends to increase the robot’s knowledge.
Probabilistic Robotics Bayes Filter Implementations.
Young Ki Baik, Computer Vision Lab.
Mobile Robot Localization (ch. 7)
Robot Mapping Short Introduction to Particle Filters and Monte Carlo Localization.
City College of New York 1 Dr. Jizhong Xiao Department of Electrical Engineering City College of New York Advanced Mobile Robotics.
CSE-473 Mobile Robot Mapping. Mapping with Raw Odometry.
Unscented Kalman Filter 1. 2 Linearization via Unscented Transform EKF UKF.
CSE-473 Project 2 Monte Carlo Localization. Localization as state estimation.
1/17/2016CS225B Kurt Konolige Probabilistic Models of Sensing and Movement Move to probability models of sensing and movement Project 2 is about complex.
Probabilistic Robotics
Extended Kalman Filter
CS 547: Sensing and Planning in Robotics Gaurav S. Sukhatme Computer Science Robotic Embedded Systems Laboratory University of Southern California
Monte Carlo Localization for Mobile Robots Frank Dellaert 1, Dieter Fox 2, Wolfram Burgard 3, Sebastian Thrun 4 1 Georgia Institute of Technology 2 University.
The Unscented Kalman Filter for Nonlinear Estimation Young Ki Baik.
10-1 Probabilistic Robotics: FastSLAM Slide credits: Wolfram Burgard, Dieter Fox, Cyrill Stachniss, Giorgio Grisetti, Maren Bennewitz, Christian Plagemann,
Particle filters for Robot Localization An implementation of Bayes Filtering Markov Localization.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
Probabilistic Robotics Bayes Filter Implementations Gaussian filters.
CSE-473 Mobile Robot Mapping.
Robótica Móvil CC5316 Clase 16: SLAM
Probabilistic Robotics
EE-565: Mobile Robotics Non-Parametric Filters Module 2, Lecture 5
Probabilistic Robotics
Extended Kalman Filter
Extended Kalman Filter
Probabilistic Robotics Bayes Filter Implementations FastSLAM
Presentation transcript:

Bayesian Filtering Dieter Fox

Probabilistic Robotics Key idea: Explicit representation of uncertainty (using the calculus of probability theory) Perception = state estimation Control = utility optimization

Bayes Filters: Framework Given: Stream of observations z and action data u: Sensor model P(z|x). Action model P(x|u,x’). Prior probability of the system state P(x). Wanted: Estimate of the state X of a dynamical system. The posterior of the state is also called Belief:

Markov Assumption Underlying Assumptions Static world Independent noise Perfect model, no approximation errors

Bayes Filters Bayes z = observation u = action x = state Markov Total prob.

Bayes Filters are Familiar! Kalman filters Particle filters Hidden Markov models Dynamic Bayesian networks Partially Observable Markov Decision Processes (POMDPs)

Localization Given Map of the environment. Sequence of sensor measurements. Wanted Estimate of the robot’s position. Problem classes Position tracking Global localization Kidnapped robot problem (recovery) “Using sensory information to locate the robot in its environment is the most fundamental problem to providing a mobile robot with autonomous capabilities.” [Cox ’91]

Bayes Filters for Robot Localization

Probabilistic Kinematics Odometry information is inherently noisy. x’ u p(x|u,x’) u x’

Proximity Measurement Measurement can be caused by … a known obstacle. cross-talk. an unexpected obstacle (people, furniture, …). missing all obstacles (total reflection, glass, …). Noise is due to uncertainty … in measuring distance to known obstacle. in position of known obstacles. in position of additional obstacles. whether obstacle is missed.

Mixture Density How can we determine the model parameters?

Raw Sensor Data Measured distances for expected distance of 300 cm. SonarLaser

Approximation Results Sonar Laser 300cm400cm

Representations for Bayesian Robot Localization Discrete approaches (’95) Topological representation (’95) uncertainty handling (POMDPs) occas. global localization, recovery Grid-based, metric representation (’96) global localization, recovery Multi-hypothesis (’00) multiple Kalman filters global localization, recovery Particle filters (’99) sample-based representation global localization, recovery Kalman filters (late-80s?) Gaussians approximately linear models position tracking AI Robotics

Discrete Grid Filters

Piecewise Constant Representation

Grid-based Localization

Sonars and Occupancy Grid Map

Tree-based Representation Idea: Represent density using a variant of Octrees

Tree-based Representations Efficient in space and time Multi-resolution

Particle Filters

 Represent belief by random samples  Estimation of non-Gaussian, nonlinear processes  Monte Carlo filter, Survival of the fittest, Condensation, Bootstrap filter, Particle filter  Filtering: [Rubin, 88], [Gordon et al., 93], [Kitagawa 96]  Computer vision: [Isard and Blake 96, 98]  Dynamic Bayesian Networks: [Kanazawa et al., 95]d Particle Filters

Weight samples: w = f / g Importance Sampling

draw x i t  1 from Bel (x t  1 ) draw x i t from p ( x t | x i t  1,u t  1 ) Importance factor for x i t : Particle Filter Algorithm

Particle Filters

Sensor Information: Importance Sampling

Robot Motion

Sensor Information: Importance Sampling

Robot Motion

Sample-based Localization (sonar)

Using Ceiling Maps for Localization [Dellaert et al. 99]

Vision-based Localization P(z|x) h(x) z

Under a Light Measurement z:P(z|x):

Next to a Light Measurement z:P(z|x):

Elsewhere Measurement z:P(z|x):

Global Localization Using Vision

Localization for AIBO robots

Adaptive Sampling

Idea: Assume we know the true belief. Represent this belief as a multinomial distribution. Determine number of samples such that we can guarantee that, with probability (1-  ), the KL-distance between the true posterior and the sample-based approximation is less than . Observation: For fixed  and , number of samples only depends on number k of bins with support: KLD-sampling

Example Run Sonar

Example Run Laser

Kalman Filters

Prediction Correction Bayes Filter Reminder

Gaussians --   Univariate  Multivariate

Gaussians and Linear Functions

Kalman Filter Updates in 1D

Kalman Filter Algorithm 1. Algorithm Kalman_filter(  t-1,  t-1, u t, z t ): 2. Prediction: Correction: Return  t,  t

Nonlinear Dynamic Systems Most realistic robotic problems involve nonlinear functions

Linearity Assumption Revisited

Non-linear Function

EKF Linearization (1)

EKF Linearization (2)

EKF Linearization (3)

Particle Filter Projection

Density Extraction

Sampling Variance

EKF Algorithm 1.Extended_Kalman_filter (  t-1,  t-1, u t, z t ): 2. Prediction: Correction: Return  t,  t

Landmark-based Localization

EKF Prediction Step

EKF Observation Prediction Step

EKF Correction Step

Estimation Sequence (1)

Estimation Sequence (2)

Comparison to GroundTruth

EKF Summary Highly efficient: Polynomial in measurement dimensionality k and state dimensionality n: O(k n 2 ) Not optimal! Can diverge if nonlinearities are large! Works surprisingly well even when all assumptions are violated!

Linearization via Unscented Transform EKF UKF

UKF Sigma-Point Estimate (2) EKF UKF

UKF Sigma-Point Estimate (3) EKF UKF

Unscented Transform Sigma points Weights Pass sigma points through nonlinear function Recover mean and covariance

UKF Prediction Step

UKF Observation Prediction Step

UKF Correction Step

EKF Correction Step

Estimation Sequence EKF PF UKF

Estimation Sequence EKF UKF

Prediction Quality EKF UKF

UKF Summary Highly efficient: Same complexity as EKF, with a constant factor slower in typical practical applications Better linearization than EKF: Accurate in first two terms of Taylor expansion (EKF only first term) Derivative-free: No Jacobians needed Still not optimal!

SLAM: Simultaneous Localization and Mapping

Mapping with Raw Odometry

SLAM: Simultaneous Localization and Mapping Full SLAM: Online SLAM: Integrations typically done one at a time

Map with N landmarks:(2N+3)-dimensional Gaussian Can handle hundreds of dimensions SLAM: Mapping with Kalman Filters

Map Correlation matrix

Graph-SLAM Full SLAM technique Generates probabilistic links Computes map only occasionally Based on Information Filter form

Graph-SLAM Idea

Robot Poses and Scans [Lu and Milios 1997] Successive robot poses connected by odometry Sensor readings yield constraints between poses Constraints represented by Gaussians Globally optimal estimate

Loop Closure Before loop closureAfter loop closure Use scan patches to detect loop closure Add new position constraints Deform the network based on covariances of matches

Efficient Map Recovery Minimize constraint function J GraphSLAM using standard optimization techniques (gradient descent, Levenberg Marquardt, conjugate gradient)

Mapping the Allen Center

Rao-Blackwellised Particle Filters

Rao-Blackwellized Mapping Compute a posterior over the map and possible trajectories of the robot : robot motionmap trajectory map and trajectory measurements

FastSLAM Robot Pose2 x 2 Kalman Filters Landmark 1Landmark 2Landmark N … x, y,  Landmark 1Landmark 2Landmark N … x, y,  Particle #1 Landmark 1Landmark 2Landmark N … x, y,  Particle #2 Landmark 1Landmark 2Landmark N … x, y,  Particle #3 Particle M … [Begin courtesy of Mike Montemerlo]

FastSLAM – Simulation Up to 100,000 landmarks 100 particles 10 3 times fewer parameters than EKF SLAM Blue line = true robot path Red line = estimated robot path Black dashed line = odometry

Victoria Park Results 4 km traverse 100 particles Uses negative evidence to remove spurious landmarks Blue path = odometry Red path = estimated path [End courtesy of Mike Montemerlo]

Motion Model for Scan Matching Raw Odometry Scan Matching

Rao-Blackwellized Mapping with Scan-Matching Map: Intel Research Lab Seattle Loop Closure

Rao-Blackwellized Mapping with Scan-Matching Map: Intel Research Lab Seattle Loop Closure

Rao-Blackwellized Mapping with Scan-Matching Map: Intel Research Lab Seattle

Example (Intel Lab)  15 particles  four times faster than real-time P4, 2.8GHz  5cm resolution during scan matching  1cm resolution in final map joint work with Giorgio Grisetti

Outdoor Campus Map  30 particles  250x250m 2  1.75 km (odometry)  20cm resolution during scan matching  30cm resolution in final map joint work with Giorgio Grisetti  30 particles  250x250m 2  miles (odometry)  20cm resolution during scan matching  30cm resolution in final map

DP-SLAM [Eliazar & Parr] Runs at real-time speed on 2.4GHz Pentium 4 at 10cm/s scale: 3cm

Consistency

Results obtained with DP-SLAM 2.0 (offline) Eliazar & Parr, 04

Close up End courtesy of Eliazar & Parr

Fast-SLAM Summary Full and online version of SLAM Factorizes posterior into robot trajectories (particles) and map (EKFs). Landmark locations are independent! More efficient proposal distribution through Kalman filter prediction Data association per particle

Ball Tracking in RoboCup  Extremely noisy (nonlinear) motion of observer  Inaccurate sensing, limited processing power  Interactions between target and environment  Interactions between robot(s) and target Goal: Unified framework for modeling the ball and its interactions.

Tracking Techniques  Kalman Filter  Highly efficient, robust (even for nonlinear)  Uni-modal, limited handling of nonlinearities  Particle Filter  Less efficient, highly robust  Multi-modal, nonlinear, non-Gaussian  Rao-Blackwellised Particle Filter, MHT  Combines PF with KF  Multi-modal, highly efficient

Dynamic Bayes Network for Ball Tracking k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Robot Location k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Robot and Ball Location (and velocity) k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Ball-Environment Interactions NoneGrabbed Bounced Kicked Deflected

Ball-Environment Interactions NoneGrabbed Bounced Kicked (0.8) Robot loses grab (0.2) ( 1. 0 ) R o b o t k i c k s b a l l ( 0. 9 ) ( 1. 0 ) Within grab range and robot grabs (prob.from model) ( 0. 1 ) Kick fails(0.1) Deflected (residual prob.) ( 1. 0 ) C o l l i s i o n w i t h o b j e c t s o n m a p ( 1. 0 )

Integrating Discrete Ball Motion Mode k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Grab Example (1) k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Grab Example (2) k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Inference: Posterior Estimation k-2 b k-1 b k b r k-2 r k-1 r k z k-2 z k-1 z k u k-2 u k-1 z z k z k-2 k m k-1 m k-2 m Ball observation Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l l l b b b

Rao-Blackwellised PF for Inference  Represent posterior by random samples  Each sample contains robot location, ball mode, ball Kalman filter  Generate individual components of a particle stepwise using the factorization

Rao-Blackwellised Particle Filter for Inference k-1 b k b r r k k m m Ball location and velocity Ball motion mode Map and robot location Ball tracking Robot localization  Draw a sample from the previous sample set:

Generate Robot Location r k-1 r k u z k Map and robot location Robot control Landmark detection Robot localization l k-1 b m Ball location and velocity Ball motion mode Ball tracking k b k m

Generate Ball Motion Model k-1 b r r k u z k k m m Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l k b

Update Ball Location and Velocity k-1 b r r k u z k k m m Ball location and velocity Ball motion mode Map and robot location Robot control Landmark detection Ball tracking Robot localization l k b z k b

Importance Resampling  Weight sample by if observation is landmark detection and by if observation is ball detection.  Resample

Ball-Environment Interaction

Tracking and Finding the Ball  Cluster ball samples by discretizing pan / tilt angles  Uses negative information

Experiment: Real Robot  Robot kicks ball 100 times, tries to find it afterwards  Finds ball in 1.5 seconds on average

Reference * Observations Reference * Observations Simulation Runs

Comparison to KF* (optimized for straight motion) RBPF KF* Reference * Observations RBPF KF* Reference * Observations

RBPF KF’ Reference * Observations RBPF KF’ Reference * Observations Comparison to KF ’ (inflated prediction noise)

Orientation Errors Orientation Error [degrees] Time [sec] RBPF KF*

Conclusions  Bayesian filters are the most successful technique in robotics (vision?)  Many instances (Kalman, particle, grid, MHT, RBPF, … )  Special case of dynamic Bayesian networks  Recently: hierarchical models