symforce.geo.dual_quaternion module#

class DualQuaternion(real_q, inf_q)[source]#

Bases: Group

Dual quaternions can be used for rigid motions in 3D. Similar to the way that rotations in 3D space can be represented by quaternions of unit length, rigid motions in 3D space can be represented by dual quaternions of unit length. This fact is used in theoretical kinematics, and in applications to 3D computer graphics, robotics and computer vision.

References

https://en.wikipedia.org/wiki/Dual_quaternion

Parameters:
classmethod storage_dim()[source]#

Dimension of underlying storage

Return type:

int

to_storage()[source]#

Flat list representation of the underlying storage, length of storage_dim(). This is used purely for plumbing, it is NOT like a tangent space.

Return type:

List[float]

classmethod from_storage(vec)[source]#

Construct from a flat list representation. Opposite of to_storage().

Parameters:

vec (Sequence[float]) –

Return type:

DualQuaternion

classmethod identity()[source]#

Identity element such that compose(a, identity) = a.

Return type:

DualQuaternion

compose(other)[source]#

Apply the group operation with other.

Parameters:

other (DualQuaternion) –

Return type:

DualQuaternion

inverse()[source]#

Group inverse, such that compose(a, inverse(a)) = identity.

Return type:

DualQuaternion

__mul__(right)[source]#

Left-multiply with another dual quaternion.

Parameters:

right (DualQuaternion) –

Return type:

DualQuaternion

__div__(scalar)[source]#

Scalar division.

Parameters:

scalar (float) –

Return type:

DualQuaternion

__truediv__(scalar)#

Scalar division.

Parameters:

scalar (float) –

Return type:

DualQuaternion

squared_norm()[source]#

Squared norm when considering the dual quaternion as 8-tuple.

Return type:

float

conj()[source]#

Dual quaternion conjugate.

Return type:

DualQuaternion