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

Lidar simulation is not working in WSL2 #115

Closed
xmfcx opened this issue Jul 11, 2024 · 19 comments
Closed

Lidar simulation is not working in WSL2 #115

xmfcx opened this issue Jul 11, 2024 · 19 comments
Labels
type:bug Software flaws or errors.

Comments

@xmfcx
Copy link

xmfcx commented Jul 11, 2024

Background

Problem

All CUDA, TensorRT, cuDNN versions are correct, dds settings are done, correct version of autoware is compiled etc.

But on AWSIM Labs side, there is no lidar simulation, no red point cloud visualization, lidar topics are empty.

Report

... some lidar are missing....
and the pointcloud_raw_ex

PXL_20240711_095441728

Originally posted by @sasa42 in #87 (comment)

@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

@msz-rai do you have any experience running the https://github.com/RobotecAI/RobotecGPULidar on WSL2?

@xmfcx xmfcx added the type:bug Software flaws or errors. label Jul 11, 2024
@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

@sasa42 could you also share the nvidia-smi results with us?

Someone said:

don’t install the nvidia driver, there’s no real nvidia gpu available in WSL2.

my output:

mfc@mfc-leo:~$ nvidia-smi
Thu Jul 11 13:32:27 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3080        Off | 00000000:2D:00.0  On |                  N/A |
| 53%   75C    P2             148W / 320W |   3447MiB / 10240MiB |     23%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1583      G   /usr/lib/xorg/Xorg                          838MiB |
|    0   N/A  N/A      5867      G   ...yOnDemand --variations-seed-version       42MiB |
|    0   N/A  N/A      6345      G   ...,262144 --variations-seed-version=1      226MiB |
|    0   N/A  N/A   1131802      G   ...erProcess --variations-seed-version       23MiB |
|    0   N/A  N/A   1164733      G   ...erProcess --variations-seed-version       65MiB |
|    0   N/A  N/A   2589250    C+G   ./awsim_labs_v1.1.1/awsim_labs.x86_64      2198MiB |
|    0   N/A  N/A   3169233      G   ...seed-version=20240708-050118.992000       15MiB |
+---------------------------------------------------------------------------------------+

@sasa42
Copy link

sasa42 commented Jul 11, 2024

this is the Unity PlayerLog....

PXL_20240711_104909905
PXL_20240711_105052690

@mozhoku
Copy link
Collaborator

mozhoku commented Jul 11, 2024

@sasa42 You shouldn't source Ros2 when launching AWSIM. That's the reason why lidars are not working.

Please comment out sourcing lines from the .bashrc if you've added there.

Like this:
image

@sasa42
Copy link

sasa42 commented Jul 11, 2024

...uh.
What dou yo mean with source ros2.

I thsi case i only started ...v1.1.1/
./awsim_labs.x86_64

I deleted the log files several times and redid the awsim start.

@mozhoku
Copy link
Collaborator

mozhoku commented Jul 11, 2024

The errors you've posted says that you've sourced Ros2.
Please check your .bashrc file for this line:
source /opt/ros/humble/setup.bash and comment it out.
What this line does is when you open a fresh terminal it sources ros2 right away. With this disabled you will have to do it manually when you need it.

Also please launch the awsim from a fresh separate terminal without sourcing the ros2.

@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

.bashrc file is located at the home directory.

you can open it with:

sudo apt install gedit
gedit ~/.bashrc

And modify the file.

@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

But you have other Nvidia Optix related errors, this still won't work.

Your only option is to dual boot with Ubuntu, run both AWSIM Labs and Autoware in native ubuntu 22.04

@sasa42
Copy link

sasa42 commented Jul 11, 2024

... this is the log after #source....
and restart in a new terminal.

PXL_20240711_114221752

@sasa42
Copy link

sasa42 commented Jul 11, 2024

needed configs are...

Autoware WSL - AWSIM WIN 1PC
Autoware WSL - AWSIM WSL 1PC

Autoware WSL - AWSIM WIN 2PC
Autoware Native - AWSIM WIN 2PC
Autoware Native - AWSIM MAC 2PC
in this order... .)

@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

For me it says:

RGL mesh source: RegularMeshesAndSkinnedMeshes
[Thu Jul 11 14:47:59 2024]: Logging configured: level=info, file=(disabled), stdout=true
[14:47:59][    13 us][info]: RGL Version 0.16.2 branch=develop commitSHA1=8eee9475ced107603063533e6333498252dd0ba8
[14:47:59][ 18572 us][info]: Running on GPU: NVIDIA GeForce RTX 3080
[14:47:59][    23 us][info]: Built against OptiX SDK version: 7.2.0
[14:47:59][     4 us][info]: Built against OptiX ABI version: 41
[14:47:59][     4 us][info]: Built against CUDA Toolkit version: 11.7
[14:47:59][     9 us][info]: Installed CUDA runtime version: 11.7
[14:47:59][     4 us][info]: Installed CUDA driver version: 12.3
[14:47:59][ 89019 us][info]: Installed NVidia kernel driver version: 545.29.06

