Dr Abubakr - - PowerPoint PPT Presentation

dr abubakr muhammad
SMART_READER_LITE
LIVE PREVIEW

Dr Abubakr - - PowerPoint PPT Presentation

EE-5 6 2 : Robot Motion Planning Simultaneous Localization & Mapping (SLAM) Dr Abubakr Muhammad Assistant Professor Electrical Engineering, LUMS


slide-1
SLIDE 1

9-1

SA-1

EE-5 6 2 : Robot Motion Planning

Simultaneous Localization & Mapping (SLAM)

۵۶۲ تابور ِى ءء

ى روا م و

Dr Abubakr Muhammad Assistant Professor Electrical Engineering, LUMS Director, CYPHYNETS Lab http: / / cyphynets.lums.edu.pk

slide-2
SLIDE 2

9-2

Resources

Course material from

  • Stanford CS-226 (Thrun) [ slides]
  • KAUST ME-410 (Abubakr, 2011)
  • LUMS EE-662 (Abubakr, 2013)

http: / / cyphynets.lums.edu.pk/ index.php/ Teaching

Textbooks

  • Probabilistic Robotics by Thrun et al.
  • Principles of Robot Motion by Choset et al.
slide-3
SLIDE 3

9-3

SLAM OVERVI EW

Part 1.

slide-4
SLIDE 4

9-4

Recall: W hat is Localization?

  • Definition. Calculation of a

mobile robot’s position /

  • rientation relative to an

external reference system

  • Usually world coordinates serve as

reference

  • Basic requirement for several robot

functions:

  • approach of target points, path

following

  • avoidance of obstacles, dead-ends
  • autonomous environment mapping

Requires accurate maps !!

slide-5
SLIDE 5

9-5

Recall: W hat is Mapping?

  • Objective: Store information
  • utside of sensory horizon
  • Map provided a-priori or can

be online

  • Types
  • world-centric maps

navigation, path planning

  • robot-centric maps

pilot tasks (e. g. collision avoidance)

  • Problem: inaccuracy due to

sensor systems

Requires accurate localization!!

slide-6
SLIDE 6

9-6

Given

  • The robot’s controls
  • Observations of nearby

features

Estim ate

  • Map of features
  • Path of the robot

The SLAM Problem

A robot is exploring an unknown, static environment.

SLAM: Simultaneous Localization And Mapping

slide-7
SLIDE 7

9-7

Chicken-or-Egg?

  • SLAM is a chicken-or-egg problem
  • A map is needed for localizing a robot
  • A good pose estimate is needed to build a map
  • Thus, SLAM is regarded as a hard problem

in robotics

  • A variety of different approaches to

address the SLAM problem have been presented

  • Probabilistic methods outperform most
  • ther techniques
slide-8
SLIDE 8

9-8

W hy is SLAM a hard problem ?

SLAM: robot path and map are both unknown Robot path error correlates errors in the map

slide-9
SLIDE 9

9-9

W hy is SLAM a hard problem ?

  • In the real world, the mapping between
  • bservations and landmarks is unknown
  • Picking wrong data associations can have

catastrophic consequences

  • Pose error correlates data associations

Robot pose uncertainty

slide-10
SLIDE 10

9-10

SLAM:

Sim ultaneous Localization and Mapping

  • Full SLAM:
  • Online SLAM:

