Robotics StackExchange | Archived questions

start rviz2 failed in the docker container for jetson agx xavier

create a container,as follows:

docker run -it --rm \ --user=$(id -u $USER):$(id -g $USER) \ --workdir="/home/$USER/" \ --volume="/home/$USER:/home/$USER" \ --volume="/etc/group:/etc/group:ro" \ --volume="/etc/passwd:/etc/passwd:ro" \ --volume="/etc/shadow:/etc/shadow:ro" \ --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \ --volume="/dev/shm:/dev/shm" \ --net=host \ --gpus=all \ -e DISPLAY \ -e QTX11NOMITSHM=1 \ -e XAUTHORITY=/tmp/.docker.xauth \ -v /tmp/.docker.xauth:/tmp/.docker.xauth \ -v /tmp/.X11-unix:/tmp/.X11-unix \ imagename

after entering the container ,run rviz2 in a terminator,there is a error that:

QStandardPaths: XDGRUNTIMEDIR not set, defaulting to '/tmp/runtime-cookoo' qt.glx: qglxfindConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) No XVisualInfo for format QSurfaceFormat(version 2.0, options QFlagsQSurfaceFormat::FormatOption(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile) Falling back to using screens rootvisual. Segmentation fault (core dumped)

How should i solved it?

Asked by rcj on 2021-11-17 02:16:12 UTC

Comments

Did you solve this? I have the same issue

Asked by Jenzaah on 2022-01-03 03:37:05 UTC

I have the same issue

Asked by AGE_CPH on 2022-02-03 06:24:52 UTC

Answers

I had the same issue. If you adding the user to a video group may solve this issue.

in container:

$ sudo adduser <Username> video

another terminal:

$ docker run -it <container_name> /bin/bash
$ source /opt/ros/<dist>/setup.bash
$ rviz2

Asked by shingai on 2022-09-06 03:01:23 UTC

Comments