# Extended Kalman Filter using odometry motion model

In the prediction step of EKF localization, linearization must be performed and (as mentioned in Probabilistic Robotics [THRUN,BURGARD,FOX] page 206) the Jacobian matrix when using velocity motion model, defined as

$\begin{bmatrix} x \\ y \\ \theta \end{bmatrix}' = \begin{bmatrix} x \\ y \\ \theta \end{bmatrix} + \begin{bmatrix} \frac{\hat{v}_t}{\hat{\omega}_t}(-\text{sin}\theta + \text{sin}(\theta + \hat{\omega}_t{\Delta}t)) \\ \frac{\hat{v}_t}{\hat{\omega}_t}(\text{cos}\theta - \text{cos}(\theta + \hat{\omega}_t{\Delta}t)) \\ \hat{\omega}_t{\Delta}t \end{bmatrix}$

is calculated as

$G_{T}= \begin{bmatrix} 1 & 0 & \frac{υ_{t}}{ω_{t}}(-cos {μ_{t-1,θ}} + cos(μ_{t-1,θ}+ω_{t}Δ{t})) \\ 0 & 1 & \frac{υ_{t}}{ω_{t}}(-sin {μ_{t-1,θ}} + sin(μ_{t-1,θ}+ω_{t}Δ{t})) \\ 0 & 0 & 1 \end{bmatrix}$.

Does the same apply when using the odometry motion model (described in the same book, page 133), where robot motion is approximated by a rotation $\hat{\delta}_{rot1}$, a translation $\hat{\delta}$ and a second rotation $\hat{\delta}_{rot2}$ ? The corresponding equations are:

$\begin{bmatrix} x \\ y \\ \theta \end{bmatrix}' = \begin{bmatrix} x \\ y \\ \theta \end{bmatrix} + \begin{bmatrix} \hat{\delta}\text{cos}(\theta + \hat{\delta}_{rot1}) \\ \hat{\delta}\text{sin}(\theta + \hat{\delta}_{rot1}) \\ \hat{\delta}_{rot1} + \hat{\delta}_{rot2} \end{bmatrix}$.

In which case the Jacobian is

$G_{T}= \begin{bmatrix} 1 & 0 & -\hat{\delta} sin(θ + \hat{\delta}_{rot1}) \\ 0 & 1 & -\hat{\delta} cos(θ + \hat{\delta}_{rot1}) \\ 0 & 0 & 1 \end{bmatrix}$.

Is it a good practise to use odometry motion model instead of velocity for mobile robot localization?

• I believe that your d_y / d_theta term should be positive rather than negative (i.e. should be +\hat{\delta} cos(θ + \hat{\delta}_{rot1})) – rcv May 20 '15 at 17:55

You have asked two questions. As I interpret them they are:

1. Is it necessary to linearize the odometry motion model for use with an extended Kalman filter (EKF)?
2. Is it better to use the odometry motion model instead of the velocity motion model.

Regarding question 1, the short answer is "yes." The guarantees of the Kalman filter (KF) only apply to linear systems. We linearize a non-linear system in hopes of retaining some of those guarantees for non-linear systems. In fact linearizing the non-linear components of a system (i.e. the motion model and/or the observation model) is the very thing that differentiates KFs and EFKs.

Regarding question 2, Dr. Thrun argues on page 132 of Probabilistic Robotics that "[p]ractical experience suggests that odometry, while still erroneous, is usually more accurate than velocity." However I would not interpret this statement as an argument for supplanting the velocity model. If you have both velocity and odometric information then it is generally better to use both sources of information.

In my experience, the answer to your last question is "yes." I've had much more luck using odometry instead of dynamic (velocity) prediction. However, I've never used the motion model you describe (from Thrun's book). Instead, I've used the model I described here.

• In the book, the model is treated as a kinematic problem, so I think it is a good model for simulation problem. – CroCo May 13 '14 at 16:27

To your first question: "Does the same apply when using the odometry motion model?", the answer is Yes.

The the EKF is pretty much the same thing as the KF, with the addition of the linearization step. What you are linearizing here is the motion model, whatever model that is.

For your second question: "Is it a good practise to use odometry motion model instead of velocity for mobile robot localization?": I think the answer is 'it depends.'

If you are using a data set that has velocity information and the localization is good enough for your purposes, then the simplicity of that model is probably preferred. If you are directly controlling the robot and have access to the odometry information, then you're likely to get a better result.