pypose.so3¶
- pypose.so3 = functools.partial(<class 'pypose.lietensor.lietensor.LieTensor'>, ltype=<pypose.lietensor.lietensor.so3Type object>)¶
Alias of so3 type
LieTensor
.- Parameters:
data (
Tensor
, orlist
, or ‘int
…’) –A
Tensor
object, or constructing aTensor
object fromlist
, which defines tensor data (see below), or from ‘int
…’, which defines tensor shape.The shape of
Tensor
object must be(*, 3)
, where*
is empty, one, or more batched dimensions (thelshape
of this LieTensor), otherwise error will be raised.
Internally, so3 LieTensors are stored in the axis-angle format:
\[\mathrm{data}[*, :] = [\delta_x, \delta_y, \delta_z], \]with \(\delta = \begin{pmatrix} \delta_x & \delta_y & \delta_z \end{pmatrix}\top\) being the axis of rotation and \(\theta = \|{\delta}\|\) being the angle.
Examples
>>> pp.so3(torch.randn(2, 3)) so3Type LieTensor: tensor([[ 0.1571, 0.2203, -0.2457], [-0.3311, 0.5412, -0.7028]]) >>> pp.so3([0, 0, 1]) so3Type LieTensor: tensor([0., 0., 1.])
If
data
is tensor-like, the last dimension should correspond to the 3 elements of the above embedding.Note
It is not advised to construct so3 Tensors by specifying storage sizes with ‘
int
…’, which does not initialize data.Consider using
pypose.randn_so3
orpypose.identity_so3
instead.See
pypose.Exp
,pypose.Inv
for implementations of relevant operations.