Go to the documentation of this file.
19 <root BTCPP_format="4" >
21 <BehaviorTree ID="MainTree">
22 <Sequence name="root">
24 <SaySomething message="mission started..." />
25 <MoveBase goal="1;2;3"/>
26 <SaySomething message="mission completed!" />
35 <root BTCPP_format="4" >
37 <BehaviorTree ID="MainTree">
38 <ReactiveSequence name="root">
41 <SaySomething message="mission started..." />
42 <MoveBase goal="1;2;3"/>
43 <SaySomething message="mission completed!" />
72 std::cout <<
"\n------------ BUILDING A NEW TREE ------------\n\n";
80 std::cout <<
"--- ticking\n";
81 status = tree.tickWhileRunning();
82 std::cout <<
"--- status: " <<
toStr(status) <<
"\n\n";
88 std::cout <<
"--- ticking\n";
89 status = tree.tickOnce();
90 std::cout <<
"--- status: " <<
toStr(status) <<
"\n\n";
95 tree.sleep(std::chrono::milliseconds(100));
static const char * xml_text_reactive
BT::NodeStatus CheckBattery()
constexpr auto bind(Callback &&callback, BoundArgs &&... args)
Binds the operator() of the callback with pre-defined/remapped values.
void registerNodeType(const std::string &ID, const PortsList &ports, ExtraArgs... args)
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
createTreeFromText will parse the XML directly from string. The XML needs to contain either a single ...
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
static const char * xml_text_sequence
void registerSimpleCondition(const std::string &ID, const SimpleConditionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleCondition help you register nodes of type SimpleConditionNode.
static const char * xml_text
std::string toStr(const T &value)
toStr is the reverse operation of convertFromString.