35
Simultaneous Localization And Mapping Kosta Grujˇ ci´ c mart 2019. Matematiˇ cki fakultet 1

Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Simultaneous Localization And Mapping

Kosta Grujcic

mart 2019.

Matematicki fakultet

1

Page 2: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Uvod

Page 3: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Sta je SLAM?

• Odre�ivanje okruzenja – mapiranje

• Odre�ivanje pozicije agenta – lokalizacija

• Istovremeno

2

Page 4: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Sta je SLAM?

• Odre�ivanje okruzenja – mapiranje

• Odre�ivanje pozicije agenta – lokalizacija

• Istovremeno

2

Page 5: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Formalna postavka

• ot – opservacije u trenutku t

• ct – radnja koju agent preduzima u trenutku t

• xt – pozicija agenta u trenutku t

• Treba izracunati:

• p(xt , | x0:t−1, o1:t−1, c1:t)

• p(ot | x0:t , o1:t−1, c1:t)

3

Page 6: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Zasto je tesko?

• Ne znamo da odredimo raspodele

• Neizbezan sum prlikom opazanja

• Opservacije su neprecizne na duze staze – aditivni drift

4

Page 7: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Bajesov filter

Page 8: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

• Uvodi Markovljevo svojstvo

• p(xt , | x0:t−1, o1:t−1, c1:t) = p(xt | xt−1, ct)

• p(ot | x0:t , o1:t−1, c1:t) = p(ot | xt)

• Agent poseduje kvazi znanje o modelu – verovanje

• bel(xt) = p(xt | o1:t , c1:t)

• bel(xt) = p(xt | o1:t−1, c1:t)

• Matematicka formulacija Bajesovog filtera je

bel(xt) =

∫p(xt | ct , xt−1)bel(xt−1)dxt−1

bel(xt) = ηp(ot | xt)bel(xt−1)

5

Page 9: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

• Uvodi Markovljevo svojstvo

• p(xt , | x0:t−1, o1:t−1, c1:t) = p(xt | xt−1, ct)

• p(ot | x0:t , o1:t−1, c1:t) = p(ot | xt)

• Agent poseduje kvazi znanje o modelu – verovanje

• bel(xt) = p(xt | o1:t , c1:t)

• bel(xt) = p(xt | o1:t−1, c1:t)

• Matematicka formulacija Bajesovog filtera je

bel(xt) =

∫p(xt | ct , xt−1)bel(xt−1)dxt−1

bel(xt) = ηp(ot | xt)bel(xt−1)

5

Page 10: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

• Uvodi Markovljevo svojstvo

• p(xt , | x0:t−1, o1:t−1, c1:t) = p(xt | xt−1, ct)

• p(ot | x0:t , o1:t−1, c1:t) = p(ot | xt)

• Agent poseduje kvazi znanje o modelu – verovanje

• bel(xt) = p(xt | o1:t , c1:t)

• bel(xt) = p(xt | o1:t−1, c1:t)

• Matematicka formulacija Bajesovog filtera je

bel(xt) =

∫p(xt | ct , xt−1)bel(xt−1)dxt−1

bel(xt) = ηp(ot | xt)bel(xt−1)

5

Page 11: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Kalmanov filter

Page 12: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

• Pretpostavlja da je model linearan

• Pretpostavlja da je sum normalne raspodele

• Optimalan linearan filter

• Rekurzivan postupak

• procena i azuriranje

• za svaki korak je neophodan samo prethodni

6

Page 13: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Linearnost modela

• xt = Atxt−1 + Btct + εt

• ot = Ctxt + δt

• At – matrica ekskluzivne veze trenutne i prethodne pozicije

• Bt – matrica ekskluzivne veze trenutne pozicije i radnje

• Ct – matrica veze trenutne pozicije i opservacije

• εt , δt – trenutni sum kretanja i opservacija redom

• εt ∼ N (0,Et)

• δt ∼ N (0,Dt)

7

Page 14: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

KalmanFilter(µt−1, Σt−1, ct, ot)

1. µt = Atµt−1 + Btct

2. Σ = AtΣt−1ATt + Et

3. Kt = ΣtCTt (CtΣtC

Tt + Dt)

−1 // prirastaj

4. µt = µt + Kt(ot − Ctµt)

5. Σt = (I − KtCt)Σt

6. return µt ,Σt

8

Page 15: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Nelinearan model – EKF

• xt = f (xt−1, ct) + εt

• ot = h(xt) + δt

• At = ∂f∂x

∣∣xt−1,ct

• Ct = ∂h∂x

∣∣xt

• Zahteva vise izracunavanja

• Nije robustan

9

Page 16: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Neuronski pristup

Page 17: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