Full /home/mfc/.config/unity3d/AWF/AWSIM Labs/Player.log: https://gist.github.com/xmfcx/a1e70ac4e0c00f980f5c207a64726ab2

AWSIM Labs or AWSIM probably won't run on WSL2. @lchojnack @WJaworskiRobotec @msz-rai are from Robotec and their team developed the Lidar Unity simulator. Maybe they can help but seeing awsim also slow, I wouldn't recommend it.

@prybicki
Copy link

@xmfcx By looking on the errors, my quick intuition is that either CUDA driver support is not full on WSL2, or implicit initialization behavior of the CUDA driver is different on WSL2 than everywhere else and it doesn't get automatically initialized before constructing OptiX context. If you're willing to recompile RGL and debug, the relevant place to look is here.

Maybe they can help but seeing awsim also slow, I wouldn't recommend it.

Would you mind expanding your thought?

@sasa42
Copy link

sasa42 commented Jul 11, 2024

Thanks for the gist to compare.
I have to solve it so i will do an deepdive.

Was quite a journey to get it to this point.

1.install WSL2 with Ubuntu

  1. Install WSLg

  2. set up Hardware-accelerated vulkan in WSL2 ·
    sudo add-apt-repository ppa:kisak/kisak-mesa
    sudo apt update
    sudo apt upgrade

  3. AWSIM Labs Quickstart setup

to get
Autoware WSL - AWSIM WSL 1PC

@sasa42
Copy link

sasa42 commented Jul 11, 2024

There are some test on 4 pages from last year....
https://www.phoronix.com/review/windows11-wsl2-zen4/2

the WSL2 vs native performance doesn t look so bad.

There was also an CUDA GPU article. I post it when i refound it.

@sasa42
Copy link

sasa42 commented Jul 11, 2024

@sasa42 could you also share the nvidia-smi results with us?

Someone said:

don’t install the nvidia driver, there’s no real nvidia gpu available in WSL2.

my output:

mfc@mfc-leo:~$ nvidia-smi
Thu Jul 11 13:32:27 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3080        Off | 00000000:2D:00.0  On |                  N/A |
| 53%   75C    P2             148W / 320W |   3447MiB / 10240MiB |     23%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      1583      G   /usr/lib/xorg/Xorg                          838MiB |
|    0   N/A  N/A      5867      G   ...yOnDemand --variations-seed-version       42MiB |
|    0   N/A  N/A      6345      G   ...,262144 --variations-seed-version=1      226MiB |
|    0   N/A  N/A   1131802      G   ...erProcess --variations-seed-version       23MiB |
|    0   N/A  N/A   1164733      G   ...erProcess --variations-seed-version       65MiB |
|    0   N/A  N/A   2589250    C+G   ./awsim_labs_v1.1.1/awsim_labs.x86_64      2198MiB |
|    0   N/A  N/A   3169233      G   ...seed-version=20240708-050118.992000       15MiB |
+---------------------------------------------------------------------------------------+

On the left i have some detailed debug output...

(https://github.com/autowarefoundation/AWSIM-Labs/assets/1211326/1b06fdc4-380a-4861-8048-593c5baab9c2)

Do you need the nvidia-smi, too

@xmfcx
Copy link
Author

xmfcx commented Jul 11, 2024

@prybicki

Maybe they can help but seeing awsim also slow, I wouldn't recommend it.

Would you mind expanding your thought?

He has a pc with high end parts: 7945HX cpu and rtx 4090 yet he has very low framerates.
I've assumed this was due to running in WSL2, and since it is running slow, maybe it will keep running slow even if lidar simulation is fixed. So this is why I don't recommend running AWSIM in WSL2.

Maybe we should fix the problem of AWSIM Labs not running on windows.

Then he could run autoware on wsl2 and awsim labs on native windows.

@sasa42
Copy link

sasa42 commented Jul 11, 2024

nvidia-smi...

PXL_20240711_133540300

@xmfcx
Copy link
Author

xmfcx commented Sep 3, 2024

Need to add that we don't support WSL to the documentation.

@mozhoku
Copy link
Collaborator

mozhoku commented Sep 27, 2024

We will not be supporting the WSL2, updated the documentation. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Software flaws or errors.
Projects
Development

No branches or pull requests

4 participants