You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the gymnasium RecordVideo wrapper to capture my episodes. While it works perfectly
with other environments, with MuJoCo environments I experience strange behavior. The problem is that
only the first run within an environment instance is recorded correctly. I did not find a way to fix it properly.
One possible way to do it is to recreate both the environment and recorder instance every time I perform
test rollouts, so the issue seems to be related to some internal state which I do not have access to.
Find the code to reproduce the issue below.
import uuid
import gymnasium as gym
env = gym.wrappers.RecordVideo(
env=gym.make("Humanoid-v4", render_mode="rgb_array"),
video_folder=f"video/{uuid.uuid4()}",
episode_trigger=lambda x: True,
disable_logger=True
)
for i in range(3):
env.reset()
done = False
while not done:
next_state, reward, terminated, truncated, info = env.step(env.action_space.sample())
if terminated or truncated:
break
I am using
Ubuntu 22.04
MuJoCo 2.3.3, gymnasium 0.28.1 and Python 3.10
Thank you very much for your help.
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to use the gymnasium RecordVideo wrapper to capture my episodes. While it works perfectly
with other environments, with MuJoCo environments I experience strange behavior. The problem is that
only the first run within an environment instance is recorded correctly. I did not find a way to fix it properly.
One possible way to do it is to recreate both the environment and recorder instance every time I perform
test rollouts, so the issue seems to be related to some internal state which I do not have access to.
Find the code to reproduce the issue below.
I am using
Thank you very much for your help.
The text was updated successfully, but these errors were encountered: