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

Failed to run RViz and Gazebo (libgl error) #33

Open
hliyanto opened this issue Oct 30, 2019 · 4 comments
Open

Failed to run RViz and Gazebo (libgl error) #33

hliyanto opened this issue Oct 30, 2019 · 4 comments

Comments

@hliyanto
Copy link

I tried to run the docker image via rocker using the following command:

rocker --x11 rosswg/turtlebot3_demo:roscon19 "byobu -f configs/unsecure.conf attach"

and got the following error in gazebo:

[gazebo-1] libGL error: No matching fbConfigs or visuals found │
[gazebo-1] libGL error: failed to load driver: swrast │
[gazebo-1] X Error of failed request: GLXBadContext │
[gazebo-1] Major opcode of failed request: 152 (GLX) │
[gazebo-1] Minor opcode of failed request: 6 (X_GLXIsDirect) │
[gazebo-1] Serial number of failed request: 41 │
[gazebo-1] Current serial number in output stream: 40 │
[ERROR] [gazebo-1]: process has died [pid 19884, exit code 255, cmd 'gazebo --verbose /opt/tb3_overlay_ws/│
install/turtlebot3_gazebo/share/turtlebot3_gazebo/worlds/turtlebot3_worlds/burger.model -s libgazebo_ros_i│
nit.so'].

and RViz:

[rviz2-9] [ERROR] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GL│
XContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-pre│
fix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable│
to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-│
6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/│
GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range fo│
r operation) │
[rviz2-9] [ERROR] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GL│
XContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-pre│
fix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable│
to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-│
6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/│
GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range fo│
r operation) │
[rviz2-9] [ERROR] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GL│
XContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-pre│
fix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable│
to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-│
6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/├────────────────────────────────────────────────────────────────────────────────────────────────────────
GLX/OgreGLXContext.cpp (line 60) │configs/navigate_to_pose.shroot@f2d309f1e3be:/opt# configs/navigate_to_pose.sh
[rviz2-9] [ERROR] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range fo│
r operation) │
[rviz2-9] [ERROR] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GL│
XContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-pre│
fix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable│
to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-│
6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/│
GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: Failed to create an OpenGL context. BadValue (integer parameter out of range fo│
r operation) │
[rviz2-9] [ERROR] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext in GLXContext::GL│
XContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-pre│
fix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Unable│
to create a suitable GLXContext in GLXContext::GLXContext at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-│
6.1.3/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/RenderSystems/GLSupport/src/│
GLX/OgreGLXContext.cpp (line 60) │
[rviz2-9] [ERROR] [rviz2]: Unable to create the rendering window after 100 tries │
[rviz2-9] terminate called after throwing an instance of 'std::runtime_error' │
[rviz2-9] what(): Unable to create the rendering window after 100 tries │
[ERROR] [rviz2-9]: process has died [pid 20012, exit code -6, cmd '/opt/ros/dashing/lib/rviz2/rviz2 -d /op│
t/ros/dashing/share/nav2_bringup/launch/nav2_default_view.rviz __node:=rviz2 __params:=/tmp/launch_params_│
4j955z3r'].

@charvi-077
Copy link

How did you solved this error ? I am facing the same error

@SebastianGrans
Copy link

@charvi-077: I had the error Failed to create an OpenGL context. BadValue when I tried starting RViz. Rebooting solved it for me 🤷

@shulanbushangshu
Copy link

yes ,Rebooting solved it for me too

@jakobhyke
Copy link

Did not solve it for me unfortunately
I have no problem displaying the driver in the docker image


root@9a071fd4580d:~/gazebo_ws# nvidia-smi
Thu Jun  6 15:47:12 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.171.04             Driver Version: 535.171.04   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA T550 Laptop GPU         Off | 00000000:03:00.0 Off |                  N/A |
| N/A   44C    P0               9W /  30W |      5MiB /  4096MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
+---------------------------------------------------------------------------------------+

But running rviz or any other app that can use GPU leads to errors:

Failed to create an OpenGL context. BadValue (integer parameter out of range for operation)
[ERROR] [1717681686.627781526] [rviz2]: RenderingAPIException: Unable to create a suitable GLXContext...

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

5 participants