10 <root BTCPP_format="4">
12 <BehaviorTree ID="MainTree">
15 <AlwaysFailure name="failing_action"/>
16 <SubTree ID="SubTreeA" name="mysub"/>
18 <AlwaysSuccess name="last_action"/>
22 <BehaviorTree ID="SubTreeA">
24 <AlwaysSuccess name="action_subA"/>
25 <SubTree ID="SubTreeB" name="sub_nested"/>
26 <SubTree ID="SubTreeB" />
30 <BehaviorTree ID="SubTreeB">
31 <AlwaysSuccess name="action_subB"/>
55 std::map<int, std::string> UID_to_path;
61 std::cout << node->
UID() <<
" -> " << node->
fullPath() << std::endl;
64 tree.tickWhileRunning();
67 const auto& last_action_stats = observer.
getStatistics(
"last_action");
68 assert(last_action_stats.transitions_count > 0);
70 std::cout <<
"----------------" << std::endl;
72 for(
const auto& [uid, name] : UID_to_path)
77 << stats.success_count <<
"/" << stats.failure_count << std::endl;