Farama-Foundation/D4RL

Unable to get video using hopper-expert-v2 but was able to get with ant-v2 etc.

rebecajohn opened this issue · 0 comments

Unable to get video using hopper-expert-v2 but was able to get with ant-v2 etc.

code:
#@title test virtual display

#@markdown If you see a video of a four-legged ant fumbling about, setup is complete!

import gym
import d4rl

from cs285.infrastructure.colab_utils import (
wrap_env,
show_video
)

env = wrap_env(gym.make("hopper-expert-v2"))

observation = env.reset()
for i in range(100):
env.render(mode='rgb_array')
obs, rew, term, _ = env.step(env.action_space.sample() )
if term:
break;

env.close()
print('Loading video...')
show_video()

output:
warning: Flow failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
No module named 'flow'
INFO:absl:MUJOCO_GL is not set, so an OpenGL backend will be chosen automatically.
INFO:absl:Failed to import OpenGL backend: glfw
INFO:OpenGL.acceleratesupport:No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
INFO:absl:Successfully imported OpenGL backend: egl
INFO:absl:MuJoCo library version is: 2.3.7
Warning: CARLA failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
No module named 'carla'
/usr/local/lib/python3.10/dist-packages/gym/spaces/box.py:78: UserWarning: WARN: Box bound precision lowered by casting to float32
logger.warn(f"Box bound precision lowered by casting to {self.dtype}")

Loading video...
Could not find video