ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
844 stars 463 forks source link

Meshes do not display with WSLg on NVIDIA graphics #1748

Open jorolf opened 2 years ago

jorolf commented 2 years ago

The RobotModel is invisible even though there are no visible errors: RobotModel Adding a TF display shows the frames of the robot correctly: TF I tried both the panda and the fanuc robot and neither displayed the robot mesh

Your environment

How to reproduce

Setup Ubuntu VM: Inside Powershell or Cmd run

wsl --install -d Ubuntu-20.04

and follow the instructions.

After installation run sudo apt update and sudo apt upgrade. Then follow this tutorial until step 1.4 where ros-noetic-desktop-full should be installed. Finally install ros-noetic-moveit and ros-noetic-moveit-resources and run:

roslaunch moveit_resources_panda_moveit_config test_environment.launch &
rviz

It used to work a few weeks ago, I'm not exactly sure what broke it. (Maybe apt upgrade?) It could be something related to the shader considering that it's a rendering only bug? I'm also not sure if this is a local problem since I only have a single Windows 11 machine to test this on. (which supports WSLg)

If there's anything I have missed or I should try let me know.

rhaschke commented 2 years ago

I can confirm this issue on another WSLg installation, also employing an NVIDIA card. I filed an issue upstream: https://github.com/microsoft/wslg/issues/744

rhaschke commented 2 years ago

A laptop with an Intel GPU only, doesn't exhibit this issue. It seems to be related to Microsoft's D3D12 renderer.

rhaschke commented 2 years ago

As a workaround, you can set the environment variable LIBGL_ALWAYS_SOFTWARE=true, thus disabling accelerated rendering and instead enabling software rendering via llvmpipe.