$\dot{\phi_r} $ and
$\hat{T_t} =\begin{bmatrix} \hat{x_{t}} \\hat{y_{t}} \ \hat{\theta_{t}} \end{bmatrix} = \begin{bmatrix} x_{t-1} \y_{t-1} \\theta_{t-1} \end{bmatrix} + \begin{bmatrix} (\Delta s_l+\Delta s_r)/2 \cdot cos(\theta_{t-1} + \Delta \theta/2) \(\Delta s_l+\Delta s_r)/2 \cdot sin(\theta_{t-1} + \Delta \theta/2) \ \Delta \theta \end{bmatrix}$
$\hat{T_t} =\begin{bmatrix} \hat{x_{t}} \ \hat{y_{t}} \ \hat{\theta_{t}} \end{bmatrix} = \begin{bmatrix} x_{t-1} \y_{t-1} \\theta_{t-1} \end{bmatrix} + \begin{bmatrix} (\Delta s_l+\Delta s_r)/2 \cdot cos(\theta_{t-1} + (\Delta s_r-\Delta s_l)/2b)) \(\Delta s_l+\Delta s_r)/2 \cdot sin(\theta_{t-1} + (\Delta s_r-\Delta s_l)/2b)) \(\Delta s_r-\Delta s_l)/b \end{bmatrix}$
Command: $u = \begin{bmatrix} \Delta s_l \ \Delta s_r \end{bmatrix}$
**Robot pose: ** $T_t = \begin{bmatrix} x_t \ y_t \ \theta_t\end{bmatrix}$
$\Delta s_r $ and $\Delta s_l $ : move length of right wheel and left wheel
In SLAM problem, we need to combine robot pose and map entries to single state vector, and estimate both pose and map entries at the same time. The whole state vector can be expressed as
$x_t = \begin{bmatrix} x_t & y_t & \theta_t & \alpha_t^1 & r_t^1 & \alpha_t^2 & r_t^2 & \dots & \alpha_t^m & r_t^m\end{bmatrix}^T$
there are
$F_x = \begin{bmatrix} 1 & 0 & -(\Delta s_l + \Delta s_r)/2 \cdot sin(\theta_{t-1} + (\Delta s_r-\Delta s_l)/2b) \ 0 & 1 & (\Delta s_l + \Delta s_r)/2 \cdot cos(\theta_{t-1} + (\Delta s_r-\Delta s_l)/2b) & & \large{0} \ 0 & 0 & 1 \ & & \large{0} & & \large{I} \ \end{bmatrix}$
$F_u = \begin{bmatrix} \frac{1}{2} \cdot cos(\theta_{t-1} + \Delta \theta /2) + \frac{1}{2b} \cdot \Delta s \cdot sin(\theta_{t-1} + \Delta \theta /2) & \frac{1}{2} \cdot cos(\theta_{t-1} + \Delta \theta /2) - \frac{1}{2b} \cdot \Delta s \cdot sin(\theta_{t-1} + \Delta \theta /2) \ \frac{1}{2} \cdot sin(\theta_{t-1} + \Delta \theta /2) - \frac{1}{2b} \cdot \Delta s \cdot cos(\theta_{t-1} + \Delta \theta /2) & \frac{1}{2} \cdot sin(\theta_{t-1} + \Delta \theta /2) + \frac{1}{2b} \cdot \Delta s \cdot cos(\theta_{t-1} + \Delta \theta /2) \ -\frac{1}{b} & \frac{1}{b} \ 0 & 0\ \vdots & \vdots \ 0 & 0\end{bmatrix}$ where:
where
$Q_t = \begin{bmatrix} k|\Delta s_l| & 0 \ 0 & k|\Delta s_r|\end{bmatrix}$
Given prior estimate of state, compute predicted measurement
Given One landmark, prior estimation of state, compute predicted measurement of that landmark and corresponding Jacobian:
landmark : $m^i =\begin{bmatrix} \alpha_w^i \ r_w^i \end{bmatrix}$
The landmark is expressed in world frame, but the predicted measurement is expressed in laser frame
The predicted observation
$\hat{z_t^i} = \begin{bmatrix} \hat{\alpha_t^i} \ \hat{r_t^i}\end{bmatrix}= \begin{bmatrix} \alpha_w^i - \hat{\theta_t} \ r_w^i - \hat{x_t} \cdot cos(\alpha_w^i) - \hat{y_{t}} \cdot sin(\alpha_w^i) \end{bmatrix}$
But the
First:
If
since we changed the sign of
**Second: **
If
If
the change for
$H^j = \begin{bmatrix} 0 & 0 & -1 & \dots& 0 & 0 & \dots & 1 & 0 & \dots & 0 & 0 & \dots \ -cos(\alpha_w^i) & -sin(\alpha_w^i) & 0 & \dots& 0 & 0 & \dots & \hat{x_t} \cdot sin(\alpha_w^i) - \hat{y_t} \cdot cos(\alpha_w^i) & 1 & \dots &0 & 0 & \dots\end{bmatrix}$
Notice the entries in
$H^j = \begin{bmatrix} 0 & 0 & -1 & \dots& 0 & 0 & \dots & 1 & 0 & \dots & 0 & 0 & \dots \ cos(\alpha_w^i) & sin(\alpha_w^i) & 0 & \dots& 0 & 0 & \dots & -\hat{x_t} \cdot sin(\alpha_w^i) + \hat{y_t} \cdot cos(\alpha_w^i) & -1 & \dots &0 & 0 & \dots\end{bmatrix}$
We need to associate every observed measurement
- Compute the difference between every observed measurement and every predicted measurement of landmarks
- Corrupted measurements: measurements that do not corresponding to any entries in the map. The corrupted measurements will just be abandoned.
**Innovation as difference between a observed measurement and a predicted measurement **
**Innovation Covariance **
**Mahalanobis distance **
where
$H_t = \begin{bmatrix} H_t^1 \ H_t^2 \ \cdot \ \cdot \ H_t^n\end{bmatrix}$ ,
The size of
When we encounter an unassociated observation, we add the observation as new map entry in the map.
For unassociated observation in laser frame $z_l^i = \begin{bmatrix} \alpha_l^i \ r_l^i \end{bmatrix}$
Compute the inverse transformation from laser frame to world frame.
The current posterior estimation of laser frame in world frame is $T = \begin{bmatrix} x_t \ y_t \ \theta_t \end{bmatrix}$
$T_{lw} = \begin{bmatrix} x_t^{lw} \ y_t^{lw} \ \theta_t^{lw} \end{bmatrix} = \begin{bmatrix} -cos(\theta_t) & -sin(\theta_t) & 0\ sin(\theta_t) & -cos(\theta_t) & 0 \ 0& 0& -1\end{bmatrix} \begin{bmatrix} x_t \ y_t \ \theta_t\end{bmatrix}$
The Jacobian matrix of
$J_{T} = \begin{bmatrix} -cos(\theta_t) & -sin(\theta_t) & x_t \cdot sin(\theta_t) - y_t \cdot cos(\theta_t) \ sin(\theta_t) & -cos(\theta_t) & x_t \cdot cos(\theta_t) + y_t \cdot sin(\theta_t) \ 0& 0& -1\end{bmatrix}$
The covariance matrix of
where
Corresponding new map entry
$z_t^i = \begin{bmatrix} \alpha_l^i \ r_l^i \end{bmatrix} $
$m_i = \begin{bmatrix} \alpha_w^i \ r_w^i \end{bmatrix} = \begin{bmatrix} \alpha_l^i -\theta_t^{lw} \ r_l^i - x_t^{lw} \cdot cos(\alpha_l^i) - y_t^{lw} \cdot sin(\alpha_l^i)\end{bmatrix}$
or:
$m_i = \begin{bmatrix} \alpha_w^i \ r_w^i \end{bmatrix} = \begin{bmatrix} \alpha_l^i -\theta_t^{lw} \ -r_l^i + x_t^{lw} \cdot cos(\alpha_l^i) + y_t^{lw} \cdot sin(\alpha_l^i)\end{bmatrix}$
First we need to calculate the Jacobian matrix of
$J_{z} = \begin{bmatrix} 1 & 0 \ x_t^{lw} \cdot sin(\alpha_l^i) - y_t^{lw} \cdot cos(\alpha_l^i) & 1\end{bmatrix}$
$J_{z} = \begin{bmatrix} 1 & 0 \ -x_t^{lw} \cdot sin(\alpha_l^i) + y_t^{lw} \cdot cos(\alpha_l^i) & -1\end{bmatrix}$
We also need to calculate the Jacobian matrix of
$J_{T_{lw}} = \begin{bmatrix} 0 & 0 & -1 \ -cos(\alpha_i^i) & -sin(\alpha_l^i) & 0\end{bmatrix}$
$J_{T_{lw}} = \begin{bmatrix} 0 & 0 & -1 \ cos(\alpha_i^i) & sin(\alpha_l^i) & 0\end{bmatrix}$
Then we can calculate covariance matrix of map entry in world frame as follow: