59
1 Robot Mapping EKF SLAM Cyrill Stachniss

Robot Mapping EKF SLAM

Embed Size (px)

Citation preview

Page 1: Robot Mapping EKF SLAM

1

Robot Mapping

EKF SLAM

Cyrill Stachniss

Page 2: Robot Mapping EKF SLAM

2

Simultaneous Localization and Mapping (SLAM) §  Building a map and locating the robot

in the map at the same time §  Chicken-or-egg problem

map

localize

Page 3: Robot Mapping EKF SLAM

3

Definition of the SLAM Problem

Given §  The robot’s controls

§ Observations

Wanted § Map of the environment

§  Path of the robot

Page 4: Robot Mapping EKF SLAM

4

Three Main Paradigms

Kalman filter

Particle filter

Graph-based

Page 5: Robot Mapping EKF SLAM

5

Bayes Filter

§  Recursive filter with prediction and correction step

§  Prediction

§  Correction

Page 6: Robot Mapping EKF SLAM

6

EKF for Online SLAM

§  The Kalman filter provides a solution to the online SLAM problem, i.e.

Page 7: Robot Mapping EKF SLAM

7

Extended Kalman Filter Algorithm

Page 8: Robot Mapping EKF SLAM

8

EKF SLAM

§  Application of the EKF to SLAM §  Estimate robot’s pose and location of

features in the environment §  Assumption: known correspondence §  State space is

Page 9: Robot Mapping EKF SLAM

9

EKF SLAM: State Representation §  Map with n landmarks: (3+2n)-dimensional

Gaussian §  Belief is represented by

Page 10: Robot Mapping EKF SLAM

10

EKF SLAM: State Representation §  More compactly

Page 11: Robot Mapping EKF SLAM

11

EKF SLAM: State Representation §  Even more compactly (note: )

Page 12: Robot Mapping EKF SLAM

12

EKF SLAM: Filter Cycle

1.  State prediction 2. Measurement prediction 3. Measurement 4. Data association 5. Update

Page 13: Robot Mapping EKF SLAM

13

EKF SLAM: State Prediction

Page 14: Robot Mapping EKF SLAM

14

EKF SLAM: Measurement Prediction

Page 15: Robot Mapping EKF SLAM

15

EKF SLAM: Obtained Measurement

Page 16: Robot Mapping EKF SLAM

16

EKF SLAM: Data Association

Page 17: Robot Mapping EKF SLAM

17

EKF SLAM: Update Step

Page 18: Robot Mapping EKF SLAM

18

EKF-SLAM: Concrete Example

Setup §  Robot moves in the plane §  Velocity-based motion model §  Robot observes point landmarks §  Range-bearing sensor §  Known data association §  Known number of landmarks

Page 19: Robot Mapping EKF SLAM

19

Initialization

§  Robot starts in its own reference frame (all landmarks unknown)

§  2N+3 dimensions

Page 20: Robot Mapping EKF SLAM

20

Extended Kalman Filter Algorithm

Page 21: Robot Mapping EKF SLAM

21

Prediction Step (Motion)

§  Goal: Update state space based on the robot’s motion

§  Robot motion in the plane

§  How to map that to the 2N+3 dim space?

Page 22: Robot Mapping EKF SLAM

22

Update the State Space

§  From the motion in the plane

§  to the 2N+3 dimensional space

Page 23: Robot Mapping EKF SLAM

23

Extended Kalman Filter Algorithm

DONE

Page 24: Robot Mapping EKF SLAM

24

Update Covariance

§  The function only affects the robot’s motion and not the landmarks

Jacobian of the motion (3x3)

Identity (2N x 2N)

Page 25: Robot Mapping EKF SLAM

25

Jacobian of the Motion

Page 26: Robot Mapping EKF SLAM

26

This Leads to the Update

DONE

Page 27: Robot Mapping EKF SLAM

27

Extended Kalman Filter Algorithm

DONE DONE

Page 28: Robot Mapping EKF SLAM

28

EKF SLAM – Prediction

Page 29: Robot Mapping EKF SLAM

29

Extended Kalman Filter Algorithm

DONE Apply & DONE

Page 30: Robot Mapping EKF SLAM

30

EKF SLAM – Correction

§  Known data association §  : i-th measurement observes

the landmark with index j §  Initialize landmark if unobserved §  Compute the expected observation §  Compute the Jacobian of §  Then, proceed with computing the

Kalman gain

Page 31: Robot Mapping EKF SLAM

31

Range-Bearing Observation

§  Range-bearing observation §  If landmark has not been observed

observed location of landmark j

estimated robot’s location

relative measurement

Page 32: Robot Mapping EKF SLAM

32

Expected Observation

§  Compute expected observation according to the current estimate

Page 33: Robot Mapping EKF SLAM

33

Jacobian for the Observation

§  Based on

§  Compute the Jacobian

Page 34: Robot Mapping EKF SLAM

34

Jacobian for the Observation

§  Use the computed Jacobian

§  map it to the high dimensional space

Page 35: Robot Mapping EKF SLAM

35

Next Steps as Specified…

DONE DONE

Page 36: Robot Mapping EKF SLAM

36

Extended Kalman Filter Algorithm

DONE DONE

Apply & DONE

Apply & DONE Apply & DONE

Page 37: Robot Mapping EKF SLAM

37

EKF SLAM – Correction (1/2)

Page 38: Robot Mapping EKF SLAM

38

EKF SLAM – Correction (2/2)

Page 39: Robot Mapping EKF SLAM

39

Implementation Notes

§  Measurement update in a single step requires only one full belief update

§  Always normalize the angular components

§  You may not need to create the matrices explicitly (e.g. in Octave)

Page 40: Robot Mapping EKF SLAM

40

Done!

Page 41: Robot Mapping EKF SLAM

41

Loop Closing §  Recognizing an already mapped area §  Data association with

§  high ambiguity §  possible environment symmetries

§  Uncertainties collapse after a loop closure (whether the closure was correct or not)

Page 42: Robot Mapping EKF SLAM

42

Before the Loop Closure

Courtesy of K. Arras

Page 43: Robot Mapping EKF SLAM

43

After the Loop Closure

Courtesy of K. Arras

Page 44: Robot Mapping EKF SLAM

44

SLAM: Loop Closure §  Loop closing reduces the uncertainty in

robot and landmark estimates

§  This can be exploited when exploring an environment for the sake of better (e.g. more accurate) maps

§  Wrong loop closures lead to filter divergence

Page 45: Robot Mapping EKF SLAM

45

EKF-SLAM Properties

§  In the limit, the landmark estimates become fully correlated

[Dissanayake et al., 2001]

Page 46: Robot Mapping EKF SLAM

46

EKF SLAM

Map Correlation matrix Courtesy of M. Montemerlo

Page 47: Robot Mapping EKF SLAM

47

EKF SLAM

Map Correlation matrix Courtesy of M. Montemerlo

Page 48: Robot Mapping EKF SLAM

48

EKF SLAM

Map Correlation matrix Courtesy of M. Montemerlo

Page 49: Robot Mapping EKF SLAM

49

EKF-SLAM Properties §  The determinant of any sub-matrix of the map

covariance matrix decreases monotonically §  New landmarks are initialized with max

uncertainty

[Dissanayake et al., 2001]

Page 50: Robot Mapping EKF SLAM

50

EKF-SLAM Properties §  In the limit, the covariance associated with

any single landmark location estimate is determined only by the initial covariance in the vehicle location estimate.

[Dissanayake et al., 2001]

Page 51: Robot Mapping EKF SLAM

51

Example: Victoria Park Dataset

Courtesy of E. Nebot

Page 52: Robot Mapping EKF SLAM

52

Victoria Park: Data Acquisition

Courtesy of E. Nebot

Page 53: Robot Mapping EKF SLAM

53

Victoria Park: EKF Estimate

Courtesy of E. Nebot

Page 54: Robot Mapping EKF SLAM

54

Victoria Park: Landmarks

Courtesy of E. Nebot

Page 55: Robot Mapping EKF SLAM

55

Example: Tennis Court Dataset

Courtesy of J. Leonard and M. Walter

Page 56: Robot Mapping EKF SLAM

56

EKF SLAM: Tennis Court

odometry estimated trajectory

Courtesy of J. Leonard and M. Walter

Page 57: Robot Mapping EKF SLAM

57

EKF-SLAM Complexity

§  Cubic complexity depends only on the measurement dimensionality

§  Cost per step: dominated by the number of landmarks:

§  Memory consumption: §  The EKF becomes computationally

intractable for large maps!

Page 58: Robot Mapping EKF SLAM

58

EKF-SLAM Summary

§  The first SLAM solution §  Convergence proof for the linear

Gaussian case §  Can diverge if non-linearities are large

(and the reality is non-linear...) §  Can deal only with a single mode §  Successful in medium-scale scenes §  Approximations exists to reduce the

computational complexity

Page 59: Robot Mapping EKF SLAM

59

Literature

EKF SLAM §  Thrun et al.: “Probabilistic Robotics”,

Chapter 10