Skip to content

Commit

Permalink
Merge pull request #539 from ARISE-Initiative/fix-gym-demo
Browse files Browse the repository at this point in the history
fix demo_gym_functionality rendering issues after first ep
  • Loading branch information
kevin-thankyou-lin authored Nov 4, 2024
2 parents 1a2e275 + fd0b4e5 commit d4552fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion robosuite/demos/demo_gym_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
if terminated or truncated:
print("Episode finished after {} timesteps".format(t + 1))
observation, info = env.reset()
env.close()
break
env.close()
6 changes: 6 additions & 0 deletions robosuite/wrappers/gym_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,9 @@ def compute_reward(self, achieved_goal, desired_goal, info):
"""
# Dummy args used to mimic Wrapper interface
return self.env.reward()

def close(self):
"""
wrapper for calling underlying env close function
"""
self.env.close()

0 comments on commit d4552fc

Please sign in to comment.