pytransform3d.transformations
.concatenate_dual_quaternions#
- pytransform3d.transformations.concatenate_dual_quaternions(dq1, dq2, unit=True)[source]#
Concatenate dual quaternions.
We concatenate two dual quaternions by dual quaternion multiplication
\[(\boldsymbol{p}_1 + \epsilon \boldsymbol{q}_1) (\boldsymbol{p}_2 + \epsilon \boldsymbol{q}_2) = \boldsymbol{p}_1 \boldsymbol{p}_2 + \epsilon ( \boldsymbol{p}_1 \boldsymbol{q}_2 + \boldsymbol{q}_1 \boldsymbol{p}_2)\]using Hamilton multiplication of quaternions.
Warning
Note that the order of arguments is different than the order in
concat()
.- Parameters:
- dq1array-like, shape (8,)
Dual quaternion to represent transform: (pw, px, py, pz, qw, qx, qy, qz)
- dq2array-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:
- dq3array, shape (8,)
Product of the two dual quaternions: (pw, px, py, pz, qw, qx, qy, qz)
See also
pytransform3d.rotations.concatenate_quaternions
Quaternion multiplication.