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

EKF problems with odom [closed]

asked 2014-08-04 11:02:11 -0500

updated 2014-08-05 09:39:56 -0500

I am using robot_pose_ekf and my sensors are an IMU a GPS and some encoders on the wheels (odom)

My odom is really bad because of gliding. It accumulates error and it becomes higher in every movement. The problem is that the GPS is not accurate enough for robot pose estimation. Because of that I need the odom. When I introduce the odom in the EKF the results are a unacceptable.

I thought that the EKF had parameters to configure how important a sensor should be in the estimation process (to be able to introduce the odom but with low importance) but I couldn't find anything.

If you can help me I would appreciate it.

My /odom has always the same covariance

covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1]
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by arenillas
close date 2014-08-28 09:50:30.270330

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-04 13:44:35 -0500

Tom Moore gravatar image

updated 2014-08-05 09:52:04 -0500

What do you mean by unacceptable? Kalman filter-based techniques (such as robot_pose_ekf or robot_localization) are going to use the measurement's covariance matrix to determine "how much" of that measurement to trust. Ideally, your wheel encoder odometry error (covariance) should grow with time.

EDIT in response to author's edit: those covariance values are really small. The values on the diagonal imply that all of your variables have an error of 0.1. If your GPS has an error of 5 meters, then any EKF is going to more heavily weight the odometry measurement.

Then again, I believe robot_pose_ekf (and robot_localization, when properly configured) is not fusing the absolute odometry measurement, but rather the difference between it and the last measurement. This allows you to fuse multiple sources of odometry without them getting out of sync. How it manages the covariances in that case is beyond me.

In any case, you have two options:

  1. Modify the covariances coming out of your robot driver to be larger and static (not recommended, but will help your problem)
  2. Modify the covariances coming out of your driver so that they are functions of distance traveled and/or rotated, with some initial non-zero value. In other words, initialize the covariance matrix as it is now, but then for ever N meters traveled, your position covariance values should grow by some percentage, say 5%. So if you traveled 1 meter in the X direction, you'd want an error of 0.05 meters in X (the 0, 0 value in your covariance matrix). After 2 meters of travel in X, you'd want the 0, 0 value to be 0.1, and so on. You'd want the rotations to behave similarly.
edit flag offensive delete link more


I used robot_localization and get bad results. If you want, I can send you some graphics of the error using GPS and odom and only using GPS.

arenillas gravatar image arenillas  ( 2014-08-05 07:02:13 -0500 )edit

Please do! Feel free to send me bag files, errors, etc. Once we sort out your issues, we can post the answer here for everyone.

Tom Moore gravatar image Tom Moore  ( 2014-08-05 08:21:54 -0500 )edit

Are you sending covariance values with your sensor inputs? Specifically Odom.

l0g1x gravatar image l0g1x  ( 2014-08-05 08:33:10 -0500 )edit

Tom, would you by change know of any dynamic covariance example methods for odometry? This would help me out as well since I pretty much have same problem as the author. Thanks

l0g1x gravatar image l0g1x  ( 2014-08-05 09:56:42 -0500 )edit

I think that deserves its own question, actually. Post it and I'll respond to it later today.

Tom Moore gravatar image Tom Moore  ( 2014-08-05 10:46:06 -0500 )edit

Question Tools

1 follower


Asked: 2014-08-04 11:02:11 -0500

Seen: 1,394 times

Last updated: Aug 05 '14