91
1 62623 SLAM, J. Neira 3. The Data Association Problem

3. The Data Association Problem - webdiis.unizar.es

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 3. The Data Association Problem - webdiis.unizar.es

1 62623 SLAM, J. Neira

3. The Data Association Problem

Page 2: 3. The Data Association Problem - webdiis.unizar.es

2 62623 SLAM, J. Neira

Outline 1. Introduction:

Why data association is important in SLAM, why it’s difficult

2. Data association in continuous SLAM

3. The loop closing problem

4. The global localization problem

5. Appendix

Page 3: 3. The Data Association Problem - webdiis.unizar.es

3 62623 SLAM, J. Neira

1. Introduction

Page 4: 3. The Data Association Problem - webdiis.unizar.es

4 62623 SLAM, J. Neira

» Red dots: environment features (columns) » Black line: robot trajectory » Black semicircle: sensor range

Example: SLAM in a cloister

Page 5: 3. The Data Association Problem - webdiis.unizar.es

5 62623 SLAM, J. Neira

Without loss of generality... • Enviroment to be mapped has more or less

uniform density of features

Page 6: 3. The Data Association Problem - webdiis.unizar.es

6 62623 SLAM, J. Neira

Without loss of generality... • Enviroment to be mapped has more or less

uniform density of features

Page 7: 3. The Data Association Problem - webdiis.unizar.es

7 62623 SLAM, J. Neira

Without loss of generality... • Onboard range and bearing sensor obtains m

measurements

Page 8: 3. The Data Association Problem - webdiis.unizar.es

8 62623 SLAM, J. Neira

Without loss of generality... • Vehicle performs an exploratory trajectory, re-

observing r features, and seeing s = m – r new features.

Page 9: 3. The Data Association Problem - webdiis.unizar.es

9 62623 SLAM, J. Neira

The basic EKF-SLAM algorithm •  Environment information related to a set

of elements:

•  represented by a stochastic map:

B xFn B

xF1 B

xF2 B

xR B

Page 10: 3. The Data Association Problem - webdiis.unizar.es

10 62623 SLAM, J. Neira

EKF-SLAM demo_laser

Page 11: 3. The Data Association Problem - webdiis.unizar.es

11 62623 SLAM, J. Neira

Map Features in 2D

Points:

Lines:

Page 12: 3. The Data Association Problem - webdiis.unizar.es

12 62623 SLAM, J. Neira

Sensor measurements •  In polar coordinates: •  In cartesian coordinates:

Page 13: 3. The Data Association Problem - webdiis.unizar.es

13 62623 SLAM, J. Neira

The basic EKF SLAM Algorithm

Sensor measurements

Page 14: 3. The Data Association Problem - webdiis.unizar.es

14 62623 SLAM, J. Neira

EKF-SLAM: Observations

Sensor model (white noise): Measurement equation:

Observations at instant k:

Page 15: 3. The Data Association Problem - webdiis.unizar.es

15 62623 SLAM, J. Neira

EKF-SLAM: add new features

Linearization:

Where:

Page 16: 3. The Data Association Problem - webdiis.unizar.es

16 62623 SLAM, J. Neira

EKF-SLAM: add new features

Page 17: 3. The Data Association Problem - webdiis.unizar.es

17 62623 SLAM, J. Neira

EKF-SLAM: add new features

Page 18: 3. The Data Association Problem - webdiis.unizar.es

18 62623 SLAM, J. Neira

EKF-SLAM: compute robot motion

Page 19: 3. The Data Association Problem - webdiis.unizar.es

19 62623 SLAM, J. Neira

Vehicle motion in 2D

Inversion:

Composition:

Page 20: 3. The Data Association Problem - webdiis.unizar.es

20 62623 SLAM, J. Neira

Odometry in 2D Jacobians:

Page 21: 3. The Data Association Problem - webdiis.unizar.es

21 62623 SLAM, J. Neira

EKF-SLAM: compute robot motion

Odometry model (white noise):

EKF prediction:

Page 22: 3. The Data Association Problem - webdiis.unizar.es

