1 #include <gtest/gtest.h> 3 #include "../sample_nodes/dummy_nodes.h" 7 TEST(SubTree, SiblingPorts_Issue_72)
12 <root main_tree_to_execute = "MainTree" > 14 <BehaviorTree ID="MainTree"> 16 <SetBlackboard value="hello" output_key="myParam" /> 17 <SubTree ID="mySubtree" param="myParam" /> 18 <SetBlackboard value="world" output_key="myParam" /> 19 <SubTree ID="mySubtree" param="myParam" /> 23 <BehaviorTree ID="mySubtree"> 24 <SaySomething ID="AlwaysSuccess" message="{param}" /> 33 for(
auto& bb: tree.blackboard_stack)
36 std::cout <<
"-----" << std::endl;
42 ASSERT_EQ(tree.blackboard_stack.size(), 3 );
void registerNodeType(const std::string &ID)
TEST(SubTree, SiblingPorts_Issue_72)
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
static const char * xml_text
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.