pypose.sim3¶
- pypose.sim3 = functools.partial(<class 'pypose.lietensor.lietensor.LieTensor'>, ltype=<pypose.lietensor.lietensor.sim3Type object>)¶
Alias of sim3 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(*, 7)
, where*
is empty, one, or more batched dimensions (thelshape
of this LieTensor), otherwise error will be raised.
Internally, sim3 LieTensors are stored by concatenating the log translation vector with the corresponding rxso3:
\[\mathrm{data}[*, :] = [\tau_x, \tau_y, \tau_z, \delta_x, \delta_y, \delta_z, \log s], \]where \(\begin{pmatrix} \tau_x & \tau_y & \tau_z \end{pmatrix}^T = \mathbf{W}^{-1} \begin{pmatrix} t_x & t_y & t_z \end{pmatrix}^T\) is the product between the inverse of the \(\mathbf{W}\)-matrix and the translation vector, and \(\begin{pmatrix} \delta_x & \delta_y & \delta_z & \log s \end{pmatrix}^T\) represents the rotation and scaling, as in
pypose.rxso3
. More details about \(\mathbf{W}\)-matrix go topypose.Log()
withSim3_type
input.Examples
>>> pp.Sim3(torch.randn(2, 7)) sim3Type LieTensor: sim3Type LieTensor: tensor([[ 0.1477, -1.3500, -2.1571, 0.8893, -0.7821, -0.9889, -0.7887], [ 0.2251, 0.3512, 0.0485, 0.0163, -1.7090, -0.0417, -0.3842]]) >>> pp.sim3([0, 0, 0, 0, 0, 0, 1]) sim3Type LieTensor: tensor([0., 0., 0., 0., 0., 0., 1.])
If
data
is tensor-like, the last dimension should correspond to the 7 elements of the above embedding.Note
It is not advised to construct sim3 Tensors by specifying storage sizes with ‘
int
…’, which does not initialize data.Consider using
pypose.randn_sim3
orpypose.identity_sim3
instead.See
pypose.Exp
,pypose.Inv
for implementations of relevant operations.