Repository navigation
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()
|
@Nir-Az Can you have a look at this? |
|
Hi @christian-rauch |
This PR is not only about the lyrical release. I propose softening the |
NP, we can do that. |
3871f50 to
15ac083
Compare
I rebased and force-pushed. |
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:220
- Changing the unsupported-distro branch from FATAL_ERROR to WARNING means CMake will continue without defining any of the distro-specific compile macros (FOXY/HUMBLE/…/LYRICAL). Several sources rely on these macros to select the correct API variant (e.g., realsense2_camera/src/image_publisher.cpp uses
#if defined(LYRICAL) || defined(ROLLING)to choose the image_transport::create_publisher overload). For a new/unknown distro, this can turn a clear configuration-time failure into harder-to-diagnose compile errors or subtly wrong API selection.
Consider either: (1) keeping a hard error and explicitly adding new distros as they’re validated, or (2) in the unknown-distro branch, defining a deliberate fallback macro (e.g., treat as latest) / switching those codepaths to version-based checks so behavior is deterministic.
message(WARNING "Unsupported ROS Distribution: " "$ENV{ROS_DISTRO}")
endif()
|
@Nir-Az Can you check again? |
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 .