and Monte Carlo Localization Wolfram Burgard, Cyrill Stachniss, - - PowerPoint PPT Presentation

and monte carlo localization
SMART_READER_LITE
LIVE PREVIEW

and Monte Carlo Localization Wolfram Burgard, Cyrill Stachniss, - - PowerPoint PPT Presentation

Introduction to Mobile Robotics Bayes Filter Particle Filter and Monte Carlo Localization Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello 1 Motivation Recall: Discrete filter Discretize the


slide-1
SLIDE 1

1

Bayes Filter – Particle Filter and Monte Carlo Localization Introduction to Mobile Robotics

Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello

slide-2
SLIDE 2

2

  • Recall: Discrete filter
  • Discretize the continuous state space
  • High memory complexity
  • Fixed resolution (does not adapt to the belief)
  • Particle filters are a way to efficiently represent

non-Gaussian distribution

  • Basic principle
  • Set of state hypotheses (“particles”)
  • Survival-of-the-fittest

Motivation

slide-3
SLIDE 3

Sample-based Localization (sonar)

slide-4
SLIDE 4

4

  • Set of weighted samples

Mathematical Description

  • The samples represent the posterior

State hypothesis Importance weight

slide-5
SLIDE 5

5

  • Particle sets can be used to approximate functions

Function Approximation

  • The more particles fall into an interval, the higher

the probability of that interval

  • How to draw samples from a function/distribution?
slide-6
SLIDE 6

6

  • 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 sample

Rejection Sampling

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

OK

slide-7
SLIDE 7

7

  • 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 called target
  • g is called proposal
  • Pre-condition:

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

  • Derivation: See

webpage

Importance Sampling Principle

slide-8
SLIDE 8

Importance Sampling with Resampling: Landmark Detection Example

slide-9
SLIDE 9

Distributions

slide-10
SLIDE 10

10

Distributions

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

slide-11
SLIDE 11

This is Easy!

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

slide-12
SLIDE 12

Importance Sampling

) ,..., , ( ) ( ) | ( ) ,..., , | ( : 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-13
SLIDE 13

Importance Sampling with Resampling

Weighted samples After resampling

slide-14
SLIDE 14

Particle Filters

slide-15
SLIDE 15

) | ( ) ( ) ( ) | ( ) ( ) | ( ) ( x z p x Bel x Bel x z p w x Bel x z p x Bel      

  

Sensor Information: Importance Sampling

slide-16
SLIDE 16

' d ) ' ( ) ' | ( ) (

,

x x Bel x u x p x Bel

Robot Motion

slide-17
SLIDE 17

) | ( ) ( ) ( ) | ( ) ( ) | ( ) ( x z p x Bel x Bel x z p w x Bel x z p x Bel      

  

Sensor Information: Importance Sampling

slide-18
SLIDE 18

Robot Motion

' d ) ' ( ) ' | ( ) (

,

x x Bel x u x p x Bel

slide-19
SLIDE 19

19

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-20
SLIDE 20

20

  • 1. Algorithm particle_filter( St-1, ut, zt):

2.

  • 3. For Generate new samples

4. Sample index j(i) from the discrete distribution given by wt-1 5. Sample from using and 6. Compute importance weight 7. Update normalization factor 8. Insert

  • 9. For

10. Normalize weights

Particle Filter Algorithm

,    

t

S

i =1,฀ ,n

} , {    

i t i t t t

w x S S

i t

w   

i t

x

p(xt | xt-1,ut)

) ( 1 i j t

x 

ut

) | (

i t t i t

x z p w 

i =1,฀ ,n

 /

i t i t

w w 

slide-21
SLIDE 21

draw xi

t1 from Bel(xt1)

draw xi

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

Importance factor for xi

t:

wt

i =

target distribution proposal distribution = h p(zt | xt) p(xt | xt-1,ut) Bel (xt-1) p(xt | xt-1,ut) Bel (xt-1) µ p(zt | xt)

Bel (xt) = h p(zt | xt) p(xt | xt-1,ut) Bel (xt-1)

ò

dxt-1

Particle Filter Algorithm

slide-22
SLIDE 22

Resampling

  • Given: Set S of weighted samples.
  • Wanted : 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-23
SLIDE 23

w2 w3 w1 wn Wn-1

Resampling

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-24
SLIDE 24
  • 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’

Resampling 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-25
SLIDE 25

25

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)

