From 33da8feae1e4ca4ac4cec1de391f651639ccbbcc Mon Sep 17 00:00:00 2001 From: Tamaki Nishino Date: Wed, 12 Jun 2024 08:49:16 +0900 Subject: [PATCH] Use topic_name for get_costmap service (#4420) Signed-off-by: Tamaki Nishino --- nav2_costmap_2d/src/costmap_2d_publisher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nav2_costmap_2d/src/costmap_2d_publisher.cpp b/nav2_costmap_2d/src/costmap_2d_publisher.cpp index 58c7d43d56..a713ace130 100644 --- a/nav2_costmap_2d/src/costmap_2d_publisher.cpp +++ b/nav2_costmap_2d/src/costmap_2d_publisher.cpp @@ -81,7 +81,7 @@ Costmap2DPublisher::Costmap2DPublisher( // Create a service that will use the callback function to handle requests. costmap_service_ = node->create_service( - "get_costmap", std::bind( + "get_" + topic_name, std::bind( &Costmap2DPublisher::costmap_service_callback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));