22 62623 SLAM, J. Neira

EKF-SLAM: compute robot motion

Page 23: 3. The Data Association Problem - webdiis.unizar.es

23 62623 SLAM, J. Neira

EKF-SLAM: Observations

Page 24: 3. The Data Association Problem - webdiis.unizar.es

24 62623 SLAM, J. Neira

EKF-SLAM: Observations

Sensor model (white noise): Measurement equation:

Observations at instant k:

Association Hypothesis (obs. i with map feature ji) :

Page 25: 3. The Data Association Problem - webdiis.unizar.es

25 62623 SLAM, J. Neira

EKF-SLAM: Data association

Page 26: 3. The Data Association Problem - webdiis.unizar.es

26 62623 SLAM, J. Neira

EKF-SLAM: Observations

Linearization:

Page 27: 3. The Data Association Problem - webdiis.unizar.es

27 62623 SLAM, J. Neira

Data association

Innovation:

Mahalanobis distance:

Hypothesis test:

Page 28: 3. The Data Association Problem - webdiis.unizar.es

28 62623 SLAM, J. Neira

EKF-SLAM: map update

State update:

Covariance update:

Filter gain:

Page 29: 3. The Data Association Problem - webdiis.unizar.es

29 62623 SLAM, J. Neira

EKF-SLAM: map update

Page 30: 3. The Data Association Problem - webdiis.unizar.es

30 62623 SLAM, J. Neira

The Data Association Problem

• n map features:

•  m sensor measurements:

• Data association should return a hypothesis that associates each observation Ei with a feature Fji

• Non matched observations:

Page 31: 3. The Data Association Problem - webdiis.unizar.es

31 62623 SLAM, J. Neira

The Correspondence Space Interpretation tree

(Grimson et al. 87):

possible hypotheses

Green points: measurements Blue Points: predicted features

Page 32: 3. The Data Association Problem - webdiis.unizar.es

32 62623 SLAM, J. Neira

Why data association is difficult •  Low sensor error •  High sensor error

Page 33: 3. The Data Association Problem - webdiis.unizar.es

33 62623 SLAM, J. Neira

Why data association is difficult •  Low odometry error •  High odometry error

Page 34: 3. The Data Association Problem - webdiis.unizar.es

34 62623 SLAM, J. Neira

Why data association is difficult •  Low feature density •  High feature density

Page 35: 3. The Data Association Problem - webdiis.unizar.es

35 62623 SLAM, J. Neira

How important is data association?

A good algorithm A bad algorithm

Page 36: 3. The Data Association Problem - webdiis.unizar.es

36 62623 SLAM, J. Neira

Why it’s difficult?

A good algorithm A bad algorithm

Page 37: 3. The Data Association Problem - webdiis.unizar.es

37 62623 SLAM, J. Neira

Importance of Data Association • EKF update:

• If the association of Ei with feature Fj is…..

error:

covariance:

Divergence! Consistency

correct: spurious:

Values that depend on

Page 38: 3. The Data Association Problem - webdiis.unizar.es

38 62623 SLAM, J. Neira

2. Data association in continuous SLAM

Page 39: 3. The Data Association Problem - webdiis.unizar.es

39 62623 SLAM, J. Neira

Individual Compatibility • Measurement equation for observation Ei and

feature Fj

• Ei and Fj are compatible if:

d = length(zi)

Page 40: 3. The Data Association Problem - webdiis.unizar.es

40 62623 SLAM, J. Neira

Nearest Neighbor

Greedy algorithm: O(mn)

Page 41: 3. The Data Association Problem - webdiis.unizar.es

41 62623 SLAM, J. Neira

The Fallacy of the Nearest Neighbor

Unrobust

Page 42: 3. The Data Association Problem - webdiis.unizar.es

42 62623 SLAM, J. Neira

Joint Compatibility

• Given a hypothesis • Joint measurement equation

• The joint hypothesis is compatible if:

d = length(z)

Page 43: 3. The Data Association Problem - webdiis.unizar.es

43 62623 SLAM, J. Neira

