From 3864c52f0187c9fb6d3f0d508a1149a8278ff2fb Mon Sep 17 00:00:00 2001 From: Heiko Carrasco <4395770+miterion@users.noreply.github.com> Date: Fri, 3 Nov 2023 05:30:31 -0400 Subject: [PATCH] Mujoco is all you need (#100) --- Pyrado/pyrado/environments/mujoco/quanser_qube.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Pyrado/pyrado/environments/mujoco/quanser_qube.py b/Pyrado/pyrado/environments/mujoco/quanser_qube.py index 20e136fb33..a1638d12c1 100644 --- a/Pyrado/pyrado/environments/mujoco/quanser_qube.py +++ b/Pyrado/pyrado/environments/mujoco/quanser_qube.py @@ -124,7 +124,10 @@ def _mujoco_step(self, act: np.ndarray) -> dict: self.data.ctrl[:] = torque # Call MuJoCo - mujoco.mj_step(self.model, self.data) + try: + mujoco.mj_step(self.model, self.data) + except mujoco.FatalError: + mjsim_crashed = True qpos = self.data.qpos.copy() qvel = self.data.qvel.copy()