-
Notifications
You must be signed in to change notification settings - Fork 54
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
Proper Euler angle conversion - solution #13
Comments
There seem to be some issues with this code as well. All the angles seem to go from 0 to 360 degrees except for the rotation around the y axis, which is in [-180, 180] degrees. Also, although the rotation around the x and z axes should go continuously from 0 to 360, there seem to be some positions, around 180 and 0 degrees, respectively, when they suddenly jump from those values to 0 and 90 (also, respectively). |
It's mathematically impossible to completely convert quat to euler without jumping, so there's always going to be issues. There has to be some logic on top to keep track of absolute rotation. |
I agree, but the implementation currently in the repository seems to be more stable. I don't know if they fixed more things since your initial answer. I posted so that people know that there are issues with this implementation as well. |
This was posted a while ago, so I think the repo version is better now. |
Definitely make a pull request if you have better methods 😁 |
After playing around with it, I noticed that the repo version still has flaws. For instance, if the tracker is flat on the table (roll +/-180, pitch -90) and you change only the yaw, at yaw = -90 the roll and pitch become, respectively, 0 and 90. Unfortunately, I'm not skilled enough to propose a solution of my own, since I'm new to the field. However, I started using the transforms3d package which has a function for quaternion to Euler conversion which seems to be quite stable (at least based on my measurements so far). If you prefer to rely on this external package, I can make a pull request. |
Rather than posting it in every single duplicate issue that is currently in the list, I'm creating a new issue and posting the solution here.
It's a bit crude, but it does work:
The text was updated successfully, but these errors were encountered: