Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect calculation of Isometry2d from 3d #1

Open
joeda opened this issue May 18, 2020 · 1 comment
Open

Incorrect calculation of Isometry2d from 3d #1

joeda opened this issue May 18, 2020 · 1 comment

Comments

@joeda
Copy link

joeda commented May 18, 2020

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?

@m-naumann
Copy link
Member

Hi @joeda

you revealed that we are missing documentation. All provided methods silently assume that 2d<->3d conversion works by neglecting z, i.e. we assume to be in the x-y-plane with z=0.

I'll also look into your problem closer in June, sorry for this delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants