Skip to content

Commit

Permalink
BUGFIX: Goal Condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylwang20 committed Oct 23, 2024
1 parent 5d14602 commit 71e709e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion myosuite/envs/myo/myochallenge/bimanual_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _setup(self,
goal_center=np.array([0.4, -0.25, 1.05]),
max_force=1500, # Max force against throwing

proximity_th=0.015, # object-target proximity threshold
proximity_th=0.15, # object-target proximity threshold

start_shifts=np.array([0.055, 0.055, 0]),
# shift factor for start/goal random generation with z-axis fixed
Expand Down Expand Up @@ -246,6 +246,7 @@ def get_reward_dict(self, obs_dict):
obj_pos = obs_dict["obj_pos"][0][0] if obs_dict['obj_pos'].ndim == 3 else obs_dict['obj_pos']
palm_pos = obs_dict["palm_pos"][0][0] if obs_dict["palm_pos"].ndim == 3 else obs_dict["palm_pos"]
goal_pos = obs_dict["goal_pos"][0][0] if obs_dict["goal_pos"].ndim == 3 else obs_dict["goal_pos"]
goal_pos = np.concatenate((goal_pos[:2], np.array([1.09])))

lift_height = np.linalg.norm(np.array([[[obj_pos[-1], palm_pos[-1]]]]) -
np.array([[[self.init_obj_z, self.init_palm_z]]]), axis=-1)
Expand Down

0 comments on commit 71e709e

Please sign in to comment.