From 3d8e951cd59db4dba7461557c520b05ed458f0cd Mon Sep 17 00:00:00 2001 From: nakul-py Date: Wed, 8 Jan 2025 17:10:33 +0530 Subject: [PATCH 1/4] Using urdf/model.hpp for rolling and urdf/model.h for jazzy or humble --- .../joint_state_broadcaster/joint_state_broadcaster.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp b/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp index da02c5feb8..f0f100d6d0 100644 --- a/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp +++ b/joint_state_broadcaster/include/joint_state_broadcaster/joint_state_broadcaster.hpp @@ -26,7 +26,13 @@ #include "joint_state_broadcaster_parameters.hpp" #include "realtime_tools/realtime_publisher.hpp" #include "sensor_msgs/msg/joint_state.hpp" + +#include "rclcpp/version.h" +#if RCLCPP_VERSION_GTE(29, 0, 0) +#include "urdf/model.hpp" +#else #include "urdf/model.h" +#endif namespace joint_state_broadcaster { From 79efce7b66d09a13e46f860b46d39dd87c881007 Mon Sep 17 00:00:00 2001 From: nakul-py Date: Wed, 8 Jan 2025 18:08:17 +0530 Subject: [PATCH 2/4] Removing redundant lines from cpp file --- joint_state_broadcaster/src/joint_state_broadcaster.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/joint_state_broadcaster/src/joint_state_broadcaster.cpp b/joint_state_broadcaster/src/joint_state_broadcaster.cpp index 068559d5a3..855d64df60 100644 --- a/joint_state_broadcaster/src/joint_state_broadcaster.cpp +++ b/joint_state_broadcaster/src/joint_state_broadcaster.cpp @@ -26,12 +26,7 @@ #include "rclcpp/time.hpp" #include "std_msgs/msg/header.hpp" -#include "rclcpp/version.h" -#if RCLCPP_VERSION_GTE(29, 0, 0) -#include "urdf/model.hpp" -#else #include "urdf/model.h" -#endif namespace rclcpp_lifecycle { From c7f06aada9f545dce39c64728ffd37b1607a4514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Thu, 9 Jan 2025 10:36:54 +0100 Subject: [PATCH 3/4] Remove model.h Co-authored-by: Bence Magyar --- joint_state_broadcaster/src/joint_state_broadcaster.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/joint_state_broadcaster/src/joint_state_broadcaster.cpp b/joint_state_broadcaster/src/joint_state_broadcaster.cpp index 855d64df60..29b7392c64 100644 --- a/joint_state_broadcaster/src/joint_state_broadcaster.cpp +++ b/joint_state_broadcaster/src/joint_state_broadcaster.cpp @@ -26,7 +26,6 @@ #include "rclcpp/time.hpp" #include "std_msgs/msg/header.hpp" -#include "urdf/model.h" namespace rclcpp_lifecycle { From c6029752489c3db7fa481eac0546b4af93dfd494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Thu, 9 Jan 2025 10:43:16 +0100 Subject: [PATCH 4/4] Satisfy pre-commit --- joint_state_broadcaster/src/joint_state_broadcaster.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/joint_state_broadcaster/src/joint_state_broadcaster.cpp b/joint_state_broadcaster/src/joint_state_broadcaster.cpp index 29b7392c64..5b72b9f35a 100644 --- a/joint_state_broadcaster/src/joint_state_broadcaster.cpp +++ b/joint_state_broadcaster/src/joint_state_broadcaster.cpp @@ -26,7 +26,6 @@ #include "rclcpp/time.hpp" #include "std_msgs/msg/header.hpp" - namespace rclcpp_lifecycle { class State;