From 97d021b5aff59275f6c5d821f1f6a4c59423eefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 14 Feb 2023 19:47:44 +0100 Subject: [PATCH] fix ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- gz_ros2_control/CMakeLists.txt | 4 ++++ gz_ros2_control/src/gz_ros2_control_plugin.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gz_ros2_control/CMakeLists.txt b/gz_ros2_control/CMakeLists.txt index 7540f91c..5439c686 100644 --- a/gz_ros2_control/CMakeLists.txt +++ b/gz_ros2_control/CMakeLists.txt @@ -46,6 +46,10 @@ else() add_definitions(-DGZ_HEADERS) endif() +if("$ENV{ROS_DISTRO}" STREQUAL "rolling") + add_definitions(-DROLLING) +endif() + include_directories(include) add_library(${PROJECT_NAME}-system SHARED diff --git a/gz_ros2_control/src/gz_ros2_control_plugin.cpp b/gz_ros2_control/src/gz_ros2_control_plugin.cpp index d7aab02a..41146e80 100644 --- a/gz_ros2_control/src/gz_ros2_control_plugin.cpp +++ b/gz_ros2_control/src/gz_ros2_control_plugin.cpp @@ -403,7 +403,7 @@ void GazeboSimROS2ControlPlugin::Configure( } for (unsigned int i = 0; i < control_hardware_info.size(); ++i) { -#ifdef GZ_HEADERS +#ifndef ROLLING std::string robot_hw_sim_type_str_ = control_hardware_info[i].hardware_class_type; #else std::string robot_hw_sim_type_str_ = control_hardware_info[i].hardware_plugin_name;