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

RuntimeError: Failed to initialize OpenGL #2299

Open
2 tasks done
MrHuangWenjie opened this issue Dec 18, 2024 · 0 comments
Open
2 tasks done

RuntimeError: Failed to initialize OpenGL #2299

MrHuangWenjie opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MrHuangWenjie
Copy link

Intro

Hi!

I am new to Mujoco. I have installed mujoco_py and mujoco simulator following the instructions here.

After installation, I have changed my ~/.bashrc by adding
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/wenjie/.mujoco/mujoco210/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

Then, I was testing the installation and configuration, running code:

`import mujoco_py
import mujoco
import os

mj_path = mujoco_py.utils.discover_mujoco()
print(mj_path)
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = mujoco_py.load_model_from_path(xml_path)
sim = mujoco_py.MjSim(model)
viewer = mujoco_py.MjViewer(sim)
print(sim.data.qpos)
sim.step()
print(sim.data.qpos)
sim.render()`

Which threw me a Runtime Error. The terminal output is quoted below:

image

It is running on Ubuntu 22.04, Python 3.9. I appreciate it a lot if someone could provide some clues on it!

My setup

MuJoCo 210, Python 3.9, Ubuntu 22.04

What's happening? What did you expect?

Nah

Steps for reproduction

  1. install MuJoCo_py and MuJoCo
  2. Run the quoted code

Minimal model for reproduction

Nah

Code required for reproduction

import mujoco_py
import mujoco
import os

mj_path = mujoco_py.utils.discover_mujoco()
print(mj_path)
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = mujoco_py.load_model_from_path(xml_path)
sim = mujoco_py.MjSim(model)
viewer = mujoco_py.MjViewer(sim)
print(sim.data.qpos)
sim.step()
print(sim.data.qpos)
sim.render()

Confirmations

@MrHuangWenjie MrHuangWenjie added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant