Shortcuts

pypose.quat2unit

pypose.quat2unit(input, eps=1e-12)[source]

Normalize the quaternion part of a LieTensor, which has to be a Lie group. If input is a not a Lie group, then do nothing and return the input. If the quaternion parts contain pure zeros, then raise an error.

The quaternion parts \(v\) are normalized as

\[v = \frac{v}{\max(\lVert v \rVert_2, \epsilon)}, \]

where \(\epsilon\) is a small value to avoid division by zero

Parameters:
  • input (LieTensor) – input LieTensor of any type and shape.

  • eps (float) – small value to avoid division by zero. Default: 1e-12.

Returns:

the output LieTensor.

Return type:

LieTensor

Docs

Access documentation for PyPose

View Docs

Tutorials

Get started with tutorials and examples

View Tutorials

Get Started

Find resources and how to start using pypose

View Resources