ros-swg / turtlebot3_demo

Repository to build and test Turtlebot3 packages
Apache License 2.0
20 stars 6 forks source link

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

Open hliyanto opened 4 years ago

hliyanto commented 4 years ago

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/launchparams│ 4j955z3r'].

charvi-077 commented 4 years ago

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

SebastianGrans commented 4 years ago

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

shulanbushangshu commented 2 years ago

yes ,Rebooting solved it for me too

jakobhyke commented 1 month ago

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...