Skip to content

Commit

Permalink
Merge pull request #147 from vmoens/patch-2
Browse files Browse the repository at this point in the history
np.product -> np.prod for np 2.0 compatibility
  • Loading branch information
vikashplus authored Oct 24, 2024
2 parents 4271114 + 88110c9 commit 99ca9ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions robohive/envs/multi_task/multi_task_base_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ def get_reward_dict(self, obs_dict):
# Optional Keys
("obj_goal", -np.sum(goal_dist, axis=-1)),
("bonus",
1.0*np.product(goal_dist < 5 * self.obj["dof_proximity"], axis=-1)
1.0*np.prod(goal_dist < 5 * self.obj["dof_proximity"], axis=-1)
# np.product(goal_dist < 0.75 * self.obj["dof_ranges"], axis=-1)
+ 1.0*np.product(goal_dist < 1.67 * self.obj["dof_proximity"], axis=-1),
+ 1.0*np.prod(goal_dist < 1.67 * self.obj["dof_proximity"], axis=-1),
# + np.product(goal_dist < 0.25 * self.obj["dof_ranges"], axis=-1),
),
("pose", -np.sum(np.abs(obs_dict["pose_err"]), axis=-1)),
Expand Down Expand Up @@ -272,4 +272,4 @@ def set_obj_goal(self, obj_goal=None, interact_site=None):
elif type(interact_site) is str: # overwrite using name
self.interact_sid = self.sim.model.site_name2id(interact_site)
elif type(interact_site) is int: # overwrite using id
self.interact_sid = interact_site
self.interact_sid = interact_site

0 comments on commit 99ca9ac

Please sign in to comment.