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

add from_euler_angles equivalent for Tait-Bryan angles #217

Closed
petaflot opened this issue Jul 10, 2023 · 1 comment
Closed

add from_euler_angles equivalent for Tait-Bryan angles #217

petaflot opened this issue Jul 10, 2023 · 1 comment
Labels

Comments

@petaflot
Copy link

from_euler_angles() is supposed to make my life easier, it's actually confusing me.

I would be grateful to have a from_taitbryan_angles() function that does just what its name says.

@moble
Copy link
Owner

moble commented Jul 10, 2023

I think you need to reread this section. Calling something "Tait-Bryan" doesn't make it any clearer; Wikipedia only claims that that narrows it down to a group of six possible conventions, but even that assumes a bunch of other conventions that somebody will come here to complain at me about.

The only unambiguous definition that is possible is to write down the quaternion that will be output in terms of the input arguments. And that is exactly what the docstring does when it says

R = exp(alpha*z/2) * exp(beta*y/2) * exp(gamma*z/2)

How you interpret that quaternion as a rotation is up to you. How you apply such a rotation is up to you, and different people make different choices. So there is no possible way for one person to explain these to anyone else that is unambiguous. You have to do the math for yourself to see what you want to do.

These are the sorts of explanations that my page about Euler angles was supposed to make unnecessary for me to write. If you don't like it, feel free to write your own function, like

def my_personal_idea_of_what_euler_angles_should_be(alpha, beta, gamma):
    return np.exp(alpha*quaternion.x/2) * np.exp(beta*quaternion.y/2) * np.exp(gamma*quaternion.z/2)

@moble moble closed this as completed Jul 10, 2023
Repository owner locked and limited conversation to collaborators Jul 10, 2023
@moble moble added the nuisance label Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants