Lecture1 2023
Lecture1 2023
1
Robot localization
Estimating a robot’s pose, i.e. its
location (or position) and
orientation relative to a global
coordinate frame.
2
Robot localization
Robot localization is a form of state
estimation, and initially we take the
state to mean the pose.
If the robot is confined to a surface, the
state vector is denoted
x
xt = y
3
Robot localization
We use the symbol xt to denote the
robot’s pose at time t relative to a
global coordinate frame, more
specifically a map.
7
Robot localization example 1
8
Basic robot localization process
Where (on
the map)
Measurement am I? Motion model
(sensor) (prediction
model step)
(update step)
Where (on
the map)
am I?
9
Uncertainty in Localization
Motion model: robot may slip, error in
heading can affect new position
• 0 Pr( A) 1
• Pr(True) = 1 Pr(False) = 0
12
A Closer Look at Axiom 3
True
A A B B
13
Discrete Random Variables
• E.g.
x
• Total probability p( x) dx = 1
−
15
Random Variables for this course
Random variable Denoted Its particular value,
indexed at time t
Robot state X xt
Sensor measurement Z zt
Control input U ut
Where (on
the map)
Measurement am I? Motion model
(sensor) (prediction
model step)
(update step)
Where (on
the map)
am I? 16
Joint and Conditional Probability
• P(X=x and Y=y) = P(x,y)
P( x y ) = 1
x
p( x y) dx = 1
−
P( y x) = 1
y
p( y x) dy = 1
−
Note: P( x y ) = 1
xy
in general
18
Conditional probabilities for this course
Measurement model: p(zt | xt)
Motion model: p(xt | xt-1 , ut )
Belief: bel(xt) = p(xt | z1:t , u1:t)
Where (on
the map)
Measurement am I? Motion model
(sensor) (prediction
model step)
(update step)
Where (on
the map)
am I? 19
Robot localization example 2
20
Robot localization example 2
21
22
Robot localization example 2
23
Robot localization example 2
24
More Probability review: Bayes Formula
P ( x, y ) = P ( x | y ) P ( y ) = P ( y | x ) P ( x )
P( y | x) P( x) likelihood prior
P( x y) = =
P( y ) evidence
• Bayes Formula allows us to “invert”
probability problems, to find something
hard to estimate, p(x | z), from something
easier to directly estimate, p(z | x)
25
Bayes Formula
P ( x, y ) = P ( x | y ) P ( y ) = P ( y | x ) P ( x )
P( y | x) P( x) likelihood prior
P( x y) = =
P( y ) evidence
• Conditional on additional variables:
P ( y | x, z ) P ( x z )
P( x y, z ) =
P( y z )
26
Marginal Probabilities
Discrete case
P ( x ) = P ( x, y )
y
P( x) = P( x | y ) P( y )
y
Continuous case
p ( x) = p ( x, y ) dy
27
Conditioning on additional variables
P( x) = P( x, z )dz
P( x) = P( x | z ) P( z )dz
P( x y ) = P( x | y, z ) P( z | y ) dz
28
Normalization
P( y | x) P( x)
P( x y ) = = P( y | x) P( x)
P( y )
1
= P( y ) =−1
P( y | x)P( x)
x
p( x y) dx = 1
−
29
Back to robot localization
An important assumption:
• Current measurement depends only on current state
• Current state can be fully known from prior state and
current control input
• Note: Our estimate of state depends on the measurement,
but not the state itself
Arrows show conditional dependencies; variables assumed
conditionally independent of all others not linked by arrow,
when already conditioned on the linked variable(s):
30
Markov Assumption
Where (on
the map)
Measurement am I? Motion model
(sensor) (prediction
model step)
(update step)
Where (on
the map)
am I? 32
Bayes Formula
P ( x, y ) = P ( x | y ) P ( y ) = P ( y | x ) P ( x )
P( y | x) P( x) likelihood prior
P( x y) = =
P( y ) evidence
• Conditional on additional variables:
P ( y | x, z ) P ( x z )
P( x y, z ) =
P( y z )
33
Normalization
P( y | x) P( x)
P( x y ) = = P( y | x) P( x)
P( y )
1
= P( y ) =−1
P( y | x)P( x)
x
p( x y) dx = 1
−
34
Markov Assumption
35
36
Conditional probabilities for this course
Measurement model: p(zt | xt)
Motion model: p(xt | xt-1 , ut )
Belief: Bel(xt) = p(xt | z1:t , u1:t)
Bel(xt)
37
Conditioning on additional variables
P( x) = P( x, z )dz
P( x) = P( x | z ) P( z )dz
P( x y ) = P( x | y, z ) P( z | y ) dz
38
Markov Assumption
39
40
Conditional probabilities for this course
Measurement model: p(zt | xt)
Motion model: p(xt | xt-1 , ut )
Belief: Bel(xt) = p(xt | z1:t , u1:t)
p(zt | xt)
p(xt | xt-1 , ut )
41
Bayes Filters
Bel ( xt ) = P( zt | xt ) P( xt | ut , xt −1 ) Bel ( xt −1 ) dxt −1
Where (on
the map)
Measurement am I? Motion/action
/perception model
(sensor) (prediction
model step)
Where (on
(update step)
the map)
am I?
42
Bayes Filters
Bel ( xt ) = P( zt | xt ) P( xt | ut , xt −1 ) Bel ( xt −1 ) dxt −1
Prediction Update
Bel ( xt −1 ) step Bel ( xt ) step Bel ( xt )
43
Discrete Bayes Filter Algorithm
(sequence of perception and action doesn’t matter)
44