Skip to content

Commit

Permalink
Fixing goal pos error
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylwang20 committed Sep 18, 2024
1 parent 0407041 commit 1db500f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions myosuite/envs/myo/myochallenge/bimanual_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def get_obs_dict(self, sim):
obs_dict["object_qpos"] = sim.data.qpos[self.id_info.manip_joint_range].copy()
obs_dict["object_qvel"] = sim.data.qvel[self.id_info.manip_dof_range].copy()

obs_dict["start_pos"] = self.start_pos[:2].copy()
obs_dict["goal_pos"] = self.goal_pos[:2].copy()
obs_dict["start_pos"] = self.start_pos
obs_dict["goal_pos"] = self.goal_pos
obs_dict["elbow_fle"] = self.sim.data.joint('elbow_flexion').qpos.copy()

this_model = sim.model
Expand Down Expand Up @@ -256,10 +256,8 @@ def get_reward_dict(self, obs_dict):

elbow_err = 5 * np.exp(-10 * (obs_dict['elbow_fle'][0] - 1.) ** 2) - 5
goal_dis = np.array(
[[np.abs(np.linalg.norm(obj_pos[:2] - goal_pos, axis=-1))]])
[[np.abs(np.linalg.norm(obj_pos - goal_pos, axis=-1))]])

isTimeLimit = obs_dict['time'] > 3.0

rwd_dict = collections.OrderedDict(
(
# Optional Keys
Expand Down

0 comments on commit 1db500f

Please sign in to comment.