From fcb90807b5758d505b557b336044c86572132c23 Mon Sep 17 00:00:00 2001 From: Davide Faconti Date: Fri, 19 Jan 2024 14:35:34 +0100 Subject: [PATCH] fix for backward compatibility Signed-off-by: Davide Faconti --- .../include/nav2_behavior_tree/bt_utils.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_utils.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_utils.hpp index ddcec8f4df9..be76c4f0592 100644 --- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_utils.hpp +++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_utils.hpp @@ -132,22 +132,22 @@ inline std::set convertFromString(StringView key) } /** - * @brief Return parameter value from behavior tree node or ros2 parameter file + * @brief Return parameter value from behavior tree node or ros2 parameter file. * @param node rclcpp::Node::SharedPtr * @param param_name std::string - * @param behavior_tree_node the node - * @return + * @param behavior_tree_node T2 + * @return */ -template -T deconflictPortAndParamFrame( +template +T1 deconflictPortAndParamFrame( rclcpp::Node::SharedPtr node, std::string param_name, const BT::TreeNode * behavior_tree_node) { - T param_value; - bool param_from_input = behavior_tree_node->getInput(param_name, param_value); + T1 param_value; + bool param_from_input = behavior_tree_node->getInput(param_name, param_value); - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v) { // not valid if port doesn't exist or it is an empty string param_from_input &= !param_value.empty(); }