quaternions tf2?
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.
Similar comment posted here.
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.