ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Thanks for the detailed overview. I wish to work in real life situation and i know that my sensor updates the data at 0.25s and it has an uncertainty of +-0.3m. Choosing a value and working with robot_localization, i want to see how much this uncertainty grows with time.. Two things that are still confusing me. Is 0.3 is right value for this situation? 2, i will provide the initial value only, manually, then robot_localization calculate /predict the future values? or how will it behave?

OK, so the per-measurement uncertainty of 0.3 m should be encoded in your covariance matrix. The difficulty is in interpreting what "+/- 0.3m" means. Does that represent one standard deviation, or more? I'd suggest over-estimating the error in general, as probabilistic approaches seem to be more robust to over-reporting error than under-reporting. Also, is it 0.3 meters in the position estimate, or 0.3 meters in both X and Y?

If we assume it's overall position error and it's one standard deviation, and we assume equal error in X and Y, then you might do

x_error^2 + y_error^2 = 0.3^2
2 * x_error^2 = 0.09
x_error = 0.212132034355964

But that would be standard deviation. You want variance, so you have to square again that to get 0.045. That value should go in the XX and YY entries in you covariance matrix (0th and 7th index of the covariance vector in the message.

I didn't think about this too deeply, so there may be a better way to interpret that data, but it's a start.

Between position measurements, the EKF will predict where you are, and then correct that prediction with your measurement. However, I hope you have something measuring yaw or yaw velocity, or your state estimate will get very ugly very quickly.