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()