Developer notes

This section documents internal functions and other notes shared between contributors to this project.

Design guidelines

  • Pink is designed for clarity before performance

  • Leaky abstractions are our enemy

  • WIP

Internal functions

Lie-algebra utility functions.

pink.tasks.utils.body_minus(Y, X)

Compute the right minus \(Y \ominus X\).

The right minus operator is defined by:

\[Y \ominus X = \log(X^{-1} \cdot Y)\]

This operator allows us to think about orientation “differences” as similarly as possible to position differences, but mind the frames! If we denote by \(Y = T_{0y}\) and \(X = T_{0x}\) the two transforms, from respectively frames \(y\) and \(x\) to the inertial frame \(0\), the twist resulting from a right minus is expressed in the local frame \(x\):

\[{}_x \xi_{0x} = Y \ominus X = \log(T_{x0} T{0y}) = \log(T_{xy})\]

A twist like \({}_x \xi_{0x}\) in the local frame \(x\) is called a body motion vector.

Parameters:
  • Y (SE3) – Transform \(Y = T_{0y}\) on the left-hand side of the operator.

  • X (SE3) – Transform \(X = T_{0x}\) on the right-hand side of the operator.

Return type:

ndarray

Returns:

Body motion vector resulting from the difference \(\ominus_0\) between \(Y\) and \(X\).

Notes

pink.tasks.utils.spatial_minus(Y, X)

Compute the left minus \(Y \ominus_0 X\).

The left minus operator is defined by:

\[Y \ominus_0 X = \log(Y \cdot X^{-1})\]

This operator allows us to think about orientation “differences” as similarly as possible to position differences, but mind the frames! If we denote by \(Y = T_{0y}\) and \(X = T_{0x}\) the two transforms, from respectively frames \(y\) and \(x\) to the inertial frame \(0\), the twist resulting from a left minus is expressed in the inertial frame:

\[{}_0 \xi_{0x} = Y \ominus_0 X = \log(T_{0y} T_{x0})\]

A twist like \({}_0 \xi_{0x}\) in the inertial frame is called a spatial motion vector.

Parameters:
  • Y (SE3) – Transform \(Y = T_{0y}\) on the left-hand side of the operator.

  • X (SE3) – Transform \(X = T_{0x}\) on the right-hand side of the operator.

Return type:

ndarray

Returns:

Spatial motion vector resulting from the difference \(\ominus_0\) between \(Y\) and \(X\).

Notes

The micro Lie theory describes the difference between the left and right minus operators.