[For details, see PDF file on the lecture web page]

slide-26
SLIDE 26

Motion Model Reminder

start pose end pose

According to the estimated motion

slide-27
SLIDE 27

Motion Model Reminder

rotation translation rotation

  • Decompose the motion into
  • Traveled distance
  • Start rotation
  • End rotation
slide-28
SLIDE 28

Motion Model Reminder

  • Uncertainty in the translation of the robot:

Gaussian over the traveled distance

  • Uncertainty in the rotation of the robot:

Gaussians over start and end rotation

  • For each particle, draw a new pose by sampling

from these three individual normal distributions

slide-29
SLIDE 29

Start

Motion Model Reminder

slide-30
SLIDE 30

Proximity Sensor Model Reminder

Laser sensor Sonar sensor

slide-31
SLIDE 31

31

Mobile Robot Localization Using Particle Filters (1)

  • Each particle is a potential pose of the robot
  • The set of weighted particles approximates

the posterior belief about the robot’s pose (target distribution)

slide-32
SLIDE 32

32

Mobile Robot Localization Using Particle Filters (2)

  • Particles are drawn from the motion model

(proposal distribution)

  • Particles are weighted according to the
  • bservation model (sensor model)
  • Particles are resampled according to the

particle weights

slide-33
SLIDE 33

33

Mobile Robot Localization Using Particle Filters (3)

Why is resampling needed?

  • We only have a finite number of particles
  • Without resampling: The filter is likely to

loose track of the “good” hypotheses

  • Resampling ensures that particles stay in

the meaningful area of the state space

slide-34
SLIDE 34

34

slide-35
SLIDE 35

35

slide-36
SLIDE 36

36

slide-37
SLIDE 37

37

slide-38
SLIDE 38

38

slide-39
SLIDE 39

39

slide-40
SLIDE 40

40

slide-41
SLIDE 41

41

slide-42
SLIDE 42

42

slide-43
SLIDE 43

43

slide-44
SLIDE 44

44

slide-45
SLIDE 45

45

slide-46
SLIDE 46

46

slide-47
SLIDE 47

47

slide-48
SLIDE 48

48

slide-49
SLIDE 49

49

slide-50
SLIDE 50

50

slide-51
SLIDE 51

51

Sample-based Localization (sonar)

slide-52
SLIDE 52

52

Initial Distribution

slide-53
SLIDE 53

53

After Incorporating Ten Ultrasound Scans

slide-54
SLIDE 54

54

After Incorporating 65 Ultrasound Scans

slide-55
SLIDE 55

55

Estimated Path

slide-56
SLIDE 56

Using Ceiling Maps for Localization

[Dellaert et al. 99]

slide-57
SLIDE 57

Vision-based Localization

P(z|x) h(x) z

slide-58
SLIDE 58

Under a Light

Measurement z: P(z|x):

slide-59
SLIDE 59

Next to a Light

Measurement z: P(z|x):

slide-60
SLIDE 60

Elsewhere

Measurement z: P(z|x):

slide-61
SLIDE 61

Global Localization Using Vision

slide-62
SLIDE 62

63

Limitations

  • The approach described so far is able
  • to track the pose of a mobile robot and
  • to globally localize the robot
  • How can we deal with localization errors

(i.e., the kidnapped robot problem)?

slide-63
SLIDE 63

64

Approaches

  • Randomly insert a fixed number of samples
  • This assumes that the robot can be

teleported at any point in time

  • Alternatively, insert random samples

proportional to the average likelihood of the particles

slide-64
SLIDE 64

65

Summary – 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-65
SLIDE 65

66

Summary – PF 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 observation.