14 <root main_tree_to_execute = "MainTree" > 15 <BehaviorTree ID="MainTree"> 16 <SequenceStar name="root"> 17 <MoveTo goal="-1;3;0.5" /> 18 <MoveTo goal="${myGoal}" /> 36 printf(
"Going to: %f %f %f\n", goal.
x, goal.
y, goal.
z);
49 if (parts.size() != 3)
51 throw std::runtime_error(
"invalid input)");
76 parent_node.getParam(
"goal", goal);
81 bool res = move_to.
go( goal );
83 return res ? NodeStatus::SUCCESS : NodeStatus::FAILURE;
90 auto blackboard = Blackboard::create<BlackboardLocal>();
95 blackboard->set(
"myGoal", my_goal);
98 while (status == NodeStatus::RUNNING)
100 status = tree.root_node->executeTick();
double convertFromString< double >(const StringView &str)
Point3D convertFromString(const StringView &key)
std::vector< StringView > splitString(const StringView &strToSplit, char delimeter)
nonstd::string_view StringView
void registerSimpleAction(const std::string &ID, const SimpleActionNode::TickFunctor &tick_functor)
Register a SimpleActionNode.
const std::string xml_text
Tree buildTreeFromText(const BehaviorTreeFactory &factory, const std::string &text, const Blackboard::Ptr &blackboard=Blackboard::Ptr())