mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 11:10:20 +01:00
fix for dumping movies, without rendering, for pendulum_with_goals
This commit is contained in:
@@ -425,7 +425,8 @@ class GymEnvironment(Environment):
|
||||
:param camera_idx: The index of the camera to use. Should be defined in the model
|
||||
:return: None
|
||||
"""
|
||||
if self.env.unwrapped.viewer.cam.fixedcamid != camera_idx and self.env.unwrapped.viewer._ncam > camera_idx:
|
||||
if self.env.unwrapped.viewer is not None and self.env.unwrapped.viewer.cam.fixedcamid != camera_idx and\
|
||||
self.env.unwrapped.viewer._ncam > camera_idx:
|
||||
from mujoco_py.generated import const
|
||||
self.env.unwrapped.viewer.cam.type = const.CAMERA_FIXED
|
||||
self.env.unwrapped.viewer.cam.fixedcamid = camera_idx
|
||||
|
||||
Reference in New Issue
Block a user