NodeStatus status = NodeStatus::RUNNING; // Keep on ticking until you get either a SUCCESS or FAILURE state while( status == NodeStatus::RUNNING) { status = tree.tickRoot(); SleepMS(1); // optional sleep to avoid "busy loops" }
// let's visualize some information about the current state of the blackboards. std::cout << "--------------" << std::endl; tree.blackboard_stack[0]->debugMessage(); std::cout << "--------------" << std::endl; tree.blackboard_stack[1]->debugMessage(); std::cout << "--------------" << std::endl;
return 0; }
/* Expected output:
[ MoveBase: STARTED ]. goal: x=1 y=2.0 theta=3.00 [ MoveBase: FINISHED ] Robot says: mission accomplished -------------- move_result (std::string) -> full move_goal (Pose2D) -> full -------------- output (std::string) -> remapped to parent [move_result] target (Pose2D) -> remapped to parent [move_goal] -------------- */