Integrations typically done one at a time

) , | , (

: 1 : 1 : 1 t t t

u z m x p

1 2 1 : 1 : 1 : 1 : 1 : 1

... ) , | , ( ) , | , (

∫∫ ∫

=

t t t t t t t

dx dx dx u z m x p u z m x p 

Estimates most recent pose and map! Estimates entire path and map!

slide-11
SLIDE 11

9-11

Graphical Model of Full SLAM: ) , | , (

: 1 : 1 : 1 t t t

u z m x p

slide-12
SLIDE 12

9-12

Graphical Model of Online SLAM:

1 2 1 : 1 : 1 : 1 : 1 : 1

... ) , | , ( ) , | , (

∫∫ ∫

=

t t t t t t t

dx dx dx u z m x p u z m x p 

slide-13
SLIDE 13

9-13

Victoria Park Data Set Vehicle

[ courtesy by E. Nebot]

slide-14
SLIDE 14

9-14

Data Acquisition

[ courtesy by E. Nebot]

slide-15
SLIDE 15

9-15

Victoria Park Data Set

[ courtesy by E. Nebot]

slide-16
SLIDE 16

9-16

Raw Odom etry ( no SLAM)

Odometry GPS (for reference)

slide-17
SLIDE 17

9-17

Estim ated Trajectory

[ courtesy by E. Nebot]

slide-18
SLIDE 18

9-18

EKF SLAM Application

[ courtesy by J. Leonard]

slide-19
SLIDE 19

9-19

EKF SLAM Application

  • dometry

estimated trajectory

[ courtesy by John Leonard]

slide-20
SLIDE 20

9-20

PROBABI LI STI C APPROACH TO ROBOTI CS

Part 2.

slide-21
SLIDE 21

9-21

Graphical Model of Full SLAM: ) , | , (

: 1 : 1 : 1 t t t

u z m x p

Action:

1 1

( | , )

t t t

p x x u

− −

slide-22
SLIDE 22

9-22

Motion Models

  • In general the configuration of a robot can be

described by six parameters.

  • Three-dimensional cartesian coordinates plus

three Euler angles pitch, roll, and tilt.

  • Throughout this section, we consider robots
  • perating on a planar surface.

The state space of such systems is three- dimensional (x,y,θ).

slide-23
SLIDE 23

9-23

Odom etry Model

2 2

) ' ( ) ' ( y y x x

trans

− + − = δ θ δ − − − = ) ' , ' ( atan2

1

x x y y

rot 1 2

'

rot rot

δ θ θ δ − − =

Robot moves from to . Odometry information .

θ , , y x ' , ' , ' θ y x

trans rot rot

u δ δ δ , ,

2 1

=

trans

δ

1 rot

δ

2 rot

δ

θ , , y x ' , ' , ' θ y x

slide-24
SLIDE 24

9-24

Reasons for Motion Errors

bump ideal case different wheel diameters carpet and many more …

slide-25
SLIDE 25

9-25

Robot Motion

slide-26
SLIDE 26

9-26

Start

Error Propagation

slide-27
SLIDE 27

9-27

Noise Model for Odom etry

  • The measured motion is given by the

true motion corrupted with noise.

| | | | 1 1

2 1 1

ˆ

trans rot

rot rot δ α δ α

ε δ δ

+

+ =

| | | | 2 2

2 2 1

ˆ

trans rot

rot rot δ α δ α

ε δ δ

+

+ =

| | | |

2 1 4 3

ˆ

rot rot trans

trans trans δ δ α δ α

ε δ δ

+ +

+ =

slide-28
SLIDE 28

9-28

Typical Distributions for Probabilistic Motion Models

2 2 2

2 1 2

2 1 ) (

σ σ

πσ ε

x

e x

=      − > =

2 2 2

6 | | 6 6 | x | if ) (

2

σ σ σ εσ x x

Normal distribution Triangular distribution

slide-29
SLIDE 29

9-29

Effect of Distribution Type

slide-30
SLIDE 30

9-30

Graphical Model of Full SLAM: ) , | , (

: 1 : 1 : 1 t t t

u z m x p

Sensing: (

| , )

t t

p z x m

slide-31
SLIDE 31

9-31

Sensors for Mobile Robots

  • Contact sensors: Bumpers, Whiskers
  • Internal sensors
  • Accelerometers (spring-mounted masses)
  • Gyroscopes (spinning mass, laser light)
  • Compasses, inclinometers (earth magnetic field, gravity)
  • Proximity sensors
  • Sonar (time of flight)
  • Radar (phase and frequency)
  • Laser range-finders (triangulation, tof, phase)
  • Infrared (intensity)
  • Stereo
  • Visual sensors: Cameras, Stereo
  • Satellite-based sensors: GPS
slide-32
SLIDE 32

9-32

Ultrasonic Sensors

  • Signal profile [ Polaroid]
slide-33
SLIDE 33

9-33

Laser Range Scanner

slide-34
SLIDE 34

9-34

Sources of Error

  • Opening angle
  • Crosstalk
  • Specular reflection
slide-35
SLIDE 35

9-35

Typical Ultrasound Scan

slide-36
SLIDE 36

9-36

Typical Measurem ent Errors of an Range Measurem ents

  • 1. Beams reflected by
  • bstacles
  • 2. Beams reflected by

persons / caused by crosstalk

  • 3. Random

measurements

  • 4. Maximum range

measurements

slide-37
SLIDE 37

9-37

Proxim ity Measurem ent

  • 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.
slide-38
SLIDE 38

9-38

Beam -based Proxim ity Model

Measurement noise

zexp zmax

b z z hit

e b m x z P

2 exp )

( 2 1

2 1 ) , | (

− −

= π η       < =

  • therwise

z z m x z P

z

e ) , | (

exp unexp λ

λ η

Unexpected obstacles

zexp zmax

slide-39
SLIDE 39

9-39

Beam -based Proxim ity Model

Random measurement Max range

max

1 ) , | ( z m x z P

rand

η =

small

z m x z P 1 ) , | (

max

η =

zexp zmax zexp zmax

slide-40
SLIDE 40

9-40

Resulting Mixture Density

              ⋅               = ) , | ( ) , | ( ) , | ( ) , | ( ) , | (

rand max unexp hit rand max unexp hit

m x z P m x z P m x z P m x z P m x z P

T

α α α α

How can we determine the model parameters?

slide-41
SLIDE 41

9-41

Raw Sensor Data

Measured distances for expected distance of 300 cm.

Sonar Laser

slide-42
SLIDE 42

9-42

Approxim ation

  • Maximize log likelihood of the data
  • Search space of n-1 parameters.
  • Hill climbing
  • Gradient descent
  • Genetic algorithms
  • Deterministically compute the n-th

parameter to satisfy normalization constraint.

) | (

exp

z z P

slide-43
SLIDE 43

9-43

Approxim ation Results

Sonar Laser

300cm 400cm

slide-44
SLIDE 44

9-44

BAYES FI LTERI NG

Part 3.

slide-45
SLIDE 45

9-45

Sim ple Exam ple of State Estim ation

  • Suppose a robot obtains measurement z
  • What is P(open| z)?
slide-46
SLIDE 46

9-46

Causal vs. Diagnostic Reasoning

  • P(open| z) is diagnostic.
  • P(z| open) is causal.
  • Often causal knowledge is easier to
  • btain.
  • Bayes rule allows us to use causal

knowledge:

) ( ) ( ) | ( ) | ( z P

  • pen

P

  • pen

z P z

  • pen

P =

slide-47
SLIDE 47

9-47

Exam ple

  • P(z|open) = 0.6

P(z|¬open) = 0.3

  • P(open) = P(¬open) = 0.5

67 . 3 2 5 . 3 . 5 . 6 . 5 . 6 . ) | ( ) ( ) | ( ) ( ) | ( ) ( ) | ( ) | ( = = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

p

  • pen

z P

  • pen

p

  • pen

z P

  • pen

P

  • pen

z P z

  • pen

P

z raises the probability that the door is

  • pen.
slide-48
SLIDE 48

9-48

Com bining Evidence

  • Suppose our robot obtains another
  • bservation z2.
  • How can we integrate this new

information?

  • More generally, how can we estimate

P(x| z1...zn )?

slide-49
SLIDE 49

9-49

Recursive Bayesian Updating

) , , | ( ) , , | ( ) , , , | ( ) , , | (

1 1 1 1 1 1 1 − − −

=

n n n n n n

z z z P z z x P z z x z P z z x P    

Markov assumption: zn is independent of z1,...,zn-1 if we know x.

) ( ] ) | ( [ ) , , | ( ) | ( ) , , | ( ) , , | ( ) | ( ) , , | (

... 1 ... 1 1 1 1 1 1 1 1

x P x z P z z x P x z P z z z P z z x P x z P z z x P

n i i n n n n n n n n

= − − −

= = = η η    

slide-50
SLIDE 50

9-50

Exam ple: Second Measurem ent

  • P(z2|open) = 0.5

P(z2|¬open) = 0.6

  • P(open|z1)=2/3

625 . 8 5 3 1 5 3 3 2 2 1 3 2 2 1 ) | ( ) | ( ) | ( ) | ( ) | ( ) | ( ) , | (

1 2 1 2 1 2 1 2

= = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z z

  • pen

P

z2 lowers the probability that the door is

  • pen.
slide-51
SLIDE 51

9-51

Actions

  • Often the world is dynam ic since
  • actions carried out by the robot,
  • actions carried out by other agents,
  • or just the tim e passing by

change the world.

  • How can we incorporate such

actions?

slide-52
SLIDE 52

9-52

Typical Actions

  • The robot turns its w heels to move
  • The robot uses its m anipulator to grasp

an object

  • Plants grow over tim e…
  • Actions are never carried out w ith

absolute certainty.

  • In contrast to measurements, actions

generally increase the uncertainty.

slide-53
SLIDE 53

9-53

Modeling Actions

  • To incorporate the outcome of an

action u into the current “belief”, we use the conditional pdf P( x| u,x’)

  • This term specifies the pdf that

executing u changes the state from x’ to x.

slide-54
SLIDE 54

9-54

Exam ple: Closing the door

slide-55
SLIDE 55

9-55

State Transitions P(x| u,x’) for u = “close door”: If the door is open, the action “close door” succeeds in 90% of all cases.

  • pen

closed 0.1 1 0.9

slide-56
SLIDE 56

9-56

I ntegrating the Outcom e of Actions

= ' ) ' ( ) ' , | ( ) | ( dx x P x u x P u x P

= ) ' ( ) ' , | ( ) | ( x P x u x P u x P

Continuous case: Discrete case:

slide-57
SLIDE 57

9-57

Exam ple: The Resulting Belief

) | ( 1 16 1 8 3 1 8 5 10 1 ) ( ) , | ( ) ( ) , | ( ) ' ( ) ' , | ( ) | ( 16 15 8 3 1 1 8 5 10 9 ) ( ) , | ( ) ( ) , | ( ) ' ( ) ' , | ( ) | ( u closed P closed P closed u

  • pen

P

  • pen

P

  • pen

u

  • pen

P x P x u

  • pen

P u

  • pen

P closed P closed u closed P

  • pen

P

  • pen

u closed P x P x u closed P u closed P − = = ∗ + ∗ = + = = = ∗ + ∗ = + = =

∑ ∑

slide-58
SLIDE 58

9-58

Bayes Filters: Fram ew ork

  • 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).
  • W anted:
  • Estimate of the state X of a dynamical system.
  • The posterior of the state is also called Belief:

) , , , | ( ) (

1 1 t t t t

z u z u x P x Bel  =

1 1

{ , , , }

t t

u z u z 

slide-59
SLIDE 59

9-59

Bayes Filter Exam ple

slide-60
SLIDE 60

9-60

Dynam ic Bayesian Netw ork for Controls, States, and Sensations

slide-61
SLIDE 61

9-61

Markov Assum ption

Underlying Assumptions

  • Static world
  • Independent noise
  • Perfect model, no approximation errors

) , | ( ) , , | (

1 : 1 : 1 1 : 1 t t t t t t t

u x x p u z x x p

− −

=

) | ( ) , , | (

: 1 : 1 : t t t t t t

x z p u z x z p =

slide-62
SLIDE 62

9-62

1 1 1

) ( ) , | ( ) | (

− − −

=

t t t t t t t

dx x Bel x u x P x z P η

Bayes Filters

) , , , | ( ) , , , , | (

1 1 1 1 t t t t t

u z u x P u z u x z P   η =

Bayes z = observation u = action x = state

) , , , | ( ) (

1 1 t t t t

z u z u x P x Bel  =

Markov

) , , , | ( ) | (

1 1 t t t t

u z u x P x z P  η =

Markov 1 1 1 1 1

) , , , | ( ) , | ( ) | (

− − −

=

t t t t t t t t

dx u z u x P x u x P x z P  η

1 1 1 1 1 1 1

) , , , | ( ) , , , , | ( ) | (

− − −

=

t t t t t t t t

dx u z u x P x u z u x P x z P   η

Total prob. Markov 1 1 1 1 1 1

) , , , | ( ) , | ( ) | (

− − − −

=

t t t t t t t t

dx z z u x P x u x P x z P  η

slide-63
SLIDE 63

9-63

Bayes Filter Algorithm

1.

Algorithm Bayes_ filter( Bel(x),d ): 2. η=0 3. If d is a perceptual data item z then 4. For all x do 5. 6. 7. For all x do 8. 9. Else if d is an action data item u then 10. For all x do 11. 12. Return Bel’(x)

) ( ) | ( ) ( ' x Bel x z P x Bel = ) ( ' x Bel + =η η ) ( ' ) ( '

1

x Bel x Bel

=η ' ) ' ( ) ' , | ( ) ( ' dx x Bel x u x P x Bel

=

1 1 1

) ( ) , | ( ) | ( ) (

− − −

=

t t t t t t t t

dx x Bel x u x P x z P x Bel η

slide-64
SLIDE 64

9-64

Bayes Filters are Fam iliar!

  • Kalman filters
  • Particle filters
  • Hidden Markov models
  • Dynamic Bayesian networks
  • Partially Observable Markov Decision

Processes (POMDPs)

1 1 1

) ( ) , | ( ) | ( ) (

− − −

=

t t t t t t t t

dx x Bel x u x P x z P x Bel η

slide-65
SLIDE 65

9-65

Bayes Filters in Localization

1 1 1

) ( ) , | ( ) | ( ) (

− − −

=

t t t t t t t t

dx x Bel x u x P x z P x Bel η

slide-66
SLIDE 66

9-66

Sum m ary

  • Bayes rule allows us to compute

probabilities that are hard to assess

  • therwise.
  • Under the Markov assumption,

recursive Bayesian updating can be used to efficiently combine evidence.

  • Bayes filters are a probabilistic tool

for estimating the state of dynamic systems.

slide-67
SLIDE 67

9-67

PARTI CLE FI LTERI NG

Part 5.

slide-68
SLIDE 68

9-68

Bayes Filters in Localization

1 1 1

) ( ) , | ( ) | ( ) (

− − −

=

t t t t t t t t

dx x Bel x u x P x z P x Bel η

slide-69
SLIDE 69

9-69

6 9

Histogram = Piecewise Constant

slide-70
SLIDE 70

9-70

Piecew ise Constant Representation

) , , ( > =< θ y x x Bel

t

slide-71
SLIDE 71

9-71

Discrete Bayes Filter Algorithm

1.

Algorithm Discrete_ Bayes_ filter( Bel(x),d ): 2. η=0 3. If d is a perceptual data item z then 4. For all x do 5. 6. 7. For all x do 8. 9. Else if d is an action data item u then 10. For all x do 11. 12. Return Bel’(x)

) ( ) | ( ) ( ' x Bel x z P x Bel = ) ( ' x Bel + =η η ) ( ' ) ( '

1

x Bel x Bel

=

'

) ' ( ) ' , | ( ) ( '

x

x Bel x u x P x Bel

slide-72
SLIDE 72

9-72

I m plem entation ( 1 )

  • To update the belief upon sensory input and to carry out

the normalization one has to iterate over all cells of the grid.

  • Especially when the belief is peaked (which is generally the

case during position tracking), one wants to avoid updating irrelevant aspects of the state space.

  • One approach is not to update entire sub-spaces of the

state space.

  • This, however, requires to monitor whether the robot is

de-localized or not.

  • To achieve this, one can consider the likelihood of the
  • bservations given the active components of the state

space.

slide-73
SLIDE 73

9-73

I m plem entation ( 2 )

  • To efficiently update the belief upon robot motions, one typically

assumes a bounded Gaussian model for the motion uncertainty.

  • This reduces the update cost from O(n2) to O(n), where n is the

number of states.

  • The update can also be realized by shifting the data in the grid

according to the measured motion.

  • In a second step, the grid is then convolved using a separable

Gaussian Kernel.

  • Two-dimensional example:

1/ 4 1/ 4 1/ 2 1/ 4 1/ 2 1/ 4

+ ≅

1/ 16 1/ 16 1/ 8 1/ 8 1/ 8 1/ 4 1/ 16 1/ 16 1/ 8

Fewer arithmetic operations Easier to implement

slide-74
SLIDE 74

9-74

Markov Localization in Grid Map

slide-75
SLIDE 75

9-75

Grid-based Localization

slide-76
SLIDE 76

9-76

  • Set of weighted samples

Mathem atical Description

  • The samples represent the posterior

State hypothesis Importance weight

slide-77
SLIDE 77

9-77

  • Particle sets can be used to approximate functions

Function Approxim ation

  • The more particles fall into an interval, the higher

the probability of that interval

  • How to draw samples form a function/ distribution?
slide-78
SLIDE 78

9-78

  • Let us assume that f(x)<1 for all x
  • Sample x from a uniform distribution
  • Sample c from [ 0,1]
  • if f(x) > c

keep the sample

  • therwise

reject the sampe

Rejection Sam pling

c x f(x) c’ x’ f(x’)

OK

slide-79
SLIDE 79

9-79

  • We can even use a different distribution g to

generate samples from f

  • By introducing an importance weight w, we can

account for the “differences between g and f ”

  • w = f / g
  • f is often called

target

  • g is often called

proposal

  • Pre-condition:

f(x)>0  g(x)>0

I m portance Sam pling Principle

slide-80
SLIDE 80

9-80

I m portance Sam pling w ith Resam pling: Landm ark Detection Exam ple

slide-81
SLIDE 81

9-81

Distributions

slide-82
SLIDE 82

9-82

Distributions

Wanted: samples distributed according to p(x| z1, z2, z3)

slide-83
SLIDE 83

9-83

This is Easy!

We can draw samples from p(x| zl) by adding noise to the detection parameters.

slide-84
SLIDE 84

9-84

I m portance Sam pling

) ,..., , ( ) ( ) | ( ) ,..., , | ( : f

  • n

distributi Target

2 1 2 1 n k k n

z z z p x p x z p z z z x p

= ) ( ) ( ) | ( ) | ( : g

  • n

distributi Sampling

l l l

z p x p x z p z x p = ) ,..., , ( ) | ( ) ( ) | ( ) ,..., , | ( : w weights Importance

2 1 2 1 n l k k l l n

z z z p x z p z p z x p z z z x p g f

= =

slide-85
SLIDE 85

9-85

I m portance Sam pling w ith Resam pling

Weighted samples After resampling

slide-86
SLIDE 86

9-86

Particle Filters

slide-87
SLIDE 87

9-87

) | ( ) ( ) ( ) | ( ) ( ) | ( ) ( x z p x Bel x Bel x z p w x Bel x z p x Bel α α α = ← ←

− − −

Sensor I nform ation: I m portance Sam pling

slide-88
SLIDE 88

9-88

' d ) ' ( ) ' | ( ) (

,

x x Bel x u x p x Bel

Robot Motion

slide-89
SLIDE 89

9-89

) | ( ) ( ) ( ) | ( ) ( ) | ( ) ( x z p x Bel x Bel x z p w x Bel x z p x Bel α α α = ← ←

− − −

Sensor I nform ation: I m portance Sam pling

slide-90
SLIDE 90

9-90

Robot Motion

' d ) ' ( ) ' | ( ) (

,

x x Bel x u x p x Bel

slide-91
SLIDE 91

9-91

Particle Filter Algorithm

  • Sample the next generation for particles using the

proposal distribution

  • Compute the importance weights :

weight = target distribution / proposal distribution

  • Resampling: “Replace unlikely samples by more

likely ones”

slide-92
SLIDE 92

9-92

Particle Filter Algorithm

, = ∅ = η

t

S n i  1 = } , { > < ∪ =

i t i t t t

w x S S

i t

w + =η η

i t

x ) , | (

1 1 − − t t t

u x x p

) ( 1 i j t

x −

1 − t

u ) | (

i t t i t

x z p w = n i  1 = η /

i t i t

w w =

slide-93
SLIDE 93

9-93

draw xi

t−1 from Bel(xt−1)

draw xi

t from p(xt | xi t−1,ut−1)

Importance factor for xi

t:

) | ( ) ( ) , | ( ) ( ) , | ( ) | (

  • n

distributi proposal

  • n

distributi target

1 1 1 1 1 1 t t t t t t t t t t t t i t

x z p x Bel u x x p x Bel u x x p x z p w ∝ = =

− − − − − −

η

1 1 1 1

) ( ) , | ( ) | ( ) (

− − − −

=

t t t t t t t t

dx x Bel u x x p x z p x Bel η

Particle Filter Algorithm

slide-94
SLIDE 94

9-94

Resam pling

  • Given: Set S of weighted samples.
  • W anted : Random sample, where the

probability of drawing xi is given by wi.

  • Typically done n times with replacement to

generate new sample set S’.

slide-95
SLIDE 95

9-95

w2 w3 w1 wn Wn-1

Resam pling

w2 w3 w1 wn Wn-1

Roulette wheel Binary search, n log n Stochastic universal sampling Systematic resampling Linear time complexity Easy to implement, low variance

slide-96
SLIDE 96

9-96

  • 1. Algorithm systematic_resampling(S,n):

2.

  • 3. For

Generate cdf 4. 5. Initialize threshold

  • 6. For

Draw samples … 7. While ( ) Skip until next threshold reached 8. 9. Insert 10. Increment threshold

  • 11. Return S’

Resam pling Algorithm

1 1

, ' w c S = ∅ = n i  2 =

i i i

w c c + =

−1

1 ], , ] ~

1 1

=

i n U u n j  1 =

1 1 − +

+ = n u u

j j i j

c u >

{ }

> < ∪ =

−1

, ' ' n x S S

i

1 + = i i

Also called stochastic universal sampling

slide-97
SLIDE 97

9-97

Mobile Robot Localization

  • Each particle is a potential pose of the robot
  • Proposal distribution is the motion model of the

robot (prediction step)

  • The observation model is used to compute the

importance weight (correction step)

slide-98
SLIDE 98

9-98

Start

Motion Model

slide-99
SLIDE 99

9-99

Proxim ity Sensor Model

Laser sensor Sonar sensor

slide-100
SLIDE 100

9-100

slide-101
SLIDE 101

9-101

slide-102
SLIDE 102

9-102

slide-103
SLIDE 103

9-103

slide-104
SLIDE 104

9-104

slide-105
SLIDE 105

9-105

slide-106
SLIDE 106

9-106

slide-107
SLIDE 107

9-107

slide-108
SLIDE 108

9-108

slide-109
SLIDE 109

9-109

slide-110
SLIDE 110

9-110

slide-111
SLIDE 111

9-111

slide-112
SLIDE 112

9-112

slide-113
SLIDE 113

9-113

slide-114
SLIDE 114

9-114

slide-115
SLIDE 115

9-115

slide-116
SLIDE 116

9-116

slide-117
SLIDE 117

9-117

slide-118
SLIDE 118

9-118

I nitial Distribution

slide-119
SLIDE 119

9-119

After I ncorporating Ten Ultrasound Scans

slide-120
SLIDE 120

9-120

After I ncorporating 6 5 Ultrasound Scans

slide-121
SLIDE 121

9-121

Estim ated Path

slide-122
SLIDE 122

9-122

Using Ceiling Maps for Localization

[Dellaert et al. 99]

slide-123
SLIDE 123

9-123

Vision-based Localization

P(z|x) h(x) z

slide-124
SLIDE 124

9-124

Under a Light

Measurement z: P(z|x):

slide-125
SLIDE 125

9-125

Next to a Light

Measurement z: P(z|x):

slide-126
SLIDE 126

9-126

Elsew here

Measurement z: P(z|x):

slide-127
SLIDE 127

9-127

Global Localization Using Vision

slide-128
SLIDE 128

9-128

Sum m ary – Particle Filters

  • Particle filters are an implementation of

recursive Bayesian filtering

  • They represent the posterior by a set of

weighted samples

  • They can model non-Gaussian

distributions

  • Proposal to draw new samples
  • Weight to account for the differences

between the proposal and the target

  • Monte Carlo filter, Survival of the fittest,

