From e9f4e3f84f6e11a0daaa9485de55f5ed3d3420fa Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 18 Mar 2024 14:16:34 +0000 Subject: [PATCH] Fix a compile error with modern rclcpp. In particular, the constref shared_ptr callback signature must also have a 'const' on the type. Signed-off-by: Chris Lalancette --- .../MessageTfFrameTransformer.ros2.hpp | 4 ++-- src/MessageTfFrameTransformer.ros2.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/message_tf_frame_transformer/MessageTfFrameTransformer.ros2.hpp b/include/message_tf_frame_transformer/MessageTfFrameTransformer.ros2.hpp index abad551..9119171 100644 --- a/include/message_tf_frame_transformer/MessageTfFrameTransformer.ros2.hpp +++ b/include/message_tf_frame_transformer/MessageTfFrameTransformer.ros2.hpp @@ -66,7 +66,7 @@ class MessageTfFrameTransformer : public rclcpp::Node { void detectMessageType(); - void transformGeneric(const std::shared_ptr& serialized_msg); + void transformGeneric(const std::shared_ptr& serialized_msg); template void transform(const T& msg); @@ -98,7 +98,7 @@ class MessageTfFrameTransformer : public rclcpp::Node { rclcpp::TimerBase::SharedPtr detect_message_type_timer_; rclcpp::GenericSubscription::SharedPtr subscriber_; - + rclcpp::PublisherBase::SharedPtr publisher_; std::string msg_type_; diff --git a/src/MessageTfFrameTransformer.ros2.cpp b/src/MessageTfFrameTransformer.ros2.cpp index 434eb99..894b0ce 100644 --- a/src/MessageTfFrameTransformer.ros2.cpp +++ b/src/MessageTfFrameTransformer.ros2.cpp @@ -138,7 +138,7 @@ void MessageTfFrameTransformer::detectMessageType() { } -void MessageTfFrameTransformer::transformGeneric(const std::shared_ptr& serialized_msg) { +void MessageTfFrameTransformer::transformGeneric(const std::shared_ptr& serialized_msg) { if (false) {} #define MESSAGE_TYPE(TYPE, NAME) \