From 8079811e98bc46d94b62d0b35c7a20c660531a5d Mon Sep 17 00:00:00 2001 From: Kevin Greene Date: Wed, 16 Aug 2023 01:39:47 -0700 Subject: [PATCH] Fix include paths for ROS2 headers (#37) * Fix include paths for ROS2 headers * Add conditional include on deprecated header --- .../fixposition_driver_ros2/fixposition_driver_node.hpp | 6 +++--- fixposition_driver_ros2/src/data_to_ros2.cpp | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fixposition_driver_ros2/include/fixposition_driver_ros2/fixposition_driver_node.hpp b/fixposition_driver_ros2/include/fixposition_driver_ros2/fixposition_driver_node.hpp index a75cb81..20a3875 100644 --- a/fixposition_driver_ros2/include/fixposition_driver_ros2/fixposition_driver_node.hpp +++ b/fixposition_driver_ros2/include/fixposition_driver_ros2/fixposition_driver_node.hpp @@ -21,10 +21,10 @@ #include /* ROS2 */ -#include +#include #include -#include -#include +#include +#include #include #include #include diff --git a/fixposition_driver_ros2/src/data_to_ros2.cpp b/fixposition_driver_ros2/src/data_to_ros2.cpp index 36272c0..14f626d 100644 --- a/fixposition_driver_ros2/src/data_to_ros2.cpp +++ b/fixposition_driver_ros2/src/data_to_ros2.cpp @@ -13,7 +13,12 @@ */ /* ROS */ +#if __has_include() +#include +#else +// This header was deprecated as of ROS2 Humble, but is still required in order to support Foxy. #include +#endif /* PACKAGE */ #include