Professional Documents
Culture Documents
SLAM Tutorial
SLAM Tutorial
SLAM Tutorial
Robust local
motion estimation
2 3 4
Map optimisation Long-term map
management & localization
Mapping &
loop-closure
detection
Autonomous Mobile Robots
Margarita Chli, Paul Furgale, Marco Hutter, Martin Rufli, Davide Scaramuzza, Roland Siegwart [Chli,2009, PhD thesis] Localization | Monocular SLAM and beyond | 47
The SLAM Problem
2
The SLAM Problem
9
Why is SLAM a hard problem?
Robot
pose
uncertainty
• Relative observations
Z ={z1, z2,...,zn}
Wanted:
• Map of features
5
Structure of the Landmark-
based SLAM-Problem
6
SLAM Applications
Indoors Undersea
Space Underground
7
Representations
• Grid maps or scans
[Lu & Milios, 97; Gutmann, 98: Thrun 98; Burgard, 99; Konolige & Gutmann, 00; Thrun, 00; Arras,
99; Haehnel, 01;…]
• Landmark-based
[Leonard et al., 98; Castelanos et al., 99: Dissanayake et al., 2001; Montemerlo et al., 2002;…
8
The SLAM Problem- Preliminaries(1)
• Xk : the state vector
describing the location and
orientation of the vehicle at
time k.
• uk : the control vector
applied the time k-1.
• mi: a vector describing the
location of the ith landmark.
The landmarks are
motionless.
• zik : an observation taken
from the vehicle of the
location of the ith landmark
at time k.
The SLAM Problem- Preliminaries(2)
• Also the following sets are defined:
– X0:k = {x0, x1,··· , xk} Position estimates
– U0:k = {u1, u2,··· , uk} Motion update controls
– Z0:k = {z1, z2,··· , zk} Sensor measurements
– m = {m1, m2,··· , mn} Landmark locations
SLAM:
Simultaneous Localization and Mapping
• Online SLAM:
p(xt , m | z1:t ,u1:t ) … p(x1:t , m | z1:t ,u1:t ) dx1dx2 ...dxt 1
Integrations (marginalization) typically
done one at a time
4
Graph-Based SLAM
§ Nodes represent poses or locations
§ Constraints connect the poses of the
robot while it is moving
§ Constraints are inherently uncertain
17
Create an Edge If… (2)
§ …the robot observes the same part of
the environment from and from
xi
xj
X = [-3 2 5]
Location: -3 2 5
X(0) X(1) X(2)
Move 5 Move 3
loop loop 2
5
10
L0
7
X = [-3 2 5 7]
Linear 1-D Graph Slam
For overdetermined system, compute PseudoInverse Matrix:
A*X=B
AT *A * X = AT * B; AT = transpose of A
X = (AT*A)-1 * AT * B; ATA guaranteed to be square
(AT*A)-1 * AT is PseudoInverse
Solution:
1 0 00 X(0) -3
1 -1 0 0 X(1) = -5
0 1 -1 0 X(2) -3
1 0 0 -1 L(0) -10
0 1 0 -1 -5
0 0 1 -1 -2
X = [-3 2 5 7]
Matlab Code: Least Squares
A=
1 0 0 0
-1 1 0 0
0 -1 1 0
A=[1 0 0 0;-1 1 0 0; 0 -1 1 0; 1 0 0 -1;0 1 0 -1; 0 0 1 -1] 1 0 0 -1
0 1 0 -1
B=[-3; 5; 3; -10; -5; -2] 0 0 1 -1
B=
-3
ATA = transpose(A)*A 5
ATB = transpose(A)*B 3
-10
X= inv(ATA)*ATB; -5
disp('Solution:') -2
ATA =
disp(X) 3 -1 0 -1
-1 3 -1 -1
0 -1 2 -1
-1 -1 -1 3
ATB =
-18
X(0) = -3; X(1) = 2; X(2)=5; L(0) = 7 -3
1
17
Solution:
-3
2
5
7
Location: -3 2 5
X(0) X(1) X(2)
Move 5 Move 3
loop loop 2
5
10
L0
7
5 (now 4.75)
10 (now 9.875)
L0
6.875
SLAM!
Adding Confidence Measures
• Linear Least Squares allows us to include a weighting of each linear constraint.
• If we know something about how confident a measure is, we can include that
in the computation
• We weight each constraint by a diagonal matrix where the weights are
1/variance for each constraint.
• Highly confident constraints have low variance; 1/variance is large weight.
• Unconfident constraints have high variance; 1/variance is small weight.
• Matrix Formulation for weighted Least Squares (A*X=B):
X = (AT * W * A)-1 * AT * W * B
L0
6.875 -> 6.8214
loop loop
2 4 2 Solution:
X(0)= 5.0000
X(1)= 12.0000
X(2)= 14.0000
L0= 7.0000
L0 L1 L1= 16.0000
If X(1) sees L0 at 4
Example: Multiple landmarks: Can and X(2) sees L1 at 2
incorporate multiple landmarks – each
Solution:
measurement is a constraint. In this example, X(0)= 5.0000
X(0)=5, X(1)=X(0)+7, X(2)=X(1)+2; X(0) sees L0 X(1)= 12.0000
X(2)= 14.3000
at 2, X(1) sees L1 at 4 and X(2) sees L1 at 2
L0= 6.0000
L1= 15.6667
ASL
Autonomous Systems Lab
7
Localization vs. SLAM
A particle filter can be used to solve both problems
FastSLAM approach
It solves the SLAM problem using particle filters.
Each particle k :estimate of robot path and mean, and covariance of each of
the n features: P[k] (Xt[k] μ[k]; Σ1[k] … μ[k] Σn[k] )
SLAM posterior
Robot path posterior
landmark positions
Does this help to solve the problem?
Factorization first introduced by Murphy in 1999 11
Mapping using Landmarks
Landmark 1 l1
observations z1 z3
controls u0 u1 u ut-1
1
z2 zt
Landmark 2 l2
15
Factored Posterior
Particle
#1
x, y, Landmark 1 Landmark 2 … Landmark M
Particle
#2
x, y, Landmark 1 Landmark 2 … Landmark M
…
Particle
N
x, y, Landmark 1 Landmark 2 … Landmark M
16
FastSLAM – Action Update
Landmark #1
Filter
Particle #1
Landmark #2
Filter
Particle #2
Particle #3
17
FastSLAM – Sensor Update
Landmark #1
Filter
Particle #1
Landmark #2
Filter
Particle #2
Particle #3
18
FastSLAM – Sensor Update
19
FastSLAM - Video
20
Results – Victoria Park
4 km traverse
< 5 m RMS
position error
100 particles
Blue = GPS
Yellow = FastSLAM
Dataset courtesy of University of Sydney 25
Data Association Problem
Which observation belongs to which landmark?
22
Multi-Hypothesis Data Association
Data association is
done on a per-particle
basis
23
Per-Particle Data Association