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

ERROR: GLEW initalization error: Missing GL version #2

Open
littlefiveRobot opened this issue Apr 1, 2022 · 9 comments
Open

ERROR: GLEW initalization error: Missing GL version #2

littlefiveRobot opened this issue Apr 1, 2022 · 9 comments

Comments

@littlefiveRobot
Copy link

littlefiveRobot commented Apr 1, 2022

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
Copy link
Author

littlefiveRobot commented Apr 1, 2022

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()

@snasiriany
Copy link
Collaborator

I'm not entirely sure why that export statement in your bashrc did not resolve the issue. Perhaps this thread provides more answers: openai/mujoco-py#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
Copy link

haonan16 commented Apr 19, 2022

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)

@snasiriany
Copy link
Collaborator

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

@littlefiveRobot
Copy link
Author

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

Thanks! I am very grateful! It works!

@littlefiveRobot
Copy link
Author

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

@snasiriany
Copy link
Collaborator

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
Copy link

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

@faker52
Copy link

faker52 commented May 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants