CS 354 Autonomous Robotics Particle Filters Instructors: Dr. Kevin - - PowerPoint PPT Presentation

cs 354 autonomous robotics particle filters
SMART_READER_LITE
LIVE PREVIEW

CS 354 Autonomous Robotics Particle Filters Instructors: Dr. Kevin - - PowerPoint PPT Presentation

CS 354 Autonomous Robotics Particle Filters Instructors: Dr. Kevin Molloy and Dr. Nathan Sprague SA-1 Objectives Process of determining where a mobile Localization robot is located with respect to its environment. Methods we know so far:


slide-1
SLIDE 1

SA-1

CS 354 Autonomous Robotics Particle Filters

Instructors: Dr. Kevin Molloy and

  • Dr. Nathan Sprague
slide-2
SLIDE 2

Objectives

Localization Methods we know so far:

  • Grid-based localization and tracking
  • Kalman Filters

Process of determining where a mobile robot is located with respect to its environment. Today we are going to discuss particle filters.

  • Represent belief by random samples
  • Estimation of non-Gaussian, nonlinear processes
  • Monte Carlo filter, Survival of the fittest
slide-3
SLIDE 3

Start

Motion Model Reminder

slide-4
SLIDE 4

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-5
SLIDE 5

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-6
SLIDE 6

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-7
SLIDE 7

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-8
SLIDE 8

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-9
SLIDE 9

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

slide-10
SLIDE 10

Particle Filer (Xt-1, ut, zt) Inputs: Xt-1 – The previous particles ut – the control signal zt

  • the sensor value

Output: Xt – Updated particles Xbart = [] M = size(Xt-1) For m = 0 to M-1 do sample xt[m] ~ p(xt | ut, xt-1[m]) wt[m] = p(zt | xt[m])wt-1[m] Xbart = Xbart U {<xt[m], wt[m]>} For m = 0 to M -1 do Draw i with probability prop wt[i] Xt = Xt U {xt[i], 1/M}

Particle Filter Algorithm

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

Resampling

slide-12
SLIDE 12

w2 w3 w1 wn Wn-1 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

Resampling

slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18
slide-19
SLIDE 19
slide-20
SLIDE 20
slide-21
SLIDE 21
slide-22
SLIDE 22
slide-23
SLIDE 23
slide-24
SLIDE 24
slide-25
SLIDE 25
slide-26
SLIDE 26
  • Video of tracking through the Smithsonian museum.

Video

slide-27
SLIDE 27
  • Average over all particles
  • Cluster the particles together and pick the "best" cluster
  • Maybe something else?

So, where is the robot?

slide-28
SLIDE 28
  • Augment particle_demo.py to finish implementing a particle

filter for the 4 room problem.

  • The motion model says that 50% of the time the robot remains

stationary and 50% of the time it moves as requested.

  • Sensor accuracy is 80% (gets the correct room with prob 0.8).
  • The methods for the motion model and reweighing the

particles are complete. You need to complete:

  • normalize_particles – update the weights so they make a distribution

(sum to 1)

  • calc_probability – based on the particles, what is the probability that the

robot is in room x

  • Resample -- select new particles and assign a uniform weight

Next Problem in Localization Homework

slide-29
SLIDE 29

29

  • The approach described so far is able to:
  • track the pose of a mobile robot and to
  • globally localize the robot.
  • Issues:
  • What happens if we resample while the robot is

stationary?

  • How can we deal with localization errors (i.e., the

kidnapped robot problem)?

Limitations

slide-30
SLIDE 30

30

  • Randomly insert samples (the robot can be teleported at any

point in time).

  • Insert random samples proportional to the average likelihood
  • f the particles (the robot has been teleported with higher

probability when the likelihood of its observations drops).

Some Solutions

slide-31
SLIDE 31

31

  • Particle filters are an implementation of recursive

Bayesian filtering

  • They represent the posterior by a set of weighted

samples.

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

Summary