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

Covariance matrix for /vo and /odom

asked 2013-06-10 23:19:26 -0600

barrybear gravatar image

Hello there! I am currently trying to fuse the odometry messages from the ROSARIA and visual odometry messages from viso2_ros libraries using the robot_pose_ekf. However, I seem to always encounter an error of where the covariance matrix is zero.

I am still a beginner, and I have read a little about covariance. I would like to know how to implement the covariance or include some appropriate values into the matrix in order for the robot_pose_ekf to work succesfully..

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2013-06-11 01:37:38 -0600

jep31 gravatar image

updated 2013-06-11 01:37:56 -0600

As you can see there: the covariance is a float[36] a 6x6 matrix. diagonal terms are the trust you have in your sensor for each Dof. You have 6 Dof, position (x, y, z) and orientation (x, y, z) even if you can see the orientation in Quaternion. You can estimate your sensor or algorithm accuracy with experiment. If you see your data are good for 1cm in translation and 0.1 radian in rotation you can use this matrix:

[0.01  0.0  0.0  0.0  0.0  0.0,
 0.0  0.01  0.0  0.0  0.0  0.0,
 0.0   0.0 0.01  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]

If you have no information for one Dof you can put a huge value.

edit flag offensive delete link more


Cool.. thanks! I understand it a little better how do I implement it in the codes? Do I implement in the robot_pose_ekf library or the ROSARIA/viso2?

barrybear gravatar image barrybear  ( 2013-06-11 03:01:24 -0600 )edit

I don't know how works viso2, do it send directly a nav_msgs::Odometry of your robot without covariance ? If it does, you can write a new node which reads the topic from viso2, add the covariance and publish the whole msg to robot_pose_ekf. Avoid as much as you can modify an existing package.

jep31 gravatar image jep31  ( 2013-06-11 03:16:40 -0600 )edit

Yeah viso2 and RosAria sends out the nav_msgs::Odometry without covariance if im not wrong. Oh alright, do you happen to have any sample that I may refer to in writing that extra new node? Still a bit unclear and not farmilar with the tutorial..

barrybear gravatar image barrybear  ( 2013-06-11 03:19:38 -0600 )edit

The covariance matrix contains the variance of the vector components on its diagonal, not their standard deviation. In jep31's example, either the diagonal entries of the covariance matrix should be squared, or you have to take the variance from your data, which would have the units m² and radian².

Johannes Meyer gravatar image Johannes Meyer  ( 2013-06-11 10:12:00 -0600 )edit

Question Tools


Asked: 2013-06-10 23:19:26 -0600

Seen: 5,134 times

Last updated: Jun 11 '13