Closed GarmischWg closed 2 months ago
Here is more information regarding the setup:
In the "found usb device" line, the null in the parenthesis signifies that it couldn't find which evdev device file corresponds to that device. Can you post the contents of /proc/bus/input/devices
with the device plugged in?
inside wsl, i find that /proc/bus/input/devices
directory exists but is empty:
garmi@Tower01:~/main_ws/ros_env$ ls -l /proc/bus/input/devices
-r--r--r-- 1 root root 0 Sep 4 22:58 /proc/bus/input/devices
garmi@Tower01:~/main_ws/ros_env$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 256f:c652 3Dconnexion Universal Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
i took a look into another tutorial: https://github.com/NVlabs/spacemouse-extension
And i realize that spacemouse never appeared in /dev
directory, and i went ahead to create and modify /etc/udev/rules.d/99-spacemouse.rules
with the following content: SUBSYSTEM=="usb", ATTRS{idVendor}=="256f", ATTRS{idProduct}=="c652", MODE="0666", SYMLINK+="spacemouse"
After that, when i run ls /dev, i can see spacemouse in the dev directory, but /proc/bus/input/devices
is still empty
garmi@Tower01:~/main_ws/ros_env$ ls -l /proc/bus/input/devices
-r--r--r-- 1 root root 0 Sep 4 22:58 /proc/bus/input/devices
Note that the above actions are done in WSL, not in the docker container.
After further research, the problem seems to be on the WSL side, because /dev/input does not exist on WSL.
https://www.reddit.com/r/bashonubuntuonwindows/comments/ju64oa/wsl2_devinput/ https://github.com/microsoft/WSL/discussions/10474 https://github.com/microsoft/WSL/issues/7747
Given the limitation that WSL cannot have /dev/input and all usb device will only appear in /dev/bus/usb/
lrwxrwxrwx 1 root root 15 Sep 4 23:20 spacemouse -> bus/usb/001/005
i found that WSL in general has poor support for usb device and people have to rebuild the kernal inorder to use usb device inside WSL which i am not comfortable doing.
I see. Spacenavd relies on evdev to talk to USB devices, if that's not available on WSL (or with the default kernel in any case), there's no way to use USB devices with spacenavd.
I am working with the spacemouse inside WSL2 and docker.
Using usbipd on windows, i am able to pass in the use device into the container.
The container is running in privillaged mode and all devices including usb devices has been passthrough to the container.
However, when launching spacenavd, i got the following error:
It is normal that it cannot connect to a display, due to it being inside WSL. But it is able to find the "3Dconnexion Universal Receiver" yet it states that it is not supported.
Subsequent attempts in debugging shows that the device is indeed detected inside the container, with all permissions granted:
This is the spacemouse that i bought: https://3dconnexion.com/us/product/spacemouse-wireless/
I have ran out of methods to debug this issue, any idea what is going on and how to solve it? Thank you very much.