From 6bf6d415af63cd3d59a8254c6b276186c87869a5 Mon Sep 17 00:00:00 2001 From: Kashu7100 Date: Thu, 16 Jan 2025 20:27:00 -0500 Subject: [PATCH] fix bug --- genesis/utils/geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genesis/utils/geom.py b/genesis/utils/geom.py index aeddc2fe..50250a8c 100644 --- a/genesis/utils/geom.py +++ b/genesis/utils/geom.py @@ -563,10 +563,10 @@ def quat_to_T(quat): if isinstance(quat, torch.Tensor): T = torch.eye(4, dtype=quat.dtype, device=quat.device) if quat.ndim == 1: - T[:3, :3] = Rotation.from_quat(wxyz_to_xyzw(quat)).as_matrix() + T[:3, :3] = quat_to_R(quat) elif quat.ndim == 2: T = T.unsqueeze(0).repeat(quat.shape[0], 1, 1) - T[:, :3, :3] = Rotation.from_quat(wxyz_to_xyzw(quat)).as_matrix() + T[:, :3, :3] = quat_to_R(quat) else: gs.raise_exception(f"ndim expected to be 1 or 2, but got {quat.ndim=}") return T