I remember now... These are "quaternions!"
June 13, 2024 12:08 PM   Subscribe

Imaginary Numbers are Matrices [Japanese with English captions] – If you would like to have imaginary numbers and quaternions explained in the form of a dialogue between anthropomorphized vocal synthesizers, then Zundamon and Metan are here to oblige you. Zundamon's Theorem is a channel with more of these mathematically enriching conversations.
posted by Wolfdog (9 comments total) 20 users marked this as a favorite
 


It’s fascinating to see someone appreciating quaternions from more of a pure mathematical beauty perspective. I’ve had to use nothing but quaternions for years because of application-specific needs, but I still find them frustrating and unintuitive and every time I look at one a little bit of vomit comes up.

If you give me three Euler angles, I can picture the roll, pitch and yaw of whatever you’re describing pretty much instantly. Looking at quaternions is more like trying to read a regex, or maybe a barcode or something. I know the information is in there, but I’m going to need a tool to understand it.

I’m everyone who gets into robotics starts off Euler angles. If you keep going long enough you’ll inevitably graduate from moving a servo on your desktop to building more complicated multi-dimensional machines with multiple degrees of freedom. You may even build joints where the axes of revolution intersect. However, if you have built your control software using nice, intuitive Euler angles, your robot will inevitably receive a visit from the gimbal lock fairy.

The gimbal lock fairy does not see angles like you do. Until you learn to see the world like the gimbal lock fairy, your robot will enter poses that seem completely reasonable to you, but are a BIG PROBLEM for the gimbal lock fairy, provided your controller is using Euler angles. It may look like your robot’s joint configurations are no big deal, but from your controller’s perspective, it’s as if a degree of freedom has jammed up or suddenly disappeared. It will freak out and try to recover from this no-good-very-bad state, often by trying to achieve infinite acceleration instantaneously and donkey punching anything near it until the FETs on your motor drivers explode.

There is no way to avoid this while using Euler angles and no way correct it with those tools either. At best, you can hope to mitigate it by banning certain problematic poses as well as the poses that could lead to them, which often has other disastrous effects. You must use your imagination, and turn to numbers with an imaginary component.

I still have a strange love for Euler angles, but that how I’ve learned to love quaternions.
posted by 1024 at 12:59 PM on June 13 [16 favorites]


how I’ve learned to love quaternions
for me, it was graffiti [Raidió Teilifís Éireann]
posted by HearHere at 1:16 PM on June 13 [3 favorites]


1024, I found it was easier to understand quaternions by learning more about the underlying rotation group SO(3) and its Lie algebra, which gives the connection between rotations and rotational velocities that's so critical in robotics. This paper A micro Lie theory for state estimation in robotics gives a good overview. For me, it's easier to think in the abstract rotation group/algebra and defer the choice of representation as long as possible.
posted by scose at 11:00 PM on June 13 [2 favorites]


By the way this video was really cute, I loved the whiteboard becoming a blackboard and the freaked-out eyes when the 2x2 matrix of complex numbers was introduced at 7:02.
posted by scose at 11:04 PM on June 13


If you’ve found quaternions confusing you might want to take a look at Geometric Algebra which is a practical application of Clifford Algebras.
posted by delicious-luncheon at 5:04 AM on June 14 [2 favorites]


If you think a visit from the gimbal lock fairy is bad when you’re doing robotics, just imagine it when you’re trying to avoid getting lost in space.
posted by Major Clanger at 5:11 AM on June 14 [1 favorite]


Ooo, ye gods, I wrote a quaternion-based camera system in a prior life decades ago. It was fun, but a bear for a kid in his first real SWE job.

Maybe it was just the math department in my university, but I was always disappointed at how poor a job they did of connecting higher-level techniques to lower-level concepts. I did fine in linear algebra, but never really got what I was doing or why because it was just “here’s a sudoku board. Here’s how you math it with another sudoku board. If you do this to it, it becomes a triangular half of a sudoku board, and that is somehow special enough to be named something in German!” The idea that I was automating algebra across large sets of multivariate equations was entirely lost, so I could get right answers, but had no idea what good they were until I needed them for something.
posted by gelfin at 8:45 AM on June 14 [1 favorite]




« Older You know what your life needs more of?   |   ChatGPT is bullshit Newer »


You are not currently logged in. Log in or create a new account to post comments.