pytransform3d.transformations.check_dual_quaternion#

pytransform3d.transformations.check_dual_quaternion(dq, unit=True)[source]#

Input validation of dual quaternion representation.

See http://web.cs.iastate.edu/~cs577/handouts/dual-quaternion.pdf

A dual quaternion is defined as

\[\boldsymbol{\sigma} = \boldsymbol{p} + \epsilon \boldsymbol{q},\]

where \(\boldsymbol{p}\) and \(\boldsymbol{q}\) are both quaternions and \(\epsilon\) is the dual unit with \(\epsilon^2 = 0\). The first quaternion is also called the real part and the second quaternion is called the dual part.

Parameters:
dqarray-like, shape (8,)

Dual quaternion to represent transform: (pw, px, py, pz, qw, qx, qy, qz)

unitbool, optional (default: True)

Normalize the dual quaternion so that it is a unit dual quaternion. A unit dual quaternion has the properties \(p_w^2 + p_x^2 + p_y^2 + p_z^2 = 1\) and \(p_w q_w + p_x q_x + p_y q_y + p_z q_z = 0\).

Returns:
dqarray, shape (8,)

Unit dual quaternion to represent transform: (pw, px, py, pz, qw, qx, qy, qz)

Raises:
ValueError

If input is invalid