Skip to content

Commit

Permalink
Disabled lidar_node as well
Browse files Browse the repository at this point in the history
  • Loading branch information
VincidaB committed May 6, 2024
1 parent 3344f07 commit de8ed98
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions src/ldrobot-lidar-ros2/ldlidar_node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,37 @@ endif()
################################################
# Check the ROS2 version

set(ROS2_FOUND FALSE)
if(DEFINED ENV{ROS_DISTRO})
set(FOUND_ROS2_DISTRO $ENV{ROS_DISTRO})
set(ROS2_FOUND TRUE)
message(STATUS "* Found ROS2 ${FOUND_ROS2_DISTRO}")
else()
message(WARNING "* ROS2 distro variable not set. Trying to figure it out...")
set(ROS2_DISTROS "ardent;crystal;dashing;eloquent;foxy;galactic;humble;rolling")
set(ROS2_FOUND FALSE)
foreach(distro ${ROS2_DISTROS})
if(NOT ROS2_FOUND)
find_path(RCLCPP_H rclcpp.hpp PATHS /opt/ros/${distro}/include/rclcpp)
if(RCLCPP_H)
message(STATUS "* Found ROS2 ${distro}")
set(FOUND_ROS2_DISTRO ${distro})
set(ROS2_FOUND TRUE)
endif()
endif()
endforeach()
endif()

if(ROS2_FOUND)
if(${FOUND_ROS2_DISTRO} STREQUAL "humble")
message(STATUS "* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.")
add_definitions(-DFOUND_HUMBLE)
else()
message(FATAL_ERROR "ROS2 ${FOUND_ROS2_DISTRO} is not officially supported by this package. Correct working is not guarantee.")
endif()
else()
message(FATAL_ERROR "*** WARNING *** ROS2 distro is unknown. This package could not work correctly.")
endif()
# set(ROS2_FOUND FALSE)
# if(DEFINED ENV{ROS_DISTRO})
# set(FOUND_ROS2_DISTRO $ENV{ROS_DISTRO})
# set(ROS2_FOUND TRUE)
# message(STATUS "* Found ROS2 ${FOUND_ROS2_DISTRO}")
# else()
# message(WARNING "* ROS2 distro variable not set. Trying to figure it out...")
# set(ROS2_DISTROS "ardent;crystal;dashing;eloquent;foxy;galactic;humble;rolling")
# set(ROS2_FOUND FALSE)
# foreach(distro ${ROS2_DISTROS})
# if(NOT ROS2_FOUND)
# find_path(RCLCPP_H rclcpp.hpp PATHS /opt/ros/${distro}/include/rclcpp)
# if(RCLCPP_H)
# message(STATUS "* Found ROS2 ${distro}")
# set(FOUND_ROS2_DISTRO ${distro})
# set(ROS2_FOUND TRUE)
# endif()
# endif()
# endforeach()
# endif()
#
# if(ROS2_FOUND)
# if(${FOUND_ROS2_DISTRO} STREQUAL "humble")
# message(STATUS "* ROS2 ${FOUND_ROS2_DISTRO} is officially supported by this package.")
# add_definitions(-DFOUND_HUMBLE)
# else()
# message(FATAL_ERROR "ROS2 ${FOUND_ROS2_DISTRO} is not officially supported by this package. Correct working is not guarantee.")
# endif()
# else()
# message(FATAL_ERROR "*** WARNING *** ROS2 distro is unknown. This package could not work correctly.")
# endif()
################################################

#############################################
Expand Down

0 comments on commit de8ed98

Please sign in to comment.