Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fix reset() method for v2 #385

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion metaworld/envs/mujoco/sawyer_xyz/sawyer_xyz_env.py
Expand Up @@ -457,7 +457,13 @@ def evaluate_state(self, obs, action):

def reset(self):
self.curr_path_length = 0
return super().reset()

## reset self._prev_obs to current observation
obs = super().reset()
self._prev_obs = obs[:18].copy()
obs[18:36] = self._prev_obs

return obs

def _reset_hand(self, steps=50):
for _ in range(steps):
Expand Down