0
$\begingroup$

The control.yaml file inside the husky_gazebo package defines the value of the pose_covariance_diagonal parameter as [0.001, 0.001, 0.001, 0.001, 0.001, 0.03].

A pose is made up of 7 elements - [x, y, z,q_x, q_y, q_z, q_w]. So, shouldn't the number of elements in the pose_covariance_diagonal parameter be 7?

$\endgroup$

2 Answers 2

3
$\begingroup$

The quaternion part [q_x, q_y, q_z, q_w] has four numbers but is a representation of 3D orientation, which has 3 degrees of freedom. Another common representation for orientation is the matrix Lie group $\mathrm{SO}(3)$, which is the group of $3\times 3$ rotation matrices (9 numbers, but only 3 degrees of freedom). Neither the quaternion nor the rotation matrix are minimal representations (i.e., they take more numbers than the degrees of freedom), but they do not suffer the issues associated with, e.g., Euler angles (gimbal lock, ambiguity, etc.).

So, there are only 6 uncertainty values in pose_covariance_diagonal because there are only 6 degrees of freedom in a 3D pose (i.e., the matrix Lie group $\mathrm{SE}(3)$). These are uncertainties for each translation axis, and each rotation axis. See the PoseWithCovariance msg docs for more info.

$\endgroup$
1
  • $\begingroup$ Makes sense. Thanks :-) $\endgroup$
    – skpro19
    Aug 12, 2021 at 15:50
1
$\begingroup$

Adding to Parker's answer, the quaternion is avoided many cases due to its complexity in getting a closed-form Jacobian. Also, it unnecessarily increases the number of optimization states. Due to these problems rotation vector (3x1) is usually preferred and that's why you see it as 3x1. Note that the rotation vector is different from Euler angles and does not have the gimbal lock and ambiguity problem.

Also, in terms of rotation uncertainty representation, the rotation vector is more intuitive than quaternion.

See "state estimation book" by Tim Barfoot for more information.

$\endgroup$
1
  • $\begingroup$ Thanks for your answer. $\endgroup$
    – skpro19
    Aug 12, 2021 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.