Reputation: 9982
I am trying to run turtlebot 3 from inside a Docker container that I built based on the ros:noetic container.
After overcoming several problems when trying to install turtlebot3 for noetic, I could finally install it. However when I run it:
#roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
I got the following error:
[gazebo-2] process has died [pid 14517, exit code 255, cmd /opt/ros/noetic/lib/gazebo_ros/gzserver -e ode /root/second_ws/src/turtlebot3_simulations/turtlebot3_gazebo/worlds/empty.world __name:=gazebo __log:=/root/.ros/log/b86e9bd6-26ee-11eb-884e-0242ac110002/gazebo-2.log].
log file: /root/.ros/log/b86e9bd6-26ee-11eb-884e-0242ac110002/gazebo-2*.log
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: GLXBadContext
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 44
Current serial number in output stream: 43
I would like to ask some help on understanding what is failing here. I see a problem with libGL. I read somewhere that this deals somehow with the Nvidia GPU? I am confused on what to do from here.
Upvotes: 2
Views: 1913
Reputation: 11
When you run the launch file it is telling gazebo to run both gzserver (pyhsics engine) and gzclient (the GUI).
To use GUI's from docker containers you need to explicitley connect to your host machines X11 socket - as descibed here https://wiki.ros.org/docker/Tutorials/GUI
Alternativley, if you dont want to do that you could modify your launch file to run using the gzserver command instead, which would run the simulation without the GUI.
Upvotes: 1