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

Connect to device via physical ID #3127

Open
tonynajjar opened this issue Jun 14, 2024 · 5 comments
Open

Connect to device via physical ID #3127

tonynajjar opened this issue Jun 14, 2024 · 5 comments

Comments

@tonynajjar
Copy link
Contributor

Currently we can connect to a device via serial number, device type or usb port. I have 2 D457 GMSL/FAKRA that need to be recognized so I can only use the serial number option. I'd like to ask for the feature to lookup via the physical id. Thanks

[realsense2_camera_node-4] [INFO] [1718371350.148631351] [perception.front_left]: Device with physical ID /dev/video-rs-depth-1 was found.
[realsense2_camera_node-4] [INFO] [1718371350.148690520] [perception.front_left]: Device with name Intel RealSense D457 was found.

@MartyG-RealSense
Copy link
Collaborator

Hi @tonynajjar What do you believe the advantages would be of finding a D457 by its physical ID compared to using the serial number, please?

@tonynajjar
Copy link
Contributor Author

tonynajjar commented Jun 14, 2024

Same advantage as with specifying usb port - when you have a fleet of robot and the cameras are always hooked to the same ports (or the udev rules remaps symlinks to knowns ports), then we don't have to configure the serial numbers for each robot if we use the physical ID

@MartyG-RealSense
Copy link
Collaborator

Thanks very much. I will highlight your request to the RealSense ROS team.

@dmipx
Copy link

dmipx commented Jun 17, 2024

Hi @tonynajjar.
We want to understand better what specific feature can help you.
For now, it is looking like that:

rs-enumerate-devices
    Name                          :     Intel RealSense D455
    Physical Port                 :     /sys/devices/platform/bus@0/3610000.usb/usb2/2-3/2-3.2/2-3.2.1/2-3.2.1:1.0/video4linux/video6

    Name                          :     Intel RealSense D457
    Physical Port                 :     /dev/video-rs-depth-0

The actual device path is:

ls -l /sys/class/video4linux/
(GMSL) video0 -> /sys/devices/platform/tegra-capture-vi/video4linux/video0
(USB) video6 -> /sys/devices/platform/bus@0/3610000.usb/usb2/2-3/2-3.2/2-3.2.1/2-3.2.1:1.0/video4linux/video6

Would you like to have pointers for each camera, USB and GMSL

/dev/video-rs-depth-0
/dev/video-rs-depth-1
/dev/video-rs-depth-2
/dev/video-rs-depth-3
etc..

Or you ask to have long links like for USB:
/sys/devices/platform/bus@0/3610000.usb/usb2/2-3/2-3.2/2-3.2.1/2-3.2.1:1.0/video4linux/video6
And for GMSL:
/sys/devices/platform/tegra-capture-vi/video4linux/video0
In GMSL case, you cannot tell which video nodes corresponds to what cameras.
To collect sensors to their cameras we scan media link and extrapolate parentship.
This is different for USB devices - you can know from device path.

@tonynajjar
Copy link
Contributor Author

My which would be to specify /dev/video-rs-depth-0 but I'm happy with whatever string I don't need to configure for each machine.

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

No branches or pull requests

3 participants