From 3341cc6f731ffd6f49c9eb7db45a894922733e68 Mon Sep 17 00:00:00 2001 From: Onur Date: Tue, 19 Jul 2022 12:17:02 +0200 Subject: [PATCH] fix body pos set bug in hj --- fancy_gym/envs/mujoco/hopper_jump/hopper_jump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fancy_gym/envs/mujoco/hopper_jump/hopper_jump.py b/fancy_gym/envs/mujoco/hopper_jump/hopper_jump.py index 22e706a..63f40c8 100644 --- a/fancy_gym/envs/mujoco/hopper_jump/hopper_jump.py +++ b/fancy_gym/envs/mujoco/hopper_jump/hopper_jump.py @@ -128,7 +128,7 @@ class HopperJumpEnv(HopperEnv): # self.goal = self.np_random.uniform(0.3, 1.35, 1)[0] self.goal = np.concatenate([self.np_random.uniform(0.3, 1.35, 1), np.zeros(2, )]) # self.sim.model.body_pos[self.sim.model.body_name2id('goal_site_body')] = self.goal - self.data.body('goal_site_body').xpos[:] = np.copy(self.goal) + self.model.body('goal_site_body').pos[:] = np.copy(self.goal) self.max_height = 0 self._steps = 0