Skip to content

To euler fix #128

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

To euler fix #128

wants to merge 2 commits into from

Conversation

kcamroccm
Copy link

Fixes: #
Issue with to_eularian_angles() method where quaternions with pitches of -90 or 90 would not return the correct values. These pitches need to be handled differently

About

Handling the singularity that occurs when when the pitch is -90 or 90, to have to_eularian_angles() work for all rotations.

How Has This Been Tested?

I wrote several test scripts in another branch called to_euler_tests in my fork https://github.com/kcamroccm/Colosseum/tree/to_euler_tests/PythonClient/TMM

There is a pytest unit test in file test_to_euler.py that goes through random orientations with the singularity exactly, near the singularity, and fully random orientations, converts them back and forth using the utils.to_quaternion() and to_eularian_angles() and verifies that they are still equal within a threshold.

There is also a script called vision_pawn_rotation.py that I used to verify the conversion visually while connected to an to unreal. This also works with random orientation of the same types used the pytest script

Screenshots (if appropriate):

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

Successfully merging this pull request may close these issues.

1 participant