55
Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman, Oxford (SSS 06)

2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Kalman Localization

2.166 Lecture 729 September 2008

These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman, Oxford (SSS 06)

Page 2: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Next Topics for Discussion

• EKF localization with beacons • Particle Filter localization with beacons• How to extend this to the real world?

Page 3: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Next Topics for Discussion• EKF localization with beacons

(this is research assignment 2) • Particle Filter localization with beacons

(demonstration at the start of class?)• How to extend this to the real world?

– How do we get the map? (build it online)– Feature extraction (not just points)– Matching features to the model

(a.k.a. data association or correspondence)

– Robustness– Scalability

Page 4: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Towards EKF SLAM (RA3)• Some handouts:

– Seminal paper by Smith, Self, & Cheeseman– Tutorial papers by Durrant-Whyte and Bailey– SSS 06’ lecture notes by Paul Newman– Localization using beacons paper from 1991– Read Chap 10 of Thrun, Burgard and Fox

• Today we will talk about:– EKF Navigation architectures (P. Newman)– Composition and inversion of coordinate

transforms (Smith, Self, and Cheeseman)– An introductory discussion of SLAM

Page 5: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Overall class roadmap• Research Assignment 3:

– EKF SLAM in matlab– Jacques has provided a template for you,

very similar to research assignment 2– Data association is provided, – Features are points– Scale of the environment is small

• Time to start thinking substantially about the project (meet JL one-on-one?)

• Next 3-4 lectures will cover SLAM basic machinery, data association, scaling, etc.

• First guest lecture: oct 15th Information-Form SLAM, Dr. Matt Walter

Page 6: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Example: AUV Navigation with Beacons

Page 7: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,
Page 8: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Typical LBL Data (Charles River, 1994)

Page 9: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Navigation results with and without outlier rejection

Page 10: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Much more challenging conditions –Deep Ocean (Juan de Fuca, 1995)

Page 11: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Italy, 2002

Page 12: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Estimated AUV Trajectory

Page 13: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Travel Time Measurements (LBL)

Without outlier rejection

With outlier rejection

Page 14: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Using The EKF in Navigation

From: P. Newman SSS 06

Page 15: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Navigation Architecture (P. Newman)

DR Model

Encoder Counts

HiddenControl

Nav

Physics

Other Measurements

Supplied OnboardSystem

Navigation (to be installed by us)

Physics (to be estimated)

Dead Reckoned output(drifts badly)

required (corrected)navigation estimates

integration

Page 16: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

EKF Summary

Page 17: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

One Cycle of the Kalmanfilter

From: Bar-Shalom

Page 18: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Reminder: the i|j notation

true estimatedThis is useful for derivations but we can never use it in a calc asx is unknown truth!

Data up to t=j

Page 19: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Nonlinear Kalman Filtering

Same trick as in Non-linear Least Squares:• Linearize around a current estimate using jacobian• Problem becomes linear again

Page 20: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Recalculate Jacs at each iteration

Page 21: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

One Cycle of the EKF

From: Bar-Shalom

Page 22: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Implementing this as part of a robust navigation architecture:

•Asynchronisity•Prediction Covariance Inflation•Update Covariance Deflation•Observability•Correlations

From: P. Newman SSS 06

Page 23: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

New control u(k)available ?

x(k|k-1) = Fx(k-1|k-1) +Bu(k)P(k|k-1) = F P(k-1|k-1) FT +GQGT

x(k|k-1) = x(k-1|k-1)P(k|k-1) = P(k-1|k-1)

x(k|k) = x(k|k-1)P(k|k) = P(k|k-1)

k=k+1

Delay

Prepare For Update

Prediction

Update

Input to plant enters heree.g steering wheel angle

yesno

yesno

prediction is lastestimate

estimate is lastprediction

S = H P(k|k-1) HT +RW = P(k|k-1) HT S-1

v(k) = z(k) - H x(k|k-1)

x(k|k) = x(k|k-1)+ Wv(k)P(k|k) = P(k|k-1) - W S WT

New observation z(k)available ?

Data from sensors enteralgorithm here e.g compass

measurement

From: P. Newman SSS 06

Page 24: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Vehicle Models - Prediction

(x,y)

Global Reference Frame

L

θ

φ

InstantaneousCenter ofRotation

V

φ

a

control

Truth model

Page 25: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Noise is in control….

Page 26: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Effect of control noise on uncertainty:

Page 27: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Composing Spatial Relationships (Smith, Self, & Cheeseman, 1990)

2

3

1

X1,2

X2,3

X1,3

Compounding transformations

Page 28: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

O-Plus and O-Minus Notation

Page 29: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Jacobians: J1 and J2

Page 30: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Deduce an Incremental Move

xo(k-1)

u(k)xo(k)

Global Frame

These can be in massive error

But the common error is subtracted out here

Page 31: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Use this “move” as a control

Substitution into Prediction equation (using J1 and J2 as Jacobians):

Diagonal covariance matrix (3x3) of error in uo

Page 32: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Mapping vs Localisation

Page 33: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Problem Geometry

Page 34: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Landmarks / Features

Things that standout to a sensor:Corners, windows, walls, bright patches, texture…

MapPoint Feature called “i”

Page 35: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Observations / Measurements

Relative On Vehicle sensing environment:• Radar• Cameras• Odometry (really)• Sonar Laser

AbsoluteRelies on infrastructure:•GPS•Compass

How smart can we be with relative only measurements?

Page 36: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

From Bayes Rule…..

Input is measurements conditioned on map and vehicle

We want to use Bayes rule to “invert this” and get maps and vehicles given measurements.

Data:

Page 37: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Problem 1 - Localisation

Page 38: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

KF implementation using o-plus and o-minus

Remember:u is control, J’s are a fancy way of writing jacobians(composition operator). Q is strength of noise in plant model.

Plant Model

Page 39: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Processing Data

r

Page 40: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Implementation

No features seen here

Page 41: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Location Covariance

Page 42: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Location Innovation

Page 43: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Problem II Mapping

With known vehicle

Map

The state vector is the map

Page 44: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

But how is map built?Key Point: State Vector GROWS!

New, bigger map

Old mapObs of new feature

“State augmentation”

Page 45: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

How is P augmented?Simple! Use the transformation of covariance rule..

G is the feature initialisation function

Page 46: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Leading to :

Vehicle orientationAngle from Veh to feature

Page 47: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

So what are models h and f?h is a function of the feature being observed:

f is simply the identity transformation :

Page 48: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Turn the handle on the EKF:

All hail the Oracle ! How do we know whatfeature we are observing?

Page 49: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Problem III SLAM

“Build a map and use it at the same time”

“This a cornerstone of autonomy”

Page 50: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Bayesian Framework

Page 51: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

How Is that sum evaluated?

A current area of interest/debate– Monte-carlo Methods – Thin Junction Trees – Grid based techniques– Kalman Filter

•All have their individual pros and cons•All try to estimate p(xk|Zk) – state of the world given data

Page 52: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Naïve SLAM

A union of Localisation and Mapping

Why naïve? Computation!

State vector has vehicle AND map

Page 53: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Prediction:

Note:features stay still- no noise added and jacobian is identity

Note:The control is noisy u = unominal+noise

Page 54: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,

Feature Initialisation:This whole function is y(.)from discussion of state augmentationin mapping section

These last two linesare g()

This is our new expandedcovariance

Page 55: 2166 september 29 2008 · Kalman Localization 2.166 Lecture 7 29 September 2008 These viewgraphs are based heavily on materials generously made available to me by Dr. Paul Newman,