I have installed Realsense SDK on WSL2 (Windows 11) and it works fine but there is a problem related with some permissions.
I have followed this guide: https://robots.uc3m.es/installation-guides/install-realsense2.html
All is fine except, realsense-viewer command doesn't work properly without sudo
.
I receive this error:
03/02 12:26:45,534 ERROR [140206850172672] (handle-libusb.h:51) failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS
03/02 12:26:45,600 ERROR [140207016855296] (sensor.cpp:664) acquire_power failed: failed to set power state
If I use sudo with realsense-viewer command, this works fine.
I have checked sudo 99-realsense-libusb.rules but the permissions are fine (all 0666 or 0777). The usb configuration uses usbipd from PowerShell and the attach is done by:
usbipd wsl attach --busid <busid>
The real problem is that i can't use the camera with ROS2 because I can't execute ROS2 with sudo, and the normal way to do this sends to me the same error I wrote some lines before.
What is wrong with this?
THank you so much.
Update:
If I try rs-enumerate-devices without sudo, I receive the same error.
If I use lsusb, RealSense device is appears as device connected.