osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
557 stars 170 forks source link

Black screen in Rviz and Gazebo since last update #662

Closed TipluJacob closed 1 year ago

TipluJacob commented 1 year ago

We are using the ros:humble image in our docker, pass the display to the docker (display and X11-unix) and use Rviz 2 and Ignition Gazebo (garden) in the docker. This used to work perfectly fine until the last docker update, which happened 5 days ago. Although the application window of rviz and gazebo is still opening, the screen within that window is only black.

As a result, we tried to do some debugging to find the problem. Rviz and gazebo are using OpenGL and do not work but rqt works, which doesn't use OpenGL. So we tried to evaluate the problem a bit more and used glmark2, which crashes instantly. The benchmark also displays mesa version, which is 22.x We had an older version of our docker, where we also tried the same and glmark2 reported mesa 21 and ran just fine.

We hope someone can do something with the given information and help us get graphical applications back running.

EDIT: We are running on linux

ruffsl commented 1 year ago

Could you give a some more details? E.g. about the container images used (specified using SHA IDs), and the host running the docker engine (OS, distro, versions, Nvidia/AMD/Intel GPU + drivers). The less you specify, the less we are able to help.

https://stackoverflow.com/questions/32046334/where-can-i-find-the-sha256-code-of-a-docker-image

TipluJacob commented 1 year ago

We are running the docker engine on Ubuntu 22.04.1 LTS, GPU is a NVIDIA GeForce RTX 3060 with the driver Version 510.108.03, CPU is a AMD R9 5950X, we have 32GB RAM.

We are using the following dockerfile (dont forget to remove .txt if you want to build it): Dockerfile.txt

Where the base image ros:humble has the following SHA ID: sha256:68d0f1cb0624c2becba5d4fe6d007c4fd99a992bbc2fa33dc59e4cfdf255db73

We are building and running the docker with: docker build -t rviz . docker run -it --name=rviz_test -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY rviz

Within the docker we change the user to the user ubuntu via: su ubuntu

Then just try to open rvizz: rviz2

And the application window looks like this: image

jkoubs commented 1 year ago

@TipluJacob any news on this ? I have the same issue when trying to launch Gazebo and Rviz. The window opens but the screen is black.

TipluJacob commented 1 year ago

Not really. For some use cases we found the workaround to pass the GPU into the docker, which is fine for some simulation applications, but not if we want to display things in Rviz on our robot. Therefore this issue is still in big interest from our side.

ChaimLukasMaier-FDTech commented 1 year ago

We ran into the same issue, and managed to solve it following this answer:

https://github.com/ros2/rviz/issues/948#issuecomment-1427569107

jkoubs commented 1 year ago

Yes thank you @ChaimLukasMaier-FDTech. I can confirm that it now works by upgrading the mesa package with the binaries provided by the kisak/kisak-mesa ppa:

add-apt-repository ppa:kisak/kisak-mesa
apt update
apt upgrade
abolfazlmohammadpour commented 3 months ago

Hello I Have A Problem Same as You When I Ran rviz2 in ros2 I Just See The Black Screen!!!!!!!