PaulDanielML / MuJoCo_RL_UR5

A MuJoCo/Gym environment for robot control using Reinforcement Learning. The task of agents in this environment is pixel-wise prediction of grasp success chances.
MIT License
413 stars 54 forks source link

Failed to initialize OpenGL #18

Closed HimGautam closed 1 year ago

HimGautam commented 1 year ago

Hi @PaulDanielML , I am trying to use your simulator in a project related to imitation learning. I installed the simulator according to instructions. Then I am trying to run example_agent.py but its giving me the error mentioned below.

File "/home/himanshu/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=False)
  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
DrizzlyDreamer commented 1 year ago

I also encountered this problem

lululovecode commented 1 year ago

me too. Does anyone know how to solve this error? Thanks a lot!

HimGautam commented 1 year ago

Sorry but I was not able to find out whats wrong. I left the project I was working on because of this.

TheQuyen97ht commented 1 year ago

Anyone has solution to fix it ? I'm trying reinstall mujoco-py, also s=switching additional Nvidia Drivers but it seems doesn't work at all ?