ls_mlkit.util.se3 module¶
- class ls_mlkit.util.se3.T(rots, trans)[source]¶
Bases:
object- 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]
- property shape¶