Condensation, Bootstrap filter

slide-129
SLIDE 129

9-129

Sum m ary – Monte Carlo Localization

  • In the context of localization, the

particles are propagated according to the motion model.

  • They are then weighted according to

the likelihood of the observations.

  • In a re-sampling step, new particles

are drawn with a probability proportional to the likelihood of the

  • bservation.
slide-130
SLIDE 130

9-130

KALMAN FI LTERI NG BASI CS

Part 6.

slide-131
SLIDE 131

9-131

Techniques for Generating Consistent Maps

  • Scan matching
  • EKF SLAM
  • FastSLAM
  • Probabilistic mapping with a single

map and a posterior about poses Mapping + Localization

  • GraphSLAM, SEIF
slide-132
SLIDE 132

9-132

Graphical Model of Online SLAM:

1 2 1 : 1 : 1 : 1 : 1 : 1

... ) , | , ( ) , | , (

∫∫ ∫

=

t t t t t t t

dx dx dx u z m x p u z m x p 

slide-133
SLIDE 133

9-133

Kalm an Filter Algorithm

1.

Algorithm Kalm an_ filter( µt-1, Σt-1, ut, zt): 2. Prediction: 3. 4. 5. Correction: 6. 7. 8. 9. Return µt, Σt

t t t t t

u B A + =

−1

µ µ

t T t t t t

R A A + Σ = Σ

−1 1

) (

+ Σ Σ =

t T t t t T t t t

Q C C C K ) (

t t t t t t

C z K µ µ µ − + =

t t t t

C K I Σ − = Σ ) (

1 1 1 1

) ( ) , | ( ) | ( ) (

− − − −

=

t t t t t t t t

dx x Bel u x x p x z p x Bel η

slide-134
SLIDE 134

9-134

                                              =

2 2 2 2 2 2 2 1

2 1 2 2 2 1 2 2 2 1 2 1 1 1 1 1 2 1 2 1 2 1

, ) , (

N N N N N N N N N N N

l l l l l l yl xl l l l l l l yl xl l l l l l l yl xl l l l y x yl yl yl y y xy xl xl xl x xy x N t t

l l l y x m x Bel σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ σ θ

θ θ θ θ θ θ θ θ θ θ θ

             

  • Map with N landmarks: (3+ 2N)-dimensional

Gaussian

  • Can handle hundreds of dimensions

( E) KF-SLAM

slide-135
SLIDE 135

9-135

EKF-SLAM

Map Correlation matrix

slide-136
SLIDE 136

9-136

EKF-SLAM

Map Correlation matrix