MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.ROS2 / handle_goal

Method handle_goal

behaviortree_ros2/src/tree_execution_server.cpp:137–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137rclcpp_action::GoalResponse
138TreeExecutionServer::handle_goal(const rclcpp_action::GoalUUID& /* uuid */,
139 std::shared_ptr<const ExecuteTree::Goal> goal)
140{
141 RCLCPP_INFO(kLogger, "Received goal request to execute Behavior Tree: %s",
142 goal->target_tree.c_str());
143
144 if(!onGoalReceived(goal->target_tree, goal->payload))
145 {
146 return rclcpp_action::GoalResponse::REJECT;
147 }
148 return rclcpp_action::GoalResponse::ACCEPT_AND_EXECUTE;
149}
150
151rclcpp_action::CancelResponse TreeExecutionServer::handle_cancel(
152 const std::shared_ptr<GoalHandleExecuteTree> goal_handle)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected