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

Wheel Odometry Twist Covariance

asked 2019-04-27 04:21:38 -0600

shrijitsingh99 gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-14 00:05:14 -0600

Veera Ragav gravatar image

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).Normal Distribution

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.

edit flag offensive delete link more

Question Tools



Asked: 2019-04-27 04:21:38 -0600

Seen: 1,415 times

Last updated: May 14 '19