pypose.SO3 = functools.partial(<class 'pypose.lietensor.lietensor.LieTensor'>, ltype=<pypose.lietensor.lietensor.SO3Type object>)

Alias of SO3 type LieTensor.


data (Tensor, or list, or ‘int…’) –

A Tensor object, or constructing a Tensor object from list, which defines tensor data (see below), or from ‘int…’, which defines tensor shape.

The shape of Tensor object must be (*, 4), where * is empty, one, or more batched dimensions (the lshape of this LieTensor), otherwise error will be raised.

Internally, SO3 LieTensors are stored as unit quaternions:

\[\mathrm{data}[*, :] = [q_x, q_y, q_z, q_w], \]

where \(q_x^2 + q_y^2 + q_z^2 + q_w^2 = 1\).


Normalization is not required at initialization as it is done internally by the library right before further computation. However, the normalized quaternion will not be written back to the tensor storage to prevent in-place data alteration.


>>> pp.SO3(torch.randn(2, 4))
SO3Type LieTensor:
tensor([[-1.0722, -0.9440,  0.9437, -0.8485],
        [-0.2725,  0.8414, -1.0730,  1.3270]])
>>> pp.SO3([0, 0, 0, 1])
SO3Type LieTensor:
tensor([0., 0., 0., 1.])

If data is tensor-like, the last dimension should correspond to the 4 elements of the above embedding.


It is not advised to construct SO3 Tensors by specifying storage sizes with ‘int…’, which does not initialize data.

Consider using pypose.randn_SO3 or pypose.identity_SO3 instead.

See pypose.Log, pypose.Inv, pypose.Act, pypose.Retr, pypose.Adj, pypose.AdjT, pypose.Jinvp for implementations of relevant operations.


Access documentation for PyPose

View Docs


Get started with tutorials and examples

View Tutorials

Get Started

Find resources and how to start using pypose

View Resources