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 #23

Open
sabinakaminska95 opened this issue Nov 20, 2023 · 2 comments
Open

RuntimeError: Failed to initialize OpenGL #23

sabinakaminska95 opened this issue Nov 20, 2023 · 2 comments

Comments

@sabinakaminska95
Copy link

Does anyone know how to solve this problem?

(mujoco_py) xxxx@XXXX:~/.mujoco/mujoco-py/examples/MuJoCo_RL_UR5$ python3 example_agent.py
Creating window glfw
Created new control group 'Arm'.
Created new control group 'Gripper'.
Model timestep: 0.002
Set number of frames skipped: 1
dt = timestep * frame_skip: 0.002
Frames per second = 1/dt: 500
Actionspace: MultiDiscrete([40000 6])
Observation space: Dict(rgb:Box(200, 200, 3), depth:Box(200, 200))
Found 1 GPUs for rendering. Using device 0.
Could not make EGL context current
Traceback (most recent call last):
File "example_agent.py", line 16, in
obs = env.reset()
File "/home/xxxx/anaconda3/envs/mujoco_py/lib/python3.8/site-packages/gym/envs/mujoco/mujoco_env.py", line 108, in reset
ob = self.reset_model()
File "/home/xxxx/.mujoco/mujoco-py/examples/MuJoCo_RL_UR5/gym_grasper/envs/GraspingEnv.py", line 477, in reset_model
return self.get_observation(show=self.show_observations)
File "/home/xxxx/.mujoco/mujoco-py/examples/MuJoCo_RL_UR5/gym_grasper/envs/GraspingEnv.py", line 398, in get_observation
rgb, depth = self.controller.get_image_data(
File "/home/xxxx/.mujoco/mujoco-py/examples/MuJoCo_RL_UR5/gym_grasper/controller/MujocoController.py", line 719, in get_image_data
self.sim.render(width=width, height=height, camera_name=camera, depth=True)
File "mjsim.pyx", line 156, in mujoco_py.cymj.MjSim.render
File "mjsim.pyx", line 158, in mujoco_py.cymj.MjSim.render
File "mjrendercontext.pyx", line 46, in mujoco_py.cymj.MjRenderContext.init
File "mjrendercontext.pyx", line 114, in mujoco_py.cymj.MjRenderContext._setup_opengl_context
File "opengl_context.pyx", line 130, in mujoco_py.cymj.OffscreenOpenGLContext.init
RuntimeError: Failed to initialize OpenGL

@lllwin
Copy link

lllwin commented Apr 8, 2024

I met the same problem. Have you solved this?

1 similar comment
@QWelkin
Copy link

QWelkin commented Apr 10, 2024

I met the same problem. Have you solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants