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

Revision history [back]

click to hide/show revision 1
initial version

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.