Skip to content

Fix D555 DDS device detection to not depend on Intel name prefix - #3524

Merged
Nir-Az merged 1 commit into
realsenseai:ros2-developmentfrom
Nir-Az:fix-d555-name-match
Jun 23, 2026
Merged

Nir-Az merged 1 commit into
realsenseai:ros2-developmentfrom
Nir-Az:fix-d555-name-match

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Overview: A pending librealsense change drops the Intel prefix from RS2_CAMERA_INFO_NAME (e.g. Intel RealSense D555 -> RealSense D555). The ROS2 wrapper detects DDS-connected D555 by exact name match, so after that change a D555 over DDS is no longer recognized and the node fails to start.

Why this special-case exists

DDS devices are discovered over the network, and the realdds discovery protocol carries no USB PID. librealsense therefore hardcodes RS2_CAMERA_INFO_PRODUCT_ID as the literal string "DDS" for DDS devices, so std::stoi(pid_str, 0, 16) cannot resolve the model. The wrapper falls back to the only stable identifier a DDS device broadcasts - its name - to force RS555_PID. (USB/GMSL D555 expose a real PID and use the normal path.)

Change

  • Detect the DDS D555 by connection_type == "DDS" combined with a prefix-tolerant device_name.find("D555"), instead of the exact string "Intel RealSense D555".
  • Guard RS2_CAMERA_INFO_CONNECTION_TYPE with supports() so get_info cannot throw.

This survives the librealsense rename (matches both old and new names), keeps USB/GMSL devices on the real-PID path, and won't misfire on recovery devices.

@sareluzi sareluzi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. maybe review with another engineer also

@Nir-Az
Nir-Az requested a review from OhadMeir June 10, 2026 13:21
uint16_t pid;

if (device_name == "Intel RealSense D555")
if (connection_type == "DDS" && device_name.find("D555") != std::string::npos)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, also search "RealSense" in the string

@Nir-Az
Nir-Az merged commit b5276fd into realsenseai:ros2-development Jun 23, 2026
9 of 10 checks passed
@Nir-Az
Nir-Az deleted the fix-d555-name-match branch June 24, 2026 12:27
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

Successfully merging this pull request may close these issues.

3 participants