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

STL meshes can't be rendered using WSL2 ROS Galactic Rviz2 #804

Closed
chenjunnn opened this issue Nov 27, 2021 · 13 comments
Closed

STL meshes can't be rendered using WSL2 ROS Galactic Rviz2 #804

chenjunnn opened this issue Nov 27, 2021 · 13 comments
Labels

Comments

@chenjunnn
Copy link

chenjunnn commented Nov 27, 2021

rviz2 does not have any error outputs.
image

can't see robot model(stl file) in rviz2, the one can be seen is the collision box:
image

when using real ubuntu 20.04 in NUC, it can be shown correctly:
image

@iuhilnehc-ynos
Copy link

There is a robot model in the pic.
image

but I know that it might be not what you want, could you check your robot model description file? (or you can upload it if someone wants to help.)

@chenjunnn
Copy link
Author

chenjunnn commented Nov 29, 2021

@iuhilnehc-ynos This is the collision, not the visual mesh model. Sorry that I forgot to update the expected behavior. And I am quite sure that it is not the urdf problem.

@iuhilnehc-ynos
Copy link

@sink0918

I'm not familiar with WSL2. After installing it (Ubuntu20, WSL2, galactic), I tried to( use native opengl also) use rviz2 to show a demo model (without using stl), and it seems to work fine.

image

Could you confirm whether it can work in your environment? If yes, I'll continue to use another robot urdf containing stl to debug the rviz2.

@chenjunnn
Copy link
Author

chenjunnn commented Nov 30, 2021

Basic shapes work fine:
image

The problem seems to be meshes using stl or dae can not be rendered in rviz2 using WSL2.

By the way, I'm using WSLg to use rviz2, not X11-forwarding.

And I also tried realsense-description, the stl mesh can't be seen either.

@iuhilnehc-ynos
Copy link

iuhilnehc-ynos commented Nov 30, 2021

@sink0918

Thank you for your information, but I'm sorry that I can't reproduce it. (I use windows10 so that I can't use WSLg.)

image

image

@chenjunnn
Copy link
Author

chenjunnn commented Dec 1, 2021

image

I have tested it using X11-forwarding, but the mesh still can't be rendered😢

Here is some infos of my WSL2:

  • Windows Build Number
    Microsoft Windows [版本 10.0.22000.194]

  • WSL Version
    WSL 2

  • Kernel Version
    5.10.16

@chenjunnn chenjunnn changed the title Can't see robot model using WSL2 ROS Galactic STL meshes can't be rendered using WSL2 ROS Galactic Rviz2 Dec 1, 2021
@chenjunnn
Copy link
Author

I have also reported this issue to microsoft/WSL, here is the link: microsoft/WSL#7788

@dpiet
Copy link

dpiet commented Dec 21, 2021

I can confirm experiencing this issue as well.

@ravnicas
Copy link

+1 here, tried on Win11 with iGPU and also nVidia GPU systems.

@dpiet
Copy link

dpiet commented Apr 9, 2022

This appears to still be an issue in rolling, rviz2 v9.1.1. Any ideas what could be the culprit?
It appears to be an issue with WSLg and/or MESA as discussed here: microsoft/wslg#492
Although not ideal, one workaround is to force software rendering by setting env variable LIBGL_ALWAYS_SOFTWARE=1
Hope that helps others.

@junaidamin
Copy link

junaidamin commented Feb 24, 2023

Did anyone find a solution to this issue? I am using ROS2 foxy on WSL2 Ubuntu 20.04, and could not see a rendering of either the dae file or stl files. There are no related errors in the terminal. I'm following the tutorial on this page: https://docs.ros.org/en/foxy/Tutorials/Intermediate/URDF/Building-a-Visual-Robot-Model-with-URDF-from-Scratch.html , where grippers are expected to show up at the end of the red cylinder. Below is my output on RVIZ2:
image

@junaidamin
Copy link

Also, does anyone know why the sphere (head of robot) surface isn't smooth?

@chenjunnn
Copy link
Author

It works well with ROS2 Humble with WSL Ubuntu 22.04 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants