Skip to content

Commit

Permalink
Added time limit to bimanual
Browse files Browse the repository at this point in the history
  • Loading branch information
elladyr committed Sep 17, 2024
1 parent 266df0a commit f664496
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion myosuite/envs/myo/myochallenge/bimanual_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ 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))]])

isTimeLimit = obs_dict['time'] > 3.0

rwd_dict = collections.OrderedDict(
(
# Optional Keys
Expand All @@ -271,7 +274,7 @@ def get_reward_dict(self, obs_dict):
("sparse", 0),
("goal_dist", goal_dis),
("solved", goal_dis < self.proximity_th),
("done", goal_dis < self.proximity_th),
("done", isTimeLimit),
)
)

Expand Down

0 comments on commit f664496

Please sign in to comment.