Dual quaternion implementation
Project description
Dual Quaternions
Dual quaternions are a way of representing rigid body transformations, just like homogeneous transformations do. Instead of using a 4x4 matrix, the transformation is represented as two quaternions. This has several advantages, which are listed under Why use dual quaternions?. The term 'dual' refers to dual number theory, which allows representing numbers (or in this case quaternions) very similar to complex numbers, with the difference being that i
or j
becomes e
(epsilon), and instead of i^2 = -1
, we have e^2 = 0
. This allows, for example, the multiplication of two dual quaternions to work in the same way as homogeneous matrix multiplication.
For more information on dual quaternions, take a look at the References. For conversion from and to common ROS messages, see dual_quaternions_ros.
Why use dual quaternions?
- dual quaternions have all the advantages of quaternions including unambiguous representation, no gimbal lock, compact representation
- direct and simple relation with screw theory. Simple and fast Screw Linear Interpolation (ScLERP) which is shortest path on the manifold
- dual quaternions have an exact tangent / derivative due to dual number theory (higher order taylor series are exactly zero)
- we want to use quaternions but they can only handle rotation. Dual quaternions are the correct extension to handle translations as well.
- easy normalization. Homogeneous tranformation matrices are orthogonal and due to floating point errors operations on them often result in matrices that need to be renormalized. This can be done using the Gram-Schmidt method but that is a slow algorithm. Quaternion normalization is very fast.
- mathematically pleasing
Installation
pip install dual_quaternions
Usage
from dual_quaternions import DualQuaternion
References
- \K. Daniilidis, E. Bayro-Corrochano, "The dual quaternion approach to hand-eye calibration", IEEE International Conference on Pattern Recognition, 1996
- Kavan, Ladislav & Collins, Steven & Zara, Jiri & O'Sullivan, Carol. (2007). Skinning with dual quaternions. I3D. 39-46. 10.1145/1230100.1230107.
- Kenwright, B. (2012). A Beginners Guide to Dual-Quaternions What They Are, How They Work, and How to Use Them for 3D Character Hierarchies.
- Furrer, Fadri & Fehr, Marius & Novkovic, Tonci & Sommer, Hannes & Gilitschenski, Igor & Siegwart, Roland. (2018). Evaluation of Combined Time-Offset Estimation and Hand-Eye Calibration on Robotic Datasets. 145-159. 10.1007/978-3-319-67361-5_10.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dual_quaternions-0.3.4.tar.gz
.
File metadata
- Download URL: dual_quaternions-0.3.4.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a3820557a695a3f872241811fb9d8ebcd3c8ff35dc103910a5bf5ff3a6b9f8f |
|
MD5 | 3f6968f431407416f67768e6c0e56032 |
|
BLAKE2b-256 | aa4b3fef24b15f75ea651dfa571ec0ccdd4d66c894073e038ccb33c17a065026 |
File details
Details for the file dual_quaternions-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: dual_quaternions-0.3.4-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 112fe88c66a4f59f559bdca80eed206b8204741ff5b007d76f0a95cdc4e7200e |
|
MD5 | 64782bd5361e9d4ce0c7ac2a7f998325 |
|
BLAKE2b-256 | d8763212b5df50ddd14656475b6b53e6432cd9a41fc0763249c6559050f2844d |