openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.89k stars 813 forks source link

Black screen #380

Open richardrl opened 5 years ago

richardrl commented 5 years ago

Describe the bug Screen is black for any mujoco-py gym environments To Reproduce Ubuntu 18.04 Nvidia 1080 Ti Mujoco 1.5 or 2.0

Simulation runs (prints outputs), but screen is completely black Expected behavior Should show simulation

Environment

richardrl commented 5 years ago

If I set LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so:/usr/lib/x86_64-linux-gnu/libGL.so

Instead of a black screen, I get the: ERROR: GLEW initalization error: Missing GL version

Press Enter to exit ...

tkelestemur commented 5 years ago

Same here. I get a black screen and the same error.

My setup: Ubuntu 18.04, RTX2080Ti. MuJoCo 200. mujoco-py version 2.0.2.0 gym version 0.12.1

haanvid commented 5 years ago

Same here

underactuated commented 5 years ago

I had the same problem (ubuntu 18.04). I am no expert, but reading related discussions helped me solve it. Solution:

1) install GLEW: sudo apt-get install libglew-dev

2) add to .bashrc: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

richardrl commented 5 years ago

@underactuated As stated earlier in the thread these are not solutions for me

tkelestemur commented 5 years ago

@underactuated's solution works for me but I'm wondering if there is a better solution. (I don't wanna put LD_PRELOAD in bashrc.)

mh-mu commented 2 years ago

Has anyone been able to resolve this issue? I have tried all methods in this thread but none worked for me so far.