Ask Your Question

Revision history [back]

Have a look at this to see if it answers your question:

https://answers.ros.org/question/221837/robot_localization-ekf-internal-motion-model/

Have a look at this to see if it answers your question:question: #q221837.

https://answers.ros.org/question/221837/robot_localization-ekf-internal-motion-model/

Have a look at this to see if it answers your question: #q221837.

EDIT in response to comment:

When I used the package, I didn't include any information about the velocities or the accelerations. so in this case how does the model uses them?

The acceleration, velocity, and pose variables are all correlated through the state transition function and its Jacobian. Looking at the prediction equations in the Wikipedia article, you can see that the covariance P is a function of the transfer function Jacobian. The Kalman Gain is a function of P, and so when we update the state estimate, the correlation between, e.g., X and X velocity is preserved, such that if you only measure X, you will get non-zero X velocity when you apply the gain.

So, when the next prediction happens, your state has X velocity, and the EKF uses that in its state transition function.

If you want to get a better understanding, I find it's best to analyze the matrices using debug mode. I almost never recommend using debug mode for users, but in this case, I think it might be helpful. Just note that the debug output file will grow at an alarming rate. I'd set up the EKF to fuse only pose data, and then watch the prediction and correction output to see how the various matrices affect the output.