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
where and are both quaternions and is the dual unit with . 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 and .
- Returns:
- dqarray, shape (8,)
Unit dual quaternion to represent transform: (pw, px, py, pz, qw, qx, qy, qz)
- Raises:
- ValueError
If input is invalid