turn the FATAL_ERROR for ROS distro check into a WARNING - #3550
turn the FATAL_ERROR for ROS distro check into a WARNING#3550christian-rauch wants to merge 3 commits into
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
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 ...)withmessage(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.
4b2fa02 to
2e51892
Compare
There was a problem hiding this comment.
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.cppuses#if defined( LYRICAL ) || defined( ROLLING )), so a ROS_DISTRO likelyricalwill now proceed without-DLYRICALand 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()
I would like to suggest replacing the
FATAL_ERRORfor the distro check with aWARNING, so this can continue to built if there are no API breakages etc.Fixes #3549 .