Open
Description
Just trying to get to know mujoco-py wrappers. But I do face the following issue.
from mujoco_py import mjviewer, mjcore
from mujoco_py import mjtypes
from mujoco_py import glfw
width = 1500
height = 1500
viewer = mjviewer.MjViewer(visible=True, init_width=width, init_height=height)
viewer.start()
model = mjcore.MjModel('/home/mjm/Documents/Python/Mujoco/cartpole.xml')
viewer.set_model(model)
(data, width, height) = viewer.get_image()
#viewer.finish()
#viewer = None
When I do this, the "Simulate" window pops up and freezes. Now the only way to stop it is by killing it.
It is unresponsive and does not display anything. Along with the python console also crashes and would have to reopen again.
Once I kill it, this is the error that I get in the terminal:
XIO: fatal IO error 0 (Success) on X server ":0"
after 212 requests (212 known processed) with 39 events remaining.
I am running Ubuntu 14.04 64bit on Macbook pro with Nvdia graphics card. My environment variable $DISPLAY:=0
I found a similar error in stackoverflow
Any idea why this happens? Is there a work around to it?
Any helpful suggestion is appreciated.