Ask Your Question
4

Covariance matrix for the PoseWithCovariance in Odometry.msg

asked 2012-06-19 14:36:10 -0600

billmania gravatar image

To disclaim, I do not have a solid understanding of covariance matrices. I'm also still using electric.

The Odometry.msg includes a geometry_msgs/PoseWithCovariance, which itself includes a geometry_msgs/Pose and a 6x6 covariance matrix. If the Point has three variables and the Quaternion has four variables, why isn't the covariance matrix 7x7?

Also, are the comments in the PoseWithCovariance.msg file inaccurate when they refer to the roll, pitch and yaw instead of to a quaternion?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-06-19 15:36:35 -0600

Eric Perko gravatar image

The reason the covariance is 6x6 and not 7x7 even though the quaternion has four variables is because the covariance is specified for the 3 angles that the quaternion represents, roll, pitch and yaw, not the individual components of the quaternion. That is the reason that the comments refer to roll, pitch and yaw instead of the quaternion components. If you wanted to apply those error estimates to the quaternion, you would have to either do some error propogation to get estimates for the quaternion components or (more commonly) extract the roll, pitch and yaw angles from the quaternion.

Usually we have estimates for each of those angles individually (along with their covariance) and then generate a quaternion from the three angles in order to have an unambiguous representation of the rotation. By keeping the covariance relative to roll, pitch and yaw instead of quaternion components, there is no need to do any complicated error propogation through the math that creates a quaternion from RPY.

See http://answers.ros.org/question/9446/how-do-i-compute-the-covariance-matrix-for-an/ for some discussion of how to compute the covariance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-06-19 14:36:10 -0600

Seen: 4,176 times

Last updated: Jun 19 '12