# How to calculate covariance of visual odometry and Imu data I have a visual odometry source which is derived from Kinect using Fovis with Imu data coming from Arduino. I combined the two sources using robot_pose_ekf. Now when I view the data in Rviz according to the odom_combined frame I see significant changes when I change the values of covariances in the two data sources. The changes which are seen are that when covariance values are changed the tf computed between odom_combined and base_footprint vary significantly in terms of drift over particular time.

So how can I calculate the values of covariances or just the variances along the diagonal to get sufficient accuracy in the odom_combined frame.?

edit retag close merge delete

Sort by » oldest newest most voted Usually you estimate the covariance matrix based on the accuracy of your sensors. If you have reliable sensors, then your covariance should be smaller. You can do this by trial and error, for example, you could drive your robot 10 meters in a straight line (open loop control), then measure the error (between where the robot thinks it is, and where it actually is in real life), the actual position of the robot should be within the covariance ellipse which is centered around the robot's estimated position. You want your covariance to be as realistic as possible, so if you have a really large covariance matrix, then obviously the the true position of the robot will fall within the bound, but this is not good because it can cause data association failure if you implement a SLAM algorithm.

more

So according to that i should do the open loop test for both the sensors which are the IMU and Kinect's odometry first and then use these calculated covariances as the input to robot_pose_ekf package..?

I have not used the robot_pose_ekf package yet, how many covariance matrices does it ask you? One for each sensor? Usually the fused estimate should have 1 covariance matrix. So you should have 1 covariance matrix for your fused estimate (based on the two sensors).

There are two covariance matrices given to robot_pose_ekf in my case, one being for IMU data and one for Kinect. Robot_pose_ekf fuses the two and gives me back a pose with covariance using Extended Kalman Filter. So i would estimate the covariance by your method and post back the results..

2

Yes then you do the test and find each covariance matrix separately, and then the resulting 2 covariance matrices would be the input to your robot_pose_ekf in order to fuse them.

Did you try this method? Any suggestion for a reasonable value for kinect odometry?

robot_pose_ekf is not quite what you expect it to be. It was developed for a specific purpose on the pr2 robot.

more