diff --git a/gym_lowcostrobot/assets/low_cost_robot_6dof/push_cube.xml b/gym_lowcostrobot/assets/low_cost_robot_6dof/push_cube.xml index 58d1f89..9fa8a48 100644 --- a/gym_lowcostrobot/assets/low_cost_robot_6dof/push_cube.xml +++ b/gym_lowcostrobot/assets/low_cost_robot_6dof/push_cube.xml @@ -41,7 +41,6 @@ - @@ -122,6 +121,9 @@ + + + diff --git a/gym_lowcostrobot/envs/push_cube_env.py b/gym_lowcostrobot/envs/push_cube_env.py index 861d77b..625bd32 100644 --- a/gym_lowcostrobot/envs/push_cube_env.py +++ b/gym_lowcostrobot/envs/push_cube_env.py @@ -229,6 +229,8 @@ def reset(self, seed=None, options=None): # Sample the target position self.target_pos = self.np_random.uniform(self.target_low, self.target_high).astype(np.float32) + target_geom_id = mujoco.mj_name2id(self.model, mujoco.mjtObj.mjOBJ_SITE, "cube_target") + self.model.site_pos[target_geom_id] = self.target_pos # Step the simulation mujoco.mj_forward(self.model, self.data)