Ask Your Question

quaternions tf2?

asked 2019-09-15 15:58:36 -0500

AM97 gravatar image

I would like to know why quaternions are used internally in tf2? What are drawbacks and benefits if someone uses Euler instead of quaternions specially in robotics. I know one of the main advantages is quaternions avoid Gimbal lock. Correct me if I am wrong.

edit retag flag offensive close merge delete


Similar comment posted here.

gvdhoorn gravatar imagegvdhoorn ( 2019-09-16 02:42:31 -0500 )edit

For me quaternions are a useful tool that guarantees you don't run into problems like Gimbal lock. Euler angles however, feel more familiar to me and are easier to comprehend. Therefore, I think the design of using quaternions in the background and having the option to convert to Euler makes the most sense. This design gives a safe feeling when dealing with many frames. Convert Euler to quaternion -> do quaternion mathematics with n-frames -> convert quaternion to Euler, with no need to worry about what happens in between. On top of that I think doing quaternion algebra on a computer is more efficient than doing calculations on Euler angles (especially for many frames this would have significant impact), meaning there would be performance gain as well.

MCornelis gravatar imageMCornelis ( 2019-09-23 04:26:40 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-15 22:57:28 -0500

Gimbal lock is one of the main reasons. You can learn more about quaternions below.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-09-15 15:58:36 -0500

Seen: 20 times

Last updated: Sep 15