-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Partial and inconsistent device paths listed under "Physical Port" on Raspberry Pi #11553
Comments
Hi @zackwoodruff You may be able to set fixed port addresses for cameras by defining symbolic links via udev rules. https://unix.stackexchange.com/questions/479302/udev-rules-for-seemingly-indistinguishable-devices |
@MartyG-RealSense Hi Marty, thank you for the link. The cameras do have fixed port addresses shown by the command
where the mappings are: If I properly set up the udev rules I could have something like:
Either way how do I enable a specific stream using the realsense C++ sdk? On my Ubuntu Laptop I have been passing the port info, matching that to the "RS2_CAMERA_INFO_PHYSICAL_PORT" device info, then using the serial number to enable the specific device.
That will not work with the inconsistent and changing path, how do I enable a specific device/stream (e.g. rgb or depth) when all I have is the port address of the device? I can parse the serial number from udevadm using the following command but I'm wondering if there's a simpler way to do it.
|
As you said, you can enable a device by its serial number so that it does not matter which port the camera is plugged into so long as the camera is detectable. But as you also stated, that approach is not suitable for your particular project because the cameras may get swapped between ports and you want to address a specific port. Other than your own udevadm method, the best approach may be to create a new udev rule to enforce port naming, like in the guide at the link below. |
@MartyG-RealSense |
The RealSense ROS wrapper enables cameras to be accessed by a specific USB port ID instead of camera serial number with the USB_PORT_ID instruction. The question is whether the port address would still be changing though. If you need to use the SDK instead of ROS, the SDK has a set of Multi-Streaming Model rules that govern access to multiple cameras and multiple streams. The available code documentation for these rules is limited though. |
Thanks @MartyG-RealSense. I am not using ROS so I will look into the Multi-Streaming Model. Worst case I should be able to parse the serial number from the part of the port that is consistent on plug/unplug and device swap. |
Hi @zackwoodruff Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense I am good for now thanks. |
Thanks very much @zackwoodruff for the update! |
Issue Description
rs-enumerate-devices -S
on both Bullseye and Buster I get partial paths under "Physical Port" and these paths change when I unplug and replug a camera into the same port:Do you know what could be causing the partial paths instead of the full paths under the "Physical Port"? Thanks.
The text was updated successfully, but these errors were encountered: