You’re probably using one or more of these to represent transformations:
- 4 by 4 homogeneous transformation matrices
- a quaternion + a vector
- Euler angles + a vector (yikes)
That’s great! But what if I told you there’s something better, a way to represent elements of SE(3) that
- is twice as compact as matrices
- is the natural extension for quaternions to include translations
- has all these amazing mathematical properties making them superior in many ways to matrices or quaternions + vectors (axis-angle for quaternions becomes screw for dual quaternions, easy ScLERP, easy normalization (vs. Gram-Shmidt), an exact tangent (higher order Taylor series elements are exactly zero), and more
- is fast (proof: all the graphics people use it)
- makes your colleagues go “woah! DUAL quaternions?!”
Ever wonder what the shortest path looks like between two frames with constant speed, independent of the coordinate system?
Dual quaternions are the generalization of quaternions to dual numbers. Think of dual numbers as complex numbers except i
or j
becomes e
and e^2 = 0
. The math works out really nicely.
It’s super easy to start using dual quaternions right now in ROS, with the recent release of the purely Pythonic dual_quaternions package and dual_quaternions_ros package for converting from and to ROS messages. If there is interest, I’ll add C++ and ROS2 support as well.
apt install ros-$ROSDISTRO-dual-quaternions-ros
pro tip: I also use this to convert Pose messages to Transform messages (don’t ask me why they aren’t the same thing anyways)
Let me know how YOU plan to make dual quaternions a large part of your life.
Cheers,
Achile