in differentiable_robot_model/spatial_vector_algebra.py [0:0]
def __init__(self, rot=None, trans=None, device="cpu"):
self._device = torch.device(device)
if rot is None:
self._rot = torch.eye(3, device=self._device)
else:
self._rot = rot
if len(self._rot.shape) == 2:
self._rot = self._rot.unsqueeze(0)
if trans is None:
self._trans = torch.zeros(3, device=self._device)
else:
self._trans = trans
if len(self._trans.shape) == 1:
self._trans = self._trans.unsqueeze(0)