Dual quaternion implementation

## Project description

Dual quaternions are a way of representing rigid body transformations, just like homogeneous transformations do. Instead of using a 4 by 4 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 e.g. 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

```pip install dual_quaternions
```

### ROS package

Release into apt is on its way. Until then you’ll have to build the catkin package from source.

```cd ~/catkin_ws/src
git clone https://github.com/Achllle/dual_quaternions
cd ..
catkin_make
```

## Usage

Import using:

```from dual_quaternions import DualQuaternion
```

## Project details

This version 0.3.1 0.3.0 0.2.4