State of the art

• feature-based (ORB-SLAM) vs. direct methods (LSD-SLAM)

• upitna robusnost

• izrazena parametrizacija

10

Page 18: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Neural Graph Optimizer (NGO)

• diferencijabilan

• robustan

• smanjuje aditivni drift

• Front-end je FlowNet

• Back-end je Transformer

11

Page 19: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Metod

• Mreza lokalne procene

• upareni frejmovi lokalna procena pozicije

• CNN + FC

• NGO

• lokalna procena pozicije globalna procena pozicije

• soft-attention + optimization (TCN)

12

Page 20: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Model

local pose estimation i global pose estimation

13

Page 21: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Front-end

FlowNet varijanta

14

Page 22: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Attention

• Za dati embedding niz F(i−1) = (f(i−1)

1 , ..., f(i−1)T ) se racuna

odgovarajuci query niz (q(i−1)1 , ..., q

(i−1)T ) koristeci FCL

• Attention vektor a(i−1)t se racuna:

Ctu = 〈qt , fu〉

αtu =Ctu∑Tv=1

at =T∑

v=1

αtu � fu

15

Page 23: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Optimization

• Vrsi se konkatenacija attention vektora i embedding vektora i

ubacuje u TCN: F(i)

∇P(i)

β(i)

= σL

(hL

(...h1

([f

(i−1)1

a(i−1)1

]...

[f

(i−1)T

a(i−1)T

])...

))

gde je ∇P(i) = (∇p(i)1 , ...,∇p

(i)T )

• Vrsi se dodatno ufinjavanje:

∆p(i)j = ∆p

(i−1)j + βij∇p

(i)j

16

Page 24: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Temporalne konvolutivne mreze

Page 25: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Dilataciona konvolucija

• (F ∗l k)(p) =∑

s+lt=p F (s)k(t)

• za l = 1 postaje obicna konvolucija

• Fi+1 = Fi ∗2i ki za i = 0, 1, ..., n − 2

• receptivno polje od Fi je (2i+1 − 1)× (2i+1 − 1)

F1, F2 i F3 redom

17

Page 26: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Model

Kauzalni temporalno-konvolutivni sloj

18

Page 27: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

TCN vs. RNN

• Seq. MNSIT (99.0 vs. 96.2)↑

• Adding problem (97.2 vs. 87.3)↑

• Copy memory (3.5−5 vs. 0.0197)↓

• World-level PTB (88.68 vs. 78.93)↓

• Char-level PTB (1.31 vs. 1.36)↓

• ...

19

Page 28: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Rezultati – 2D

Primer 2D lavirinta (Box2D) i trajektorija agenta

20

Page 29: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Metrika – RMSE po poziciji

Model Test

Att-Opt × 0 17.8

Att-Opt × 1 10.21

Att-Opt × 5 3.16

21

Page 30: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Rezultati – 3D

Primer 3D lavirinta (ViZDoom) i trajektorija agenta

22

Page 31: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Metrika – % trans. i root.

Model Trening%Err .trans. %Err .rot.

Test

Att-Opt × 0 1.65 0.117 1.62 0.122

Att-Opt × 1 1.42 0.071 1.16 0.071

Att-Opt × 5 1.25 0.057 1.04 0.056

DeepVO 1.78 0.079 2.39 0.091

23

Page 32: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Analiza

24

Page 33: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Dalji rad1

•”For many applications and environments, numerous major

challenges and important questions remain open. To achieve

truly robust perception and navigation for long-lived

autonomous robots, more research in SLAM is needed.”

•”In some applications, such as self-driving cars, precision

localization is often performed by matching current sensor

data to a high definition map of the environment that is

created in advance.”

•”One may even devise examples in which SLAM is unnecessary

altogether and can be replaced by other techniques.”

1http://rpg.ifi.uzh.ch/docs/TRO16 cadena.pdf

25

Page 34: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

Reference

Page 35: Simultaneous Localization And Mappingmachinelearning.math.rs/Grujcic-SLAM.pdfDalji rad1 For many applications and environments, numerous major challenges and important questions remain

• C. Cadena et al.: Past, present and future of SLAM:

Toward the robust-perception age

• E. Parisotto et al.: Global pose estimation with an

attention-based recurrent network

• A. Dosovitskiy et al.: Flownet: Learning optical flow with

convolutional networks

• R. Kummerle et al.: g2o: A general framework for graph

optimization

• A. I. Mourikis and S. I. Roumeliotis: A multi-scale constraint

Kalman filter for vision-aided inertial navigation

• R. Mur-Artal et al.: ORB-SLAM: A versatile and accurate

monocular SLAM system

• A. Vaswani et al.: Attention is all you need

26