Skip to content

Commit

Permalink
BUGFIX: Envs re-defininng their resets were missing the gym/gymnasium…
Browse files Browse the repository at this point in the history
… compliance. Envs now overwrite the correct _reset function. Gym compliance is now preserved across the defaulting envs
  • Loading branch information
vikashplus committed Apr 21, 2024
1 parent f039625 commit 63b44ad
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion robohive/envs/hands/baoding_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def get_reward_dict(self, obs_dict):
rwd_dict['dense'] = np.sum([wt*rwd_dict[key] for key, wt in self.rwd_keys_wt.items()], axis=0)
return rwd_dict

def reset(self, reset_pose=None, reset_vel=None, reset_goal=None, time_period=6, **kwargs):
def _reset(self, reset_pose=None, reset_vel=None, reset_goal=None, time_period=6, **kwargs):
# reset counters
self.counter=0

Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/hands/door_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_reward_dict(self, obs_dict):
return rwd_dict


def reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
def _reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
self.sim.reset()
qp = self.init_qpos.copy() if reset_qpos is None else reset_qpos
qv = self.init_qvel.copy() if reset_qvel is None else reset_qvel
Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/hands/hammer_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_obs_dict(self, sim):
return obs_dict


def reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
def _reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
self.sim.reset()
qp = self.init_qpos.copy() if reset_qpos is None else reset_qpos
qv = self.init_qvel.copy() if reset_qvel is None else reset_qvel
Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/hands/pen_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_reward_dict(self, obs_dict):
return rwd_dict


def reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
def _reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
self.sim.reset()
qp = self.init_qpos.copy() if reset_qpos is None else reset_qpos
qv = self.init_qvel.copy() if reset_qvel is None else reset_qvel
Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/hands/relocate_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def get_obs_dict(self, sim):
return obs_dict


def reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
def _reset(self, reset_qpos=None, reset_qvel=None, **kwargs):
self.sim.reset()
qp = self.init_qpos.copy() if reset_qpos is None else reset_qpos
qv = self.init_qvel.copy() if reset_qvel is None else reset_qvel
Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/multi_task/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This suite is designed to study generalization in multi-task settings. RoboHive's multi-task suite builds from `FrankaKitchen` environements originally studied in the [Relay Policy Learning](https://relay-policy-learning.github.io/) project.

# Franka Kitchen
`FrankaKitchen` domain offers a challenging set of manipulation problems in an unstructured environment with many possible tasks to perform. The original set consisted of a franka robot in a kitchen domain. Overtime, Franka Kitchen has became a popular choice of environments for studying multi-task generalization. Its widespread use has led to a few different publically available variations. To help navigate these changes, we name these variations and document its evolution of across various versions below -
`FrankaKitchen` domain offers a challenging set of manipulation problems in an unstructured environment with many possible tasks to perform. The original set consisted of a franka robot in a kitchen domain. Overtime, Franka Kitchen has became a popular choice of environments for studying multi-task generalization. Its widespread use has led to a few different publically available variations. To help navigate these changes, we name these variations and document its evolution across various versions below -

## Change log/ History

Expand Down

0 comments on commit 63b44ad

Please sign in to comment.