maple icon indicating copy to clipboard operation
maple copied to clipboard

ERROR: GLEW initalization error: Missing GL version

Open littlefiveRobot opened this issue 3 years ago • 9 comments

hello, I found that I could run python robosuite/scripts/collect_human_demonstrations.py but when I run python scripts/trainer.py --env stack .Error appeared as follows: 2022-04-01 21-06-16 的屏幕截图

I had put export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so in my .bashrc ,but It did not work.

littlefiveRobot avatar Apr 01 '22 13:04 littlefiveRobot

Do you know why? I think my GLEW is ok,because I can run this code without any problem. code: import gym # test for glew env = gym.make('Ant-v2') env.reset() for _ in range(1000): env.render() a = env.action_space.sample() s, r, d, _ = env.step(a) # take a random action print(a,s,r,d) env.close()

littlefiveRobot avatar Apr 01 '22 13:04 littlefiveRobot

I'm not entirely sure why that export statement in your bashrc did not resolve the issue. Perhaps this thread provides more answers: https://github.com/openai/mujoco-py/issues/268

If not, maybe you can try running the experiments without any rendering at all. To do this:

  1. Add a line in the env_kwargs to disable offscreen rendering: has_offscreen_renderer=False
  2. Run the experiment with the --no_video flag: python scripts/trainer.py --env stack --no_video

snasiriany avatar Apr 03 '22 16:04 snasiriany

I encountered the same problem. I found https://github.com/ARISE-Initiative/robosuite/issues/114#issuecomment-811295554 and https://github.com/openai/mujoco-py/issues/390#issuecomment-525385434 are pretty helpful.

Adding the following lines after line 272 on the robosuite.environments.base.py (maple branch) solved my issue.

                from mujoco_py import GlfwContext
                GlfwContext(offscreen=True)

haonan16 avatar Apr 19 '22 21:04 haonan16

Nice find @aaa1234zzz! @1172534699 curious if this resolves the issue on your end?

snasiriany avatar Apr 20 '22 14:04 snasiriany

Nice find @aaa1234zzz! @1172534699 curious if this resolves the issue on your end?

Thanks! I am very grateful! It works!

littlefiveRobot avatar Apr 21 '22 14:04 littlefiveRobot

And could you tell me what is the version of your GPU and CUDA?

littlefiveRobot avatar Apr 22 '22 02:04 littlefiveRobot

I'm using a Titan RTX gpu with the following specs: NVIDIA-SMI 470.103.01 Driver Version: 470.103.01 CUDA Version: 11.4

snasiriany avatar Apr 23 '22 01:04 snasiriany

I am using NVIDIA GeForce RTX 3080 Ti with NVIDIA-SMI 470.103.01 Driver Version: 470.103.01 CUDA Version: 11.4

haonan16 avatar Apr 23 '22 02:04 haonan16

I encountered the same problem. I found ARISE-Initiative/robosuite#114 (comment) and openai/mujoco-py#390 (comment) are pretty helpful.

Adding the following lines after line 272 on the robosuite.environments.base.py (maple branch) solved my issue.

                from mujoco_py import GlfwContext
                GlfwContext(offscreen=True)

after doing this,i run "python maple/scripts/train.py --env=lift --label=lift1 --no_gpu ", but get the result with nothing in "progress.csv" as follow: image

faker52 avatar May 15 '23 08:05 faker52