-
Notifications
You must be signed in to change notification settings - Fork 827
Open
Description
Describe the bug
Rendering with off screen fails to initialize.
To Reproduce
import mujoco_py
model = """
<mujoco model="cartpole">
<worldbody>
<geom name="floor" pos="0 0 -3.0" size="40 40 40" type="plane"/>
</worldbody>
</mujoco>
"""
model = mujoco_py.load_model_from_xml(model)
sim = mujoco_py.MjSim(model)
mujoco_py.MjRenderContextOffscreen(sim, device_id=0)
Error Messages
ERROR: GLEW initalization error: Missing GL version
It seems like the error occurs at the first line of this function (mjr_makeContext(self._model_ptr, &self._con, mjFONTSCALE_150)
)
mujoco-py/mujoco_py/mjrendercontext.pyx
Lines 83 to 93 in 1aeb02e
def _set_mujoco_buffers(self): | |
mjr_makeContext(self._model_ptr, &self._con, mjFONTSCALE_150) | |
if self.offscreen: | |
mjr_setBuffer(mjFB_OFFSCREEN, &self._con); | |
if self._con.currentBuffer != mjFB_OFFSCREEN: | |
raise RuntimeError('Offscreen rendering not supported') | |
else: | |
mjr_setBuffer(mjFB_WINDOW, &self._con); | |
if self._con.currentBuffer != mjFB_WINDOW: | |
raise RuntimeError('Window rendering not supported') | |
self.con = WrapMjrContext(&self._con) |
(found by print debug)
Furthermore when I add "None" argument at mysterious position
mujoco_py.MjRenderContextOffscreen(sim, None,device_id=0)
images are correctly rendered, though black winodow appears.
Desktop (please complete the following information):
- OS: [Ubuntu18.04 ]
- Python Version [3.7.3]
- Mujoco Version [2.0.0]
- mujoco-py version [2.0.2.2]
Environment
- output of:
echo $LD_LIBRARY_PATH
/home/user/.mujoco/mujoco200/bin
Additional context
OpenGL version: 4.6.0
Nvidia Driver: 418.67
Metadata
Metadata
Assignees
Labels
No labels