Skip to content

Commit

Permalink
Use topic_name for get_costmap service (ros-navigation#4420)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamaki Nishino <[email protected]>
  • Loading branch information
otamachan authored and Manos-G committed Aug 1, 2024
1 parent 4391f69 commit 33da8fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nav2_costmap_2d/src/costmap_2d_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Costmap2DPublisher::Costmap2DPublisher(

// Create a service that will use the callback function to handle requests.
costmap_service_ = node->create_service<nav2_msgs::srv::GetCostmap>(
"get_costmap", std::bind(
"get_" + topic_name, std::bind(
&Costmap2DPublisher::costmap_service_callback,
this, std::placeholders::_1, std::placeholders::_2,
std::placeholders::_3));
Expand Down

0 comments on commit 33da8fe

Please sign in to comment.