ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

robot_pose_ekf, sensor priority

asked 2013-05-21 06:09:40 -0600

el_lobo gravatar image


I am using robot_pose_ekf for fusing data from encoder and IMU. I was wondering, where at the code I can find the section of actual fusing of data, and if someone is familiar with the process, could you please describe it here how does it happen?

Also, is there a way to specify priority of data source for fusion process? For example, I want to trust more to IMU data then to encoders?

Best regards.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-21 10:18:04 -0600

mjcarroll gravatar image

robot_pose_ekf will fuse the data in a probabilistic manner by using the covariances specified on the incoming topics.

The simplest way to "weight" the data is to adjust make the entries in the covariance matrix larger.

edit flag offensive delete link more


Thank you for the answer. However, I do not understand how practically to do so. Here is my assumption, if for example I want to use IMU: float weight = 1.2; imu_covariance_(i+1, j+1) =weight * ( imu->orientation_covariance[3*i+j]); Would this be the best way to do this?

el_lobo gravatar image el_lobo  ( 2013-05-22 00:04:38 -0600 )edit

In the past, I have just adjusted the (4,4), (5,5), and (6,6) entries in the covariance matrix for the IMU before passing them to robot_pose_ekf. For instance, if the entries are 0.01 from the driver, adjust them up to 0.1 or 1.0 to make them less important to the EKF.

mjcarroll gravatar image mjcarroll  ( 2013-05-22 03:43:58 -0600 )edit

Hmm, it seems to me that imu_covariance as well as orientation_covariance are 3x3 matrices. Can you please explain (4,4), (5,5), and (6,6) entries ?

el_lobo gravatar image el_lobo  ( 2013-05-22 04:35:52 -0600 )edit

Apologies, I was thinking of the Odometry message (which contains a geometry_msgs/PoseWithCovariance, 36 entry array). You are correct, you should be adjusting the orientation_covariance matrix.

mjcarroll gravatar image mjcarroll  ( 2013-05-23 05:47:00 -0600 )edit

Thank you a lot. This really made my start with this node much easier. I would just like to clarify: Way to adjust covariances is this: imu_covariance_(i+1, j+1) =weight * ( imu->orientation_covariance[3*i+j]); ?

el_lobo gravatar image el_lobo  ( 2013-05-23 21:06:36 -0600 )edit

P.S Also, do you perhaps know is multiplying the odom and imu covariances with same number equivalent to not multiplying them at all? This is basically the question about logic behind EKF. Are covariances, from different sources used in respect to each other, or?

el_lobo gravatar image el_lobo  ( 2013-05-23 21:08:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-05-21 06:09:40 -0600

Seen: 183 times

Last updated: May 21 '13