-
Notifications
You must be signed in to change notification settings - Fork 813
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
Failed to load OpenGL: Found 0 GPUs for rendering. Using device 0. #665
Comments
I found out that if I comment the loading of the library, it works to render an image. I am really not sure what is wrong with it, maybe someone with more experience can help us here. |
Thank you! In other issues, I wrote the |
Yes, that is exactly the behaviour I am experiencing. I can render images only with the commented lines but then I cannot render the environment and vice versa. It would be amazing if both worked at the same time without altering the |
What's very annoying is, different Ubuntu versions also affect the render of mujoco (version 2.0 and below). I list some common permutations here: Of course, you may need to Google translate~ |
There have been multiple issues which relate to the same error (#598, #187, #390) but unfortunately none of them worked for me. What worked was to change this line in self.viewer = mujoco_py.MjRenderContextOffscreen(self.sim, None, -1) You can find the location of |
Ty @nikhilweee, maybe this correction should be included inside the mujoco.py code, and shouldn't be something the user should change? |
@nikhilweee, you just made my life so much easier! Thank you for your answer! |
@nikhilweee, are you able to render without starting the terminal or id with the graphics card? For me it throws the error of |
@hbonnavaud It definitely shouldn't be something that the user needs to change, so maybe a PR would help? Another way maybe is to create a wrapper which fixes this?
@tudorjnu I usually render offscreen using |
Thankyou!!! you make my life very easier :) |
I use this method, but there are two Creating window glfw in my program, and one is stuck because it doesn't get any output display information. Do you know why? Thank you very much for your answer!! |
没太懂你的问题,建议报错贴详细信息,另外可以先参考一下我的这个教程:https://github.com/kaixindelele/Mujoco-Issues#robosuite%E7%9A%84render%E5%92%8Cimage%E5%86%B2%E7%AA%81%E9%97%AE%E9%A2%98 |
我看到了一个同学可以同时拿到渲染场景和图片(https://blog.csdn.net/zhangkefang45/article/details/107313009?spm=1001.2014.3001.5502),所以就想尝试一下,但是我这样做之后画面一闪而过,且提示我Failed to initialize OpenGL, |
你看我的帖子了么?这个很大程度上是因为你的Ubuntu版本是16.04,而你参考的博客的版本可能是18以上。至于为什么,我还不太清楚。如果说错了,可以先贴出来看看~ |
我的ubuntu系统是20.04的,我也没搞清楚为什么在会出现两个viewer,我并没有更改过底层的rende函数,现在采取的方案就是不使用gym,只在mujoco中渲染得到我自己设定的camera的rgb和depth。 |
i am also getting the mujoco_py viewer but i dont required it did you solve this problem ?? |
If you are running rendering and an RGB display for training simultaneously, it is normal for two windows to open, and seeing a black screen is typical. If you have attempted training, it should be working properly even if the screen is black. One tip would be not to render twice; instead, concatenate the RGB vectors and create a program that automatically saves the video, which is much more efficient. Have a nice day :) |
thank you got it |
Describe the bug
Unable to generage rgb array of environment state / image using environment.render (mode="rgb_array").
To Reproduce
Run the following code:
Expected behavior
An image is returned and stored inside
image
variable, as a numpy.ndarray of pixels values.Error Messages
Desktop (please complete the following information):
Environment
output of:
echo $LD_LIBRARY_PATH
-> /home/disc/h.bonnavaud/.mujoco/mujoco210/bin:/usr/lib/nvidiaoutput of:
echo $HOME
-> /home/disc/h.bonnavaudoutput of:
echo $USER
-> h.bonnavaudoutput of:
echo $LD_PRELOAD
-> /usr/lib/x86_64-linux-gnu/libGLEW.sooutput of:
glxinfo | grep "OpenGL version"
-> OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.0.3Additional context
I found many hints about this problem but nothing about an error like "Found 0 GPUs for rendering. Using device 0.". Reading this line, the problem looks obvious since indice 0 of an empty list is out of range, but I have no idea how to solve it. Do not hesitate to redirect me if I'm at the wrong place, or if you know any helpful other issues reports. Thanks a lot.
The text was updated successfully, but these errors were encountered: