Skip to content

Commit

Permalink
Updated pillar height as a constant variable
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylwang20 committed Oct 27, 2024
1 parent 83bc0dc commit ae09250
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 @@ -78,6 +78,7 @@ def _setup(self,

self.start_shifts = start_shifts
self.goal_shifts = goal_shifts
self.PILLAR_HEIGHT = 1.09

self.id_info = IdInfo(self.sim.model)

Expand Down Expand Up @@ -246,7 +247,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])))
goal_pos = np.concatenate((goal_pos[:2], np.array([self.PILLAR_HEIGHT])))

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 ae09250

Please sign in to comment.