From d8082418a0873099d58442ccf0f2d0720ea05825 Mon Sep 17 00:00:00 2001 From: peterdavidfagan Date: Wed, 25 Oct 2023 14:25:02 +0100 Subject: [PATCH] add rolling support --- zed_components/CMakeLists.txt | 3 +++ .../src/zed_camera/src/zed_camera_component.cpp | 12 +++++++----- zed_ros2/CMakeLists.txt | 3 +++ zed_wrapper/CMakeLists.txt | 3 +++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/zed_components/CMakeLists.txt b/zed_components/CMakeLists.txt index f74a18b6..1f074b34 100644 --- a/zed_components/CMakeLists.txt +++ b/zed_components/CMakeLists.txt @@ -36,6 +36,9 @@ if(ROS2_FOUND) elseif(${FOUND_ROS2_DISTRO} STREQUAL "humble") #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") add_definitions(-DFOUND_HUMBLE) + elseif(${FOUND_ROS2_DISTRO} STREQUAL "rolling") + #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") + add_definitions(-DFOUND_ROLLING) else() message("*** WARNING *** ROS2 ${FOUND_ROS2_DISTRO} is not officially supported by this package. Correct working is not guarantee.") endif() diff --git a/zed_components/src/zed_camera/src/zed_camera_component.cpp b/zed_components/src/zed_camera/src/zed_camera_component.cpp index e4ca3ba2..ccc33760 100644 --- a/zed_components/src/zed_camera/src/zed_camera_component.cpp +++ b/zed_components/src/zed_camera/src/zed_camera_component.cpp @@ -30,12 +30,14 @@ #include #include -#ifdef FOUND_HUMBLE +#ifdef FOUND_ROLLING #include -#elif defined FOUND_FOXY -#include -#else -#error Unsupported ROS2 distro +#elif defined FOUND_HUMBLE +#include +#elif defined FOUND_FOXY +#include +#else +#error Unsupported ROS2 distro #endif #include diff --git a/zed_ros2/CMakeLists.txt b/zed_ros2/CMakeLists.txt index 25684c5f..4d4d7861 100644 --- a/zed_ros2/CMakeLists.txt +++ b/zed_ros2/CMakeLists.txt @@ -35,6 +35,9 @@ if(ROS2_FOUND) elseif(${FOUND_ROS2_DISTRO} STREQUAL "humble") #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") add_definitions(-DFOUND_HUMBLE) + elseif(${FOUND_ROS2_DISTRO} STREQUAL "rolling") + #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") + add_definitions(-DFOUND_ROLLING) else() message("*** WARNING *** ROS2 ${FOUND_ROS2_DISTRO} is not officially supported by this package. Correct working is not guarantee.") endif() diff --git a/zed_wrapper/CMakeLists.txt b/zed_wrapper/CMakeLists.txt index 2d3cff16..238b2371 100644 --- a/zed_wrapper/CMakeLists.txt +++ b/zed_wrapper/CMakeLists.txt @@ -35,6 +35,9 @@ if(ROS2_FOUND) elseif(${FOUND_ROS2_DISTRO} STREQUAL "humble") #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") add_definitions(-DFOUND_HUMBLE) + elseif(${FOUND_ROS2_DISTRO} STREQUAL "rolling") + #message("* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.") + add_definitions(-DFOUND_ROLLING) else() message("*** WARNING *** ROS2 ${FOUND_ROS2_DISTRO} is not officially supported by this package. Correct working is not guarantee.") endif()