🤖

SLAM

Introduction

Simultaneous Localization and Mapping is exactly what it sounds like. Consider a mobile robot moving through some 2D or 3D environment. It takes relative measurements of its location relative to its sensor data. The issue the robot faces is that it does not have access to its map nor its location, but it would like to simultaneously construct a map of its environment and localize itself within that map.

Definition

Given the dynamics xt+1=f(xt,ut,wt)mt+1=mtyt:={yt1,,ytN}yti=g(xt,mti,vt) \begin{align*} x_{t+1}&=f(x_{t},u_{t},w_{t})\\ m_{t+1}&=m_{t} \\ \mathbf{y}_{t}:&=\{ y_{t}^{1},\dots,y_{t}^{N} \} \\ y^{i}_{t}&=g(x_{t},m^{i}_{t},v_{t})\\ \end{align*}where xt+1x_{t+1} is our state at time t+1t+1, mt+1m_{t+1} is our map at time t+1t+1, and yt\mathbf{y}_{t} is our set of observations at time tt and ytiy_{t}^{i} is our observation of the ithi^{th} element in our map at time tt. Mathematically, we can model our robot as a POMDP so we consider a 6 tuple: (S,U,Z,T,Q,c)(\mathbb{S},\mathbb{U},\mathbb{Z}, \mathcal{T},\mathcal{Q},c) where

  • S:=X×M\mathbb{S}:=\mathbb{X}\times \mathbb{M} is the joint state space where X\mathbb{X} is the Pose of the robot and M\mathbb{M} is the space of landmarks.

  • U\mathbb{U} is the action space.

  • Y\mathbb{Y} is the observation space. This represents our sensor measurements.

  • T:X×U[0,1]\mathcal{T}:\mathbb{X}\times \mathbb{U}\to [0,1] is the transition kernel i.e. T(Axt,ut)=P(xt+1Axt,ut)xt,xt+1,AX,utU\begin{align*} \mathcal{T}(A\mid x_{t},u_{t})&=P(x_{t+1}\in A\mid x_{t},u_{t})\quad&x_{t},x_{t+1},A\in\mathbb{X}, u_{t}\in\mathbb{U} \end{align*}also referred to as the motion model.

  • Q:S[0,1]Q:\mathbb{S}\to [0,1] is the conditional likelihood of the observation i.e. Q(Ast)=P(ytAst)=P(ytAxt,mt)stS,xtX,mtM,yt,AY\begin{align*} Q(A\mid s_{t})=P(y_{t}\in A\mid s_{t})=P(y_{t}\in A\mid x_{t}, m_{t})\quad s_{t}\in\mathbb{S},x_{t}\in\mathbb{X},m_{t}\in\mathbb{M},y_{t},A\in\mathbb{Y} \end{align*}

  • c:S×URc:\mathbb{S}\times \mathbb{U}\to \mathbb{R} is the cost function.


    We can reduce this into a Belief MDP (P(S),U,η,c~)(\mathcal{P}(\mathbb{S}),\mathbb{U},\eta,\tilde{c}) where Let us look at constructing the filter process: πt(st):=P(sty[0,t],u[0,t1])=P(st,yt,ut1y[0,t1],u[0,t2])P(yt,ut1y[0,t1],u[0,t2])=P(st,yt,ut1y[0,t1],u[0,t2])SP(st,yt,ut1y[0,t1],u[0,t2])dst=SP(st,st1,yt,ut1y[0,t1],u[0,t2])dst1SSP(st,st1,yt,ut1y[0,t1],u[0,t2])dstdst1=SP(ytst)P(st,st1,ut1y[0,t1],u[0,t2])dst1SSP(ytst)P(st,st1,ut1y[0,t1],u[0,t2])dstdst1=SP(ytst)P(stst1,ut1)P(st1,ut1y[0,t1],u[0,t2])dst1SSP(ytst)P(stst1,ut1)P(st1,ut1y[0,t1],u[0,t2])dstdst1=SP(ytst)P(stst1,ut1)P(ut1y[0,t1],u[0,t2])πt1(st1)dst1SSP(ytst)P(stst1,ut1)P(ut1y[0,t1],u[0,t2])πt1(st1)dstdst1=SP(ytst)P(stst1,ut1)πt1(st1)dst1SSP(ytst)P(stst1,ut1)πt1(st1)dstdst1=X×MP(ytst)P(xtxt1,ut1)P(mtmt1)πt1(xt1,mt1)d(xt1×mt1)X×MSP(ytst)P(xtxt1,ut1)P(mtmt1)πt1(st1)dstdst1\begin{align*} \pi_{t}(s_{t}):&=P(s_{t}\mid y_{[0,t]}, u_{[0,t-1]})\\ &=\frac{P(s_{t},y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]})}{P(y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]})}\\\\ &=\frac{P(s_{t},y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]})}{\int\limits _{\mathbb{S}}P(s_{t},y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t} }\\\\ &=\frac{\int\limits _{\mathbb{S}}P(s_{t},s_{t-1},y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t-1} }{\int\limits _{\mathbb{S}}\int\limits _{\mathbb{S}}P(s_{t},s_{t-1},y_{t},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t} \, ds_{t-1} }\\\\ &=\frac{\int\limits _{\mathbb{S}} P(y_{t}\mid s_{t})P(s_{t},s_{t-1},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t-1} }{\int\limits _{\mathbb{S}}\int\limits _{\mathbb{S}}P(y_{t}\mid s_{t})P(s_{t},s_{t-1},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t} \, ds_{t-1} }\\ \\ &=\frac{\int\limits _{\mathbb{S}} P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})P(s_{t-1},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t-1} }{\int\limits _{\mathbb{S}}\int\limits _{\mathbb{S}}P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})P(s_{t-1},u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]}) \, ds_{t} \, ds_{t-1} }\\ \\ &=\frac{\int\limits _{\mathbb{S}} P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})P(u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]})\pi_{t-1}(s_{t-1}) \, ds_{t-1} }{\int\limits _{\mathbb{S}}\int\limits _{\mathbb{S}}P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})P(u_{t-1}\mid y_{[0,t-1]}, u_{[0,t-2]})\pi_{t-1}(s_{t-1}) \, ds_{t} \, ds_{t-1} }\\ \\ &=\frac{\int\limits _{\mathbb{S}} P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})\pi_{t-1}(s_{t-1}) \, ds_{t-1} }{\int\limits _{\mathbb{S}}\int\limits _{\mathbb{S}}P(y_{t}\mid s_{t})P(s_{t}\mid s_{t-1},u_{t-1})\pi_{t-1}(s_{t-1}) \, ds_{t} \, ds_{t-1} }\\ \\ &=\frac{\int\limits _{\mathbb{X}\times \mathbb{M}} P(y_{t}\mid s_{t})P(x_{t}\mid x_{t-1},u_{t-1})P(m_{t}\mid m_{t-1})\pi_{t-1}(x_{t-1},m_{t-1}) \, d(x_{t-1}\times m_{t-1}) }{\int\limits _{\mathbb{X}\times \mathbb{M}}\int\limits _{\mathbb{S}} P(y_{t}\mid s_{t})P(x_{t}\mid x_{t-1},u_{t-1})P(m_{t}\mid m_{t-1})\pi_{t-1}(s_{t-1}) \, ds_{t} \, ds_{t-1} }\\ \\ \end{align*}