Skip to content

Commit 81869a9

Browse files
fixed precision of env offsets to match pos and quat
1 parent 4a7ec67 commit 81869a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genesis/utils/geom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def quat_to_R(quat, *, out=None):
607607
if all(isinstance(e, torch.Tensor) for e in (quat, out) if e is not None):
608608
return _tc_quat_to_R(quat, out=out)
609609
elif all(isinstance(e, np.ndarray) for e in (quat, out) if e is not None):
610-
return _np_quat_to_R(quat, out=out)
610+
return _np_quat_to_R(quat.astype(out.dtype) if out is not None else quat, out=out)
611611
else:
612612
gs.raise_exception(f"the input must be either torch.Tensor or np.ndarray. got: {type(quat)=}")
613613

0 commit comments

Comments
 (0)