Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):