From ac6f54761649ae838683d0214c01b82fead69f57 Mon Sep 17 00:00:00 2001 From: nrodriguez <nicolas.adrian.rodriguez@upc.edu> Date: Fri, 16 Jul 2021 15:52:17 +0100 Subject: [PATCH] Fixed compilation bugs on waypoints functions --- src/tiago_nav_bt_module.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/tiago_nav_bt_module.cpp b/src/tiago_nav_bt_module.cpp index 6fc5357..5e51e47 100644 --- a/src/tiago_nav_bt_module.cpp +++ b/src/tiago_nav_bt_module.cpp @@ -437,11 +437,11 @@ BT::NodeStatus CTiagoNavModuleBT::sync_tiago_nav_go_to_waypoints(BT::TreeNode& s first_index_goal = first_index.value(); num_goal = num.value(); if (!continue_on_error) - this->tiago_nav_module.go_to_waypoint(group_goal, first_index_goal, num_goal); + this->tiago_nav_module.go_to_waypoints(group_goal, first_index_goal, num_goal); else { continue_on_error_goal = continue_on_error.value(); - this->tiago_nav_module.go_to_waypoint(group_goal, first_index_goal, num_goal, continue_on_error_goal); + this->tiago_nav_module.go_to_waypoints(group_goal, first_index_goal, num_goal, continue_on_error_goal); } return BT::NodeStatus::SUCCESS; } @@ -463,7 +463,10 @@ BT::NodeStatus CTiagoNavModuleBT::async_tiago_nav_go_to_waypoints(BT::TreeNode& if (new_goal) { - double x_goal, y_goal, x_y_pos_tol_goal; + std::string group_goal; + unsigned int first_index_goal, num_goal; + bool continue_on_error_goal; + if (!group || !first_index || !num) { ROS_ERROR("CTiagoNavModuleBT::async_tiago_nav_go_to_waypoints-> Incorrect or missing input. It needs the following input ports: group(std::string), first_index(unsigned int), num(unsigned int) and [Optional] continue_on_error(bool)"); @@ -474,11 +477,11 @@ BT::NodeStatus CTiagoNavModuleBT::async_tiago_nav_go_to_waypoints(BT::TreeNode& first_index_goal = first_index.value(); num_goal = num.value(); if (!continue_on_error) - this->tiago_nav_module.go_to_waypoint(group_goal, first_index_goal, num_goal); + this->tiago_nav_module.go_to_waypoints(group_goal, first_index_goal, num_goal); else { continue_on_error_goal = continue_on_error.value(); - this->tiago_nav_module.go_to_waypoint(group_goal, first_index_goal, num_goal, continue_on_error_goal); + this->tiago_nav_module.go_to_waypoints(group_goal, first_index_goal, num_goal, continue_on_error_goal); } } if (this->tiago_nav_module.is_finished()) -- GitLab