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

RecordVideo producing black screen #824

Closed
patchmeifyoucan opened this issue Apr 18, 2023 · 1 comment
Closed

RecordVideo producing black screen #824

patchmeifyoucan opened this issue Apr 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@patchmeifyoucan
Copy link

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.

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.

@patchmeifyoucan patchmeifyoucan added the bug Something isn't working label Apr 18, 2023
@yuvaltassa
Copy link
Collaborator

Please report to gym maintainers, MuJoCo is not associated with this project.
Cheers

@yuvaltassa yuvaltassa closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants