Skip to content

turn the FATAL_ERROR for ROS distro check into a WARNING - #3550

Open
christian-rauch wants to merge 3 commits into
realsenseai:ros2-masterfrom
christian-rauch:skip_fatal_distro_check
Open

turn the FATAL_ERROR for ROS distro check into a WARNING#3550
christian-rauch wants to merge 3 commits into
realsenseai:ros2-masterfrom
christian-rauch:skip_fatal_distro_check

Conversation

@christian-rauch

@christian-rauch christian-rauch commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

I would like to suggest replacing the FATAL_ERROR for the distro check with a WARNING, so this can continue to built if there are no API breakages etc.

Fixes #3549 .

Copilot AI lite review requested due to automatic review settings August 17, 2026 12:58
@sysrsbuild-gh

Copy link
Copy Markdown

Can one of the admins verify this patch?

Copilot AI 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.

Pull request overview

This PR adjusts the ROS 2 distribution gating logic in realsense2_camera so that an unrecognized $ENV{ROS_DISTRO} no longer hard-stops CMake configuration, aiming to allow best-effort builds on newer/unsupported distros.

Changes:

  • Replaced message(FATAL_ERROR ...) with message(WARNING ...) when $ENV{ROS_DISTRO} is not one of the explicitly supported distros.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread realsense2_camera/CMakeLists.txt
@christian-rauch
christian-rauch force-pushed the skip_fatal_distro_check branch from 4b2fa02 to 2e51892 Compare August 17, 2026 13:04

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

realsense2_camera/CMakeLists.txt:217

  • Switching the unsupported-distro case from FATAL_ERROR to WARNING lets CMake configure continue, but it also means no distro macro is defined for unknown distros. The codebase already has distro-gated compilation for Lyrical (e.g., src/image_publisher.cpp uses #if defined( LYRICAL ) || defined( ROLLING )), so a ROS_DISTRO like lyrical will now proceed without -DLYRICAL and likely compile against the wrong image_transport API.

Consider adding an explicit lyrical branch (since it’s referenced in code) and/or a safe fallback macro (e.g., ROLLING) when continuing after the warning, so the build uses the intended compatibility path.

else()
  message(WARNING "Unsupported ROS Distribution: " "$ENV{ROS_DISTRO}")
endif()

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.

support lyrical

3 participants