UT-Austin-RPL / maple

Official codebase for Manipulation Primitive-augmented reinforcement Learning (MAPLE)
MIT License
73 stars 13 forks source link

ERROR: GLEW initalization error: Missing GL version #2

Open littlefiveRobot opened 2 years ago

littlefiveRobot commented 2 years ago

hello, I found that I could run _python robosuite/scripts/collect_humandemonstrations.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/x8664-linux-gnu/libGLEW.so in my .bashrc ,but It did not work.

littlefiveRobot commented 2 years ago

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.actionspace.sample() s, r, d, = env.step(a) # take a random action print(a,s,r,d) env.close()

snasiriany commented 2 years ago

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
haonan16 commented 2 years ago

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)
snasiriany commented 2 years ago

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

littlefiveRobot commented 2 years ago

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

Thanks! I am very grateful! It works!

littlefiveRobot commented 2 years ago

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

snasiriany commented 2 years ago

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

haonan16 commented 2 years ago

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

faker52 commented 1 year ago

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