Joint Compatibility Branch and Bound

•  Find the largest hypothesis with jointly consistent pairings

Selects the largest set of pairings where there is consensus

Page 44: 3. The Data Association Problem - webdiis.unizar.es

44 62623 SLAM, J. Neira

The Fallacy of the Nearest Neighbor

A

B

J. Neira, J.D. Tardós. Data Association in Stochastic Mapping using the Joint Compatibility Test IEEE Trans. Robotics and Automation, Vol. 17, No. 6, Dec 2001, pp 890 –897

Page 45: 3. The Data Association Problem - webdiis.unizar.es

45 62623 SLAM, J. Neira

SLAM without odometry

•  No estimation of the vehicle motion

Page 46: 3. The Data Association Problem - webdiis.unizar.es

46 62623 SLAM, J. Neira

SLAM without odometry

x y

x y

x y

x y

x y

x y

x y

x y

Assuming small motions

Page 47: 3. The Data Association Problem - webdiis.unizar.es

47 62623 SLAM, J. Neira

SLAM without odometry

x y

x y

x y

x y

x y

x y

x y

x y

Data association using Joint Compatibility

Page 48: 3. The Data Association Problem - webdiis.unizar.es

48 62623 SLAM, J. Neira

SLAM without odometry

x y

x y

x y

x y

x y

x y

x y

Vehicle motion estimation

Page 49: 3. The Data Association Problem - webdiis.unizar.es

49 62623 SLAM, J. Neira

SLAM without odometry

Page 50: 3. The Data Association Problem - webdiis.unizar.es

50 62623 SLAM, J. Neira

Continuous data association

Individual compatibility is O(nm) = O(n)

Page 51: 3. The Data Association Problem - webdiis.unizar.es

51 62623 SLAM, J. Neira

Map tessellation

Individual compatibility can be O(1)

Page 52: 3. The Data Association Problem - webdiis.unizar.es

52 62623 SLAM, J. Neira

4. The loop closing problem

Page 53: 3. The Data Association Problem - webdiis.unizar.es

53 62623 SLAM, J. Neira

Why we do SLAM

Dead-reckoning drift

Page 54: 3. The Data Association Problem - webdiis.unizar.es

54 62623 SLAM, J. Neira

Dead-reckoning, moving forward

0 50 100 150 -1

-0.5

0

0.5

1 Vehicle error in x (m)

0 50 100 150 -4

-2

0

2

4 Vehicle error in y (m)

0 50 100 150 -4

-2

0

2

4 Vehicle error in theta (deg)

0 50 100 150 0

0.5

1

1.5

2 x 10 -3 sqrt(det (P))

Page 55: 3. The Data Association Problem - webdiis.unizar.es

55 62623 SLAM, J. Neira

Bad news…

Uncertainty still grows!

-2 0 2 4 6 8 10 12 -2

0

2

4

6

8

10

12

Page 56: 3. The Data Association Problem - webdiis.unizar.es

56 62623 SLAM, J. Neira

Good news!

Loop closing reduces uncertainty!

-2 0 2 4 6 8 10 12 -2

0

2

4

6

8

10

12

Page 57: 3. The Data Association Problem - webdiis.unizar.es

57 62623 SLAM, J. Neira

Loop closing in EKF-SLAM

Loop closing reduces uncertainty!

0 20 40 60 -1

-0.5

0

0.5

1 Vehicle error in x (m)

0 20 40 60 -1

-0.5

0

0.5

1 Vehicle error in y (m)

0 20 40 60 -10

-5

0

5

10 Vehicle error in theta (deg)

0 20 40 60 0

2

4

6

8 x 10 -4 sqrt(det(P))

Page 58: 3. The Data Association Problem - webdiis.unizar.es

58 62623 SLAM, J. Neira

Loop closing

0 1 2 3 4 5 6 -2

-1

0

1

2

x y

x

y

x

y

x

y

x

y

demo_sonar

Page 59: 3. The Data Association Problem - webdiis.unizar.es

59 62623 SLAM, J. Neira

Nearest Neighbor

