Skip to content

Commit 28474a9

Browse files
NicolasRochaPachecopepisg
authored andcommitted
Update controller server goal checker (#3240)
* [FIX] Update controller server goal checker * [FIX] Autoformat code * [FIX] Misplaced tabs. Co-authored-by: Pedro Alejandro González <[email protected]>
1 parent bd86155 commit 28474a9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

nav2_controller/src/controller_server.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,16 @@ void ControllerServer::updateGlobalPath()
528528
action_server_->terminate_current();
529529
return;
530530
}
531+
std::string current_goal_checker;
532+
if (findGoalCheckerId(goal->goal_checker_id, current_goal_checker)) {
533+
current_goal_checker_ = current_goal_checker;
534+
} else {
535+
RCLCPP_INFO(
536+
get_logger(), "Terminating action, invalid goal checker %s requested.",
537+
goal->goal_checker_id.c_str());
538+
action_server_->terminate_current();
539+
return;
540+
}
531541
setPlannerPath(goal->path);
532542
}
533543
}

0 commit comments

Comments
 (0)