ls_mlkit.util.se3 module

class ls_mlkit.util.se3.T(rots, trans)[source]

Bases: object

apply(pts)[source]
compose(t)[source]
static concat(ts, dim)[source]
static from_4x4(t)[source]
static from_tensor(t)[source]
get_rots()[source]
get_trans()[source]
static identity(shape, dtype, device, requires_grad=False)[source]
static identity_rot(shape, dtype, device, requires_grad=False)[source]
static identity_trans(shape, dtype, device, requires_grad=False)[source]
invert()[source]
invert_apply(pts)[source]
map_tensor_fn(fn)[source]

Apply a function that takes a tensor as its only argument to the rotations and translations, treating the final two/one dimension(s), respectively, as batch dimensions.

E.g.: Given t, an instance of T of shape [N, M], this function can be used to sum out the second dimension thereof as follows:

t = t.map_tensor_fn(lambda x: torch.sum(x, dim=-1))

The resulting object has rotations of shape [N, 3, 3] and translations of shape [N, 3]

static rigid_from_3_points(x_1: Tensor, x_2: Tensor, x_3: Tensor, eps: float = 1e-08)[source]
scale_translation(factor)[source]
property shape
stop_rot_gradient()[source]
to(device)[source]
to_4x4()[source]
unsqueeze(dim)[source]
ls_mlkit.util.se3.quat_to_rot(quat)[source]
ls_mlkit.util.se3.rot_matmul(a, b)[source]
ls_mlkit.util.se3.rot_vec_mul(r, t)[source]