0 1 2 3 4 5 6 -2

-1

0

1

2

x y

x

y

x

y

x

y

x

y

Individually compatible

pairings

Wrong answer!

Page 60: 3. The Data Association Problem - webdiis.unizar.es

60 62623 SLAM, J. Neira

Joint Compatibility at work

0 1 2 3 4 5 6 -2

-1

0

1

2

x y

x

y

x

y

x

y

x

y

Jointly compatible

pairings

Page 61: 3. The Data Association Problem - webdiis.unizar.es

61 62623 SLAM, J. Neira

Loop closing in mosaicing use first

Joint work with R. García, University of Girona

Page 62: 3. The Data Association Problem - webdiis.unizar.es

62 62623 SLAM, J. Neira

Loop closing in mosaicing: use Last

Sequential mosaicing is a form of odometry

Page 63: 3. The Data Association Problem - webdiis.unizar.es

63 62623 SLAM, J. Neira

The loop closing problem •  Loop beginning •  Loop end

Page 64: 3. The Data Association Problem - webdiis.unizar.es

64 62623 SLAM, J. Neira

The loop closing problem

Page 65: 3. The Data Association Problem - webdiis.unizar.es

65 62623 SLAM, J. Neira

The loop closing problem

-100 -50 0 50 100 150 200 250 300 350

-150

-100

-50

0

50

100

150

200

Measurements (red) and predicted features (blue)

Page 66: 3. The Data Association Problem - webdiis.unizar.es

66 62623 SLAM, J. Neira

The loop closing problem

•  Individual compatibility •  Joint Compatibility

0 20 40 60 80 100 120 140 160 180

-50

0

50

100 0 20 40 60 80 100 120 140 160 180

-50

0

50

100

Page 67: 3. The Data Association Problem - webdiis.unizar.es

67 62623 SLAM, J. Neira

The loop closing problem

Page 68: 3. The Data Association Problem - webdiis.unizar.es

68 62623 SLAM, J. Neira

4. The Global Localization problem

Page 69: 3. The Data Association Problem - webdiis.unizar.es

69 62623 SLAM, J. Neira

Global Localization • Robot placed in a previously mapped environment

http://www.acfr.usyd.edu.au/homepages/academic/enebot/victoria_park.htm

Page 70: 3. The Data Association Problem - webdiis.unizar.es

70 62623 SLAM, J. Neira

Problem Definition • On-board sensor obtains m measurements:

http://www.acfr.usyd.edu.au/homepages/academic/enebot/victoria_park.htm

Page 71: 3. The Data Association Problem - webdiis.unizar.es

71 62623 SLAM, J. Neira

Problem Definition

•  Twofold question: – Is the vehicle in the map? – If so, where?

http://www.acfr.usyd.edu.au/homepages/academic/enebot/victoria_park.htm

Page 72: 3. The Data Association Problem - webdiis.unizar.es

72 62623 SLAM, J. Neira

Global Localization algorithms

•  Correspondence space –  Consider consistent combinations of measurement-

feature pairings. »  Branch and Bound (Grimson, 1990) »  Maximum Clique (Bailey et. al. 2000) »  Random Sampling (Neira et. al. 2003)

•  Configuration space –  Consider different vehicle location hypotheses.

»  Monte Carlo Localization (Fox et. al. 1999) »  Markov Localization (Fox et. al. 1998)

Page 73: 3. The Data Association Problem - webdiis.unizar.es

73 62623 SLAM, J. Neira

In correspondence space

Page 74: 3. The Data Association Problem - webdiis.unizar.es

74 62623 SLAM, J. Neira

No vehicle location • Unary constraints:

depend on a single matching (size, color,…)

– Trees: trunk diameter

– Walls: length, corners: angle....

OK

61 714 354 176 000 valid hypotheses

Page 75: 3. The Data Association Problem - webdiis.unizar.es

75 62623 SLAM, J. Neira

No vehicle location • Binary constraints:

distances between points:

0 100 200 300 400 500 600 100

200

300

400

500

600

700

800

900

Page 76: 3. The Data Association Problem - webdiis.unizar.es

