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

Document how to use the device on WSL #53

Open
S-Dafarra opened this issue Jan 16, 2025 · 0 comments
Open

Document how to use the device on WSL #53

S-Dafarra opened this issue Jan 16, 2025 · 0 comments

Comments

@S-Dafarra
Copy link

S-Dafarra commented Jan 16, 2025

Recently I wanted to do a quick test with the realsense on Windows, so I tried to install the device via conda, but sadly it is not available on Windows. So I gave a shot to WSL. I managed to install the device easily with conda, but no realsense was found. I finally managed to run the device, so I thought to share the instructions here. Let me know if you want me to copy them in another place.

Related issue: IntelRealSense/librealsense#10506

First, you need to allow WSL to access the USB devices (source https://learn.microsoft.com/en-gb/windows/wsl/connect-usb)

Download usbipd from https://github.com/dorssel/usbipd-win/releases and install it. Then, from a terminal (either cmd or PowerShell), run

usbipd list

This should output something like.

Connected:
BUSID  VID:PID    DEVICE                                                        STATE
1-10   27c6:533c  Goodix fingerprint                                            Not shared
1-11   0c45:6a0c  Integrated Webcam                                             Not shared
1-14   8087:0026  Intel(R) Wireless Bluetooth(R)                                Not shared
1-17   8086:0b3a  Intel(R) RealSense(TM) Depth Camera 435i Depth, Intel(R) ...  Not shared
3-1    0bda:8153  Realtek USB GbE Family Controller #2                          Not shared
4-6    413c:c010  Dell DA310                                                    Not shared
5-1    0451:3421  Texas Instruments USB Billboard Device, USB Input Device      Not shared
5-2    413c:301a  USB Input Device                                              Not shared
5-3    413c:2113  USB Input Device                                              Not shared
5-4    0451:3410  TUSB3410 EECode Ser                                           Not shared

Persisted:
GUID                                  DEVICE

usbipd: warning: Unknown USB filter 'usbfilter' may be incompatible with this software; 'bind --force' may be required.

Then, it is necessary to bind the realsense. With administrative privileges, run the following

 usbipd bind --busid 1-17

Note that 1-17 is the value that you see under BUSID. Now the output of usbipd list should look like

Connected:
BUSID  VID:PID    DEVICE                                                        STATE
1-10   27c6:533c  Goodix fingerprint                                            Not shared
1-11   0c45:6a0c  Integrated Webcam                                             Not shared
1-14   8087:0026  Intel(R) Wireless Bluetooth(R)                                Not shared
1-17   8086:0b3a  Intel(R) RealSense(TM) Depth Camera 435i Depth, Intel(R) ...  Shared
3-1    0bda:8153  Realtek USB GbE Family Controller #2                          Not shared
4-6    413c:c010  Dell DA310                                                    Not shared
5-1    0451:3421  Texas Instruments USB Billboard Device, USB Input Device      Not shared
5-2    413c:301a  USB Input Device                                              Not shared
5-3    413c:2113  USB Input Device                                              Not shared
5-4    0451:3410  TUSB3410 EECode Ser                                           Not shared

Persisted:
GUID                                  DEVICE

usbipd: warning: Unknown USB filter 'usbfilter' may be incompatible with this software; 'bind --force' may be required.

Now, to allow WSL accessing the USB run the following command (make sure to have WSL active at this stage, for example by opening a WSL terminal)

usbipd attach --wsl --busid 1-17

Now on WSL, the output of lsusb is:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 8086:0b3a Intel Corp. Intel(R) RealSense(TM) Depth Camera 435i

In order to use the device, it is still necessary to use the realsense udev rules.

Download the file https://github.com/IntelRealSense/librealsense/blob/master/config/99-realsense-libusb.rules.

Then, in WSL, run the following from the folder you downloaded the 99-realsense-libusb.rules files

sudo cp 99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules
sudo udevadm trigger

After these steps, I was able to run the yarp-device-realsense2 device installed from conda on WSL.

cc @traversaro @Nicogene @martinaxgloria

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

No branches or pull requests

1 participant