-
Notifications
You must be signed in to change notification settings - Fork 0
Description
In https://github.com/coincar-sim/util_eigen_geometry/blob/release/src/util_eigen_geometry.cpp#L221,
the calculation of the 2D rotation matrix is done by using the (2,2) sized top left block of the 3D rotation matrix. In the general case, this is not a rotation matrix since the determinant = 1 requirement is not fulfilled (except for special cases, such as z pointing upward). For example, a transformation that is slightly pitched by -0.1 will give the following 2D rotation matrix:
0.995 0
0 1
which is not actually a rotation matrix, or for pitch = -1 and roll = 0.6
0.5403, 0.4751
8.61e-17 0.8253
. The yaw angle can be computed from the matrix (see https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Rotation_matrix_%E2%86%92_Euler_angles_(z-x-z_extrinsic) ), but so far I've been unable to find the correct formulation. Any Ideas?