Fix the wrong nstep in _step_mujoco_simulation function of class MujocoEnv (#424)

This commit is contained in:
xuanhien070594
2023-04-01 07:30:26 -04:00
committed by GitHub
parent 470f256996
commit 7094298ad4

View File

@@ -368,7 +368,7 @@ class MujocoEnv(BaseMujocoEnv):
def _step_mujoco_simulation(self, ctrl, n_frames):
self.data.ctrl[:] = ctrl
mujoco.mj_step(self.model, self.data, nstep=self.frame_skip)
mujoco.mj_step(self.model, self.data, nstep=n_frames)
# As of MuJoCo 2.0, force-related quantities like cacc are not computed
# unless there's a force sensor in the model.