Go to the documentation of this file. 1 #include <gtest/gtest.h>
12 std::cout <<
"ctor" << std::endl;
19 if (getInput(
"in_port_A", val_A) && getInput(
"in_port_B", val_B) && val_A == 42 &&
29 return {BT::InputPort<int>(
"in_port_A", 42,
"magic_number"), BT::InputPort<int>(
"in_"
36 TEST(PortTest, DefaultPorts)
38 std::string xml_txt = R
"(
39 <root main_tree_to_execute = "MainTree" >
40 <BehaviorTree ID="MainTree">
41 <NodeWithPorts name = "first" in_port_B="66" />
54 TEST(PortTest, Descriptions)
56 std::string xml_txt = R
"(
57 <root main_tree_to_execute = "MainTree" >
58 <BehaviorTree ID="MainTree" _description="this is my tree" >
60 <NodeWithPorts name="first" in_port_B="66" _description="this is my action" />
61 <SubTree ID="SubTree" name="second" _description="this is a subtree"/>
65 <BehaviorTree ID="SubTree" _description="this is a subtre" >
66 <NodeWithPorts name="third" in_port_B="99" />
96 if (getInput(
"int_port", val_A) && getInput(
"any_port", val_B))
105 return {BT::InputPort<int>(
"int_port"), BT::InputPort<MyType>(
"any_port")};
123 return {BT::OutputPort<int>(
"int_port"), BT::OutputPort<MyType>(
"any_port")};
129 std::string xml_txt = R
"(
130 <root main_tree_to_execute = "MainTree" >
131 <BehaviorTree ID="MainTree">
133 <NodeInPorts int_port="{ip}" any_port="{ap}" />
134 <NodeOutPorts int_port="{ip}" any_port="{ap}" />
164 return {BT::InputPort<std::string>(
"name")};
NodeStatus tick()
Method to be implemented by the user.
void registerNodeType(const std::string &ID)
std::unordered_map< std::string, PortInfo > PortsList
IllegalPorts(const std::string &name, const NodeConfiguration &config)
NodeOutPorts(const std::string &name, const NodeConfiguration &config)
NodeStatus tick()
Method to be implemented by the user.
NodeStatus tick()
Method to be implemented by the user.
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
static PortsList providedPorts()
NodeStatus tick()
Method to be implemented by the user.
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
static PortsList providedPorts()
NodeWithPorts(const std::string &name, const NodeConfiguration &config)
static PortsList providedPorts()
TEST(PortTest, DefaultPorts)
NodeInPorts(const std::string &name, const NodeConfiguration &config)
static PortsList providedPorts()
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19