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

libGL error: No matching fbConfigs or visuals found when running make px4_sitl gazebo #273

Open
gu-ramosp opened this issue Jul 14, 2020 · 1 comment

Comments

@gu-ramosp
Copy link

Hi, trying to use the px4io/px4-dev-ros-melodic container to simulate a quad-copter with the following input:

make px4_sitl gazebo

I get the following output:

...
empty world, setting empty.world as default
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: 151 (GLX)
Minor opcode of failed request: 6 (X_GLXIsDirect)
Serial number of failed request: 38
Current serial number in output stream: 37

I was running the container with the command described in the README

docker run -it --rm
-v <local_src>:/home/user/Firmware:rw
-v /tmp/.X11-unix:/tmp/.X11-unix:ro
-e DISPLAY=${DISPLAY}
-e LOCAL_USER_ID="$(id -u)"
--name=container_name px4io/px4-dev-ros-melodic/bin/bash

I'm using nvdia-driver-440 on my machine. Am i missing something?

@gu-ramosp
Copy link
Author

Managed to run the simulation after installing the same nvidia drivers i have on my computer inside the container.

Creating the container:

docker run -it \
--privileged \
--user="root" \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e DISPLAY=${DISPLAY} \
-e LOCAL_USER_ID="$(id -u)" \
--name=container_name px4io/px4-dev-simulation-bionic /bin/bash

exiting the container and enabling the xhost

xhost + \

executing the container as root to install the nvdia drivers:

docker start container_name
docker exec --user="root" -e DISPLAY=${DISPLAY} -e LOCAL_USER_ID="$(id -u)" -it container_name /bin/bash

inside the container:

apt install nvidia-driver-440

after that the simulation started normally.

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

1 participant