We have to create a Pyglet window since that's how we get the actual image
frames.
I would take a patch which starts with the window having show=False and
then setting the window to show if render is called. I think but am not
certain this would work.
On Sunday, September 18, 2016, Danijar Hafner [email protected]
wrote:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/openai/gym/issues/347, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAM7kXu2iPjN0FYlGNvBgIg8ELgFr0DNks5qrOfKgaJpZM4J_1Ax
.
Sent from mobile
Why do we even draw to a window directly? Shouldn't there be an image object that we can display inside a window object if rendering is enabled? I'm not familiar with Pyglet but that seems to be how most windowing toolkits work.
Right now it's done purely for convenience. I mostly have a button-mashing
exposure to OpenGL at this point, my recollection is you can only read from
a set of special buffers but I would expect windowless rendering can be
done.
I haven't found the current behavior inconvenient enough to change though
-- any reason you do?
On Sunday, September 18, 2016, Danijar Hafner [email protected]
wrote:
Why do we even render to a window directly? Shouldn't there be an image
object that can be drawn onto a window object if rendering is enabled? I'm
not familiar with Pyglet but that's how most windowing toolkits work.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openai/gym/issues/347#issuecomment-247831798, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAM7kdfRxFK0cMgg8ckhX5jSofOPX_Pwks5qrOnegaJpZM4J_1Ax
.
Sent from mobile
Yes, I'm using the classic control envs because they are fast and I can run ten experiments in parallel. When I try a few new configurations, a couple of windows pop up. I don't care about the videos right away, but rather look at them later as a way of debugging my algorithms. Moreover, I suspect that recording videos on a server (without X installed) wouldn't work. Haven't tried that, but I can do so in a few days.
Got it. You'll definitely need to run xvfb to make server recording work.
(You'll need it to even import Pyglet.)
I think it's probably worth doing the "render with show=False" tweak, but
probably not worth doing much from there. Let me know if you're down for it!
On Sunday, September 18, 2016, Danijar Hafner <[email protected] Yes, I'm using the classic control envs because they are fast and I can — Sent from mobile
run ten experiments in parallel. When I try a few new configurations, a
couple of windows pop up. I don't care about the videos right away, but
rather look at them later as a way of debugging my algorithms. Moreover, I
suspect that recording videos on a server (without X installed) wouldn't
work. Haven't tried that, but I can do so in a few days.
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openai/gym/issues/347#issuecomment-247835086, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAM7kWWNVYFQNw590iUx5RC2K8gEau_zks5qrPo7gaJpZM4J_1Ax
.
I have a patch that renders to a hidden window. However, how can we distinct whether the recorder called render() and not the users? I can only see adding a visible=True parameter to render() that the recorder disables but that would require adjusting all environments, external pull envs.
Have any of you been successful with getting render() working through an AWS server?
I have tried using xvfb, but keep getting GLXInfoException: pyglet requires an X server with GLX
Getting the RGB image would be sufficient for me
You do need an X server with GLX. You can test with glxinfo or glxgears. See discussion here for how to install one. https://github.com/openai/gym/issues/247.
Is this getting incorporated anytime soon? Wonder where does it stand?
Same problem here. Hope this can be tweaked soon
@gdb?
Any news on this @gdb ?
I'd be glad to help, if you could point me in the right direction. I'm experiencing some trouble getting A3C to work with CartPole-v0 as calling render terminates the process (I guess due to the fact that OSX restricts UI operations to be called from subprocesses. Being able to generate an rgb array without actually rendering the window should solve this - afaik.
@Faur:
If you merely want to get render() to work on AWS to get an rgb array, simply try this:
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
I'm currently using it with travis ci and it works like a breeze 🎉
@denizs I know this issue is almost two years old but I'll try my luck. Your comment perfectly describes my goal (just getting the rgb_array) and I can't find anything else this concrete. I tried you fix for getting render() to work on a server to get an rgb array but with no success.
I started off with the following error:
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
and after running the two commands you suggested I run into this:
pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX
As soon as i call env.render() on the server.
(.venv) arond@r30n1:~/breaking_atari$ glxinfo
name of display: :99.0
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Error: couldn't find RGB GLX visual or fbconfig
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
Xlib: extension "GLX" missing on display ":99.0".
(.venv) arond@r30n1:~/breaking_atari$ glxgears
Xlib: extension "GLX" missing on display ":99.0".
Error: couldn't get an RGB, Double-buffered visual
(.venv) arond@r30n1:~/breaking_atari$
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Any news on this @gdb ?
I'd be glad to help, if you could point me in the right direction. I'm experiencing some trouble getting A3C to work with CartPole-v0 as calling
renderterminates the process (I guess due to the fact that OSX restricts UI operations to be called from subprocesses. Being able to generate an rgb array without actually rendering the window should solve this - afaik.@Faur:
If you merely want to get
render()to work on AWS to get an rgb array, simply try this:I'm currently using it with travis ci and it works like a breeze 🎉