Skip to content

Drop 'Intel' prefix from camera visible names - #15178

Merged
Nir-Az merged 3 commits into
realsenseai:developmentfrom
sareluzi:drop-intel-from-camera-name
Jun 23, 2026
Merged

Nir-Az merged 3 commits into
realsenseai:developmentfrom
sareluzi:drop-intel-from-camera-name

Conversation

@sareluzi

@sareluzi sareluzi commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the Intel prefix from camera visible names exposed via RS2_CAMERA_INFO_NAME. E.g. Intel RealSense D455 -> RealSense D455. Rest of the name string is unchanged.

Changes

Name source (single source of truth):

  • src/ds/d400/d400-private.h rs400_sku_names and src/ds/d500/d500-private.h rs500_sku_names - dropped Intel from every entry (D4xx/D5xx, F416, Recovery, IMU, USB2, DS5U, Tracking variants).
  • src/media/ros/ros_reader.cpp - legacy TM2 playback name.

Prefix consumers updated (read the name, depend on the literal prefix):

  • src/gl/camera-shader.cpp - 3D camera mesh selection (starts_with).
  • common/device-model.cpp - preset-file lookup regex.
  • common/on-chip-calib.cpp - D415 emitter special-case.
  • wrappers/python/pyrs_device.cpp and tools/dds/dds-adapter/rs-dds-adapter.cpp - prefix strip (length 16 -> 10).

Tests / fixtures / examples:

  • unit-tests/dds/{d455,d435i,d405}.py, unit-tests/live/calib/calibrations_common.py, unit-tests/infra-tests/test_iq_snapshot_dedup.py, wrappers/python/examples/d500_triggered_calibration.py, tools/realsense-viewer/presets/sample.preset.
  • unit-tests/py/rspy/devices.py already handles both Intel RealSense and RealSense prefixes (kept).

Out of scope (not the camera visible name)

OS USB descriptors, metadata field names, GPU vendor checks, L500/L515 (Unity) matching, C# assembly/window-title branding, docs.

Notes

  • Safety camera (D585S) covered; its Safety Camera sensor name never had an Intel prefix.
  • Builds verified locally (realsense-viewer).

Copilot AI review requested due to automatic review settings June 9, 2026 16:48
@sareluzi
sareluzi requested a review from Nir-Az June 9, 2026 16:50

Copilot AI left a comment

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.

Pull request overview

This PR updates librealsense device naming by removing the "Intel " prefix from RS2_CAMERA_INFO_NAME (e.g., "Intel RealSense D455" → "RealSense D455") and adjusts downstream consumers (viewer logic, DDS adapter, Python bindings, ROS playback, and tests/fixtures) that depend on the literal name prefix.

Changes:

  • Updated D400/D500 SKU name maps to emit "RealSense ..." visible names.
  • Updated multiple prefix consumers (regex/prefix stripping/mesh selection/legacy ROS reader) to use the new prefix.
  • Updated unit tests, examples, and preset fixtures to match the new visible device names.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wrappers/python/pyrs_device.cpp Updates Python device __repr__ prefix stripping to the new "RealSense " prefix
wrappers/python/examples/d500_triggered_calibration.py Updates D585S safety-camera name check to "RealSense D585S"
unit-tests/live/calib/calibrations_common.py Updates D415 name check used for emitter behavior
unit-tests/infra-tests/test_iq_snapshot_dedup.py Updates mocked pipeline device names used for snapshot dedup tests
unit-tests/dds/d455.py Updates DDS fixture device name
unit-tests/dds/d435i.py Updates DDS fixture device name
unit-tests/dds/d405.py Updates DDS fixture device name
tools/realsense-viewer/presets/sample.preset Updates sample preset device name
tools/dds/dds-adapter/rs-dds-adapter.cpp Updates ROS2 node-name prefix stripping to new "RealSense " prefix
src/media/ros/ros_reader.cpp Updates legacy TM2 playback name to "RealSense TM2"
src/gl/camera-shader.cpp Updates viewer camera-mesh selection string matching to new "RealSense ..." names
src/ds/d500/d500-private.h Removes "Intel " prefix from D500 SKU name map entries
src/ds/d400/d400-private.h Removes "Intel " prefix from D400 SKU name map entries
common/on-chip-calib.cpp Updates D415 special-case name string
common/device-model.cpp Updates preset-file lookup regex to parse "RealSense ..." names
Comments suppressed due to low confidence (1)

tools/dds/dds-adapter/rs-dds-adapter.cpp:49

  • build_node_name() strips only the new "RealSense " prefix. If a device name still starts with "Intel RealSense " (e.g., playback from older recordings), node names/topic-roots will change unexpectedly (e.g. Intel_RealSense_D455_<sn>). Consider stripping both prefixes to keep node names stable across device sources.
    constexpr char const * DEVICE_NAME_PREFIX = "RealSense ";
    constexpr size_t DEVICE_NAME_PREFIX_CCH = 10;
    // We don't need the prefix in the path
    std::string model_name = rs2_camera_name;
    if( model_name.length() > DEVICE_NAME_PREFIX_CCH
        && 0 == strncmp( model_name.data(), DEVICE_NAME_PREFIX, DEVICE_NAME_PREFIX_CCH ) )

Comment thread wrappers/python/pyrs_device.cpp Resolved
Comment thread common/device-model.cpp Resolved
Comment thread src/gl/camera-shader.cpp Resolved
@Nir-Az

Nir-Az commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Overall lookd good, I triggered a nightly CI to see all cases runs,

@Nir-Az

Nir-Az commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Found as breaking change for ROS, we need to align it too

  realsense2_camera/src/realsense_node_factory.cpp:453
  std::string device_name(_device.get_info(RS2_CAMERA_INFO_NAME));
  ...
  if (device_name == "Intel RealSense D555")   // exact full-name match
  {
      pid = RS555_PID;                          // DDS PID workaround
  }
  else
  {
      pid = std::stoi(pid_str, 0, 16);          // D555 falls here after rename
  }

Opened a matching PR here for your review, should be merged together:
realsenseai/realsense-ros#3524

@Nir-Az
Nir-Az requested a review from OhadMeir June 10, 2026 13:22

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@sareluzi

Copy link
Copy Markdown
Collaborator Author

Pushed review fixes (commit 9c48f4c):

Addressed

  • DDS adapter (@OhadMeir): build_node_name now strips both Intel RealSense and RealSense prefixes → topic-roots stable across sources.
  • Substring matching (@OhadMeir): calibrations_common.py and d500_triggered_calibration.py switched from == to in. Also applied the same to common/on-chip-calib.cpp (D415 emitter check) which had the identical equality pattern.

Dismissed (with rationale in threads)

  • sample.preset / existing user presets (@OhadMeir): preset lookup keys on the model token (<model> *.preset), unchanged by the rename; the JSON name field isn't validated on load — existing presets still resolve.
  • Copilot backward-compat ×3 (camera-shader / device-model regex / pyrs_device __repr__): per @Nir-Az, viewer/display/cosmetic; live devices always get the new name. Left as-is.

Cross-repo coordination

  • ROS break (@Nir-Az): librealsense-ros#3524 must merge together with this PR. Confirmed the only full-name exact-match in this repo's tree are the ones fixed above; the ROS one lives in the external repo and is covered by that PR.

Local build (realsense-viewer) green after the changes.

@Nir-Az

Nir-Az commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

@sareluzi I understand from @OhadMeir that on DDS camera name is sent by FW, meaning same change needs to occur on D555 DDS FW (and also D555 + D400 USB FW is we want the descriptors to change)

@sareluzi

Copy link
Copy Markdown
Collaborator Author

@Nir-Az - i will follow-up on D500 names change as well.
D400 PR already opened.

@Nir-Az

Nir-Az commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Noticed another miss

if (starts_with(dev_name, "Intel RealSense D415")) index = 0;

I suggest changing all line to find instead of start with and drop Intel

@Nir-Az
Nir-Az self-requested a review June 17, 2026 10:39

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

fix needed in camera shader

@sareluzi

Copy link
Copy Markdown
Collaborator Author

@Nir-Az done (commit b1ab176) — camera_renderer::process_frame now selects the mesh by model token using find instead of starts_with, so it's prefix-agnostic (matches D415/D435/D436/D45 regardless of Intel RealSense / RealSense / playback names):

std::string dev_name = dev.get_info(RS2_CAMERA_INFO_NAME);
if (dev_name.find("D415") != std::string::npos) index = 0;
if (dev_name.find("D435") != std::string::npos ||
    dev_name.find("D436") != std::string::npos) index = 1;
if (dev_name.find("D45")  != std::string::npos) index = 2;

Local viewer build green.

@sareluzi
sareluzi requested a review from Nir-Az June 18, 2026 08:25
Comment thread src/gl/camera-shader.cpp
if (starts_with(dev_name, "Intel RealSense D435") ||
starts_with(dev_name, "Intel RealSense D436")) index = 1;
if (starts_with(dev_name, "Intel RealSense D45")) index = 2;
std::string dev_name = dev.get_info(RS2_CAMERA_INFO_NAME);

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.

camera_renderer::process_frame mixes device-name parsing, index selection, and full GL rendering logic; split responsibilities into helpers to reduce cognitive complexity

Details

✨ AI Reasoning
​1. What is this code trying to accomplish? It identifies a camera model index from the device name and then performs GL rendering of a selected mesh. 2. Does this harm maintainability? Combining parsing logic and full rendering flow in one function increases cognitive load. 3. Is this appropriate? The method orchestrates diverse responsibilities (device name parsing, index selection, shader setup, fixed-function rendering), so it's harder to reason about at a glance. 4. Would fixing meaningfully improve the codebase? Yes — separating name-matching and rendering paths would localize concerns and simplify testing. 5. Is this a common pattern? Renderers often separate resource selection and draw calls; here they're combined. 6. Fixable in PR scope? The PR introduced a small change inside the function; refactoring into helper functions is reasonable but beyond this tiny change. Conclusion: the modified function remains a medium-length, multi-responsibility function that is more complex than desirable.

🔧 How do I fix it?
Break down long functions into smaller helper functions. Aim for functions under 60 lines with fewer than 10 local variables.

Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense but not related to this PR. Can be handled seperately.

@sareluzi
sareluzi force-pushed the drop-intel-from-camera-name branch from b1ab176 to 6b7ebc5 Compare June 23, 2026 07:06
@sareluzi

Copy link
Copy Markdown
Collaborator Author

Rebased on latest development (resolved the d500-private.h SKU-map conflict — kept all new D500 SKUs, dropped Intel from the 5 pre-existing entries). PR is mergeable again. The camera-shader find-by-model-token fix is included (6b7ebc5). @Nir-Az re-review please.

@sareluzi

Copy link
Copy Markdown
Collaborator Author

RetriggerGated

@Nir-Az
Nir-Az merged commit d66f5a3 into realsenseai:development Jun 23, 2026
28 of 30 checks passed
@Nir-Az

Nir-Az commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Verified on ROS
image

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.

4 participants