I am programming a camera viewer in Python to move around an object on a sphere given YPR Euler angles (intrinsic) from the user.
Everything seemed nice until I pitched the camera 90 degrees up/down. The calculations then stopped working and I could not move as expected. I understand this has to do with the gimbal lock as it causes two rotation axes to align.
So far I have only found solutions such as changing the order of Euler angles or using quaternions, but this is not compatible with the desired solution as:
- changing the order of Euler angles changes the intuitive behavior of YPR angles for the user
- using quaternions is far from intuitive in itself
Is there some other way out of this mess? The key point is to maintain intuitive user control while avoiding gimbal locks.
Thanks a lot beforehand!