76 62623 SLAM, J. Neira

Locality •  Features Fi and Fj may belong to the same

hypotesis iff they are ‘close enough’.

x y x y x y x y x y x y

x y

x y S1

S2 S3

S4 S5

S6 S7 x y

x y S1

S2 S3

S4 S5

S6 S7

0 10 20 30 40 50 60 70

0

10

20

30

40

50

60

70

nz = 755

Covisibility matrix

Limit search in the map to subsets of covisible features Locality makes search linear with the global map size

Page 77: 3. The Data Association Problem - webdiis.unizar.es

77 62623 SLAM, J. Neira

Algorithm 1: Geometric Constraints Branch and Bound (Grimson, 1990)

Page 78: 3. The Data Association Problem - webdiis.unizar.es

78 62623 SLAM, J. Neira

Algorithm 2: Maximum Clique

• All unary and binary constraints can be precomputed

• Build a compatibility graph where: – Nodes represent unary compatible pairings – Arcs represent pairs of binary compatible pairings

• Carrahan, Pardalos (1990)

13

22

32

41

Page 79: 3. The Data Association Problem - webdiis.unizar.es

79 62623 SLAM, J. Neira

Algorithm 3: Generation Verification Generation

Page 80: 3. The Data Association Problem - webdiis.unizar.es

80 62623 SLAM, J. Neira

Algorithm 4: RANSAC

Page 81: 3. The Data Association Problem - webdiis.unizar.es

81 62623 SLAM, J. Neira

mean time .vs. m

Experiments 1. No significant difference in effectiveness of the

considered algorithms 2.  All algorithms are made linear with the size of

the map 3. Efficiency when the vehicle is in the map

Page 82: 3. The Data Association Problem - webdiis.unizar.es

82 62623 SLAM, J. Neira

Experiments 4. When the vehicle is NOT in the map: random measurements, 100 for each m=3..30

mean time .vs. m

J. Neira, J.D. Tardós, J.A. Castellanos, Linear time vehicle relocation in SLAM. IEEE Int. Conf. Robotics and Automation, Taipei, Taiwan, May, 2003

Page 83: 3. The Data Association Problem - webdiis.unizar.es

83 62623 SLAM, J. Neira

In configuration space

Page 84: 3. The Data Association Problem - webdiis.unizar.es

84 62623 SLAM, J. Neira

In Configuration Space: RANDOM sampling

• Consider s randomly chosen vehicle locations hypotheses:

• Monte Carlo Localization

Page 85: 3. The Data Association Problem - webdiis.unizar.es

85 62623 SLAM, J. Neira

Alternative 1: location-driven

• Consider each alternative location hypothesis in turn

Page 86: 3. The Data Association Problem - webdiis.unizar.es

86 62623 SLAM, J. Neira

In Configuration Space: GRID sampling

• Uniformly tessellate the space in s = nx ny nφ grid cells:

• Markov Localization

Page 87: 3. The Data Association Problem - webdiis.unizar.es

87 62623 SLAM, J. Neira

Voting in configuration space • Each measurement-feature pairing constrains the

set of possible vehicle locations:

Page 88: 3. The Data Association Problem - webdiis.unizar.es

88 62623 SLAM, J. Neira

Alternative 2: pairing-driven

• Consider each measurement-feature pairing in turn

2

Page 89: 3. The Data Association Problem - webdiis.unizar.es

89 62623 SLAM, J. Neira

Results – Resolution: 1.5m for x and y, and 1º for theta

Page 90: 3. The Data Association Problem - webdiis.unizar.es

90 62623 SLAM, J. Neira

• How do they compare?

• Pair_driven is better in proportion to the density of features in the environment.

• Victoria Park: 18321 sq. m.,sample every 1.5m, expect pair_driven to be 82 faster.

Page 91: 3. The Data Association Problem - webdiis.unizar.es

91 62623 SLAM, J. Neira

Conclusions

• Data association in SLAM: algorithms based on some form of consensus provide the best results

» Joint Compatibility » RANSAC » Hough Transform