Ensure MujocoViewer opens on .render() for render_mode human

This commit is contained in:
Dominik Roth 2023-11-27 13:18:41 +01:00 committed by GitHub
parent 0b4e729a49
commit aeecf65f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,6 +130,7 @@ class AirHockeyEnv(Environment):
return self.base_env.render(record = True)
elif self.render_mode == 'human':
self.render_human_active = True
self.base_env.render()
else:
raise ValueError(f"Unsupported render mode: '{self.render_mode}'")
@ -190,4 +191,4 @@ if __name__ == "__main__":
J = 0.
gamma = 1.
steps = 0
env.reset()
env.reset()