Wheel Odometry Twist Covariance

Hello, I am using the UKF node in robot_localization for fusing all my sensor data with the following setup for my differential drive robot: 1. IMU (r, p, y, vroll, vpitch, vyaw, ax, ay, az) 2. Wheel Encoders (vx, vyaw)

I have two doubts: 1. How do I calculate the covarience for the twist which I am getting from my wheel encoders? 2. Should I even fuse the angular velocity from my wheel encoders since the IMU I am using is very accurate (It's a VectorNav VN-300) and provides angular velocity?

During testing, I found that the encoders were also quite accurate but due to slipping and other factors, there were some drifts.

edit retag close merge delete

Sort by » oldest newest most voted

1) The covariance part in geometry_msgs/TwistWithCovariance is a 6x6 matrix. So it is an array of 36 elements. You can fill only the diagonal elements with the values of cov(linear.x,linear.x), cov(linear.y,linear.y), cov(linear.z, linear.z), cov(angular.roll, angular.roll), cov(angular.pith,angular.pitch) and cov(angular.yaw,angular.yaw) respectively. Note that cov(x,x) = variance(x) i.e. covaiance of variable with itself is the variance of the variable. And standard deviation = sqrt(variance). Consider u in the graph as your true value. The value in your Twist message has some error associated with it. If you set the s.d. for linear.x as 1 (cov(linear.x, linear.x) = 1^2 = 1), it means if you take 100 measurements of linear.x, 68.3% will lie between [truevalue-1, truevalue+1] i.e. [u-s.d. , u + s.d.]

2) You can fuse it but you need to find the proper covariance. Else don't fuse it.

more