Go to the documentation of this file.
22 printf(
"Converting string: \"%s\"\n", str.data());
26 if (parts.size() != 2)
50 setOutput(
"goal", mygoal);
55 return {OutputPort<Position2D>(
"goal")};
68 auto res = getInput<Position2D>(
"target");
71 throw RuntimeError(
"error reading port [target]:", res.error());
74 printf(
"Target positions: [ %.1f, %.1f ]\n", goal.
x, goal.
y);
81 const char* description =
"Simply print the target on console...";
82 return {InputPort<Position2D>(
"target", description)};
106 <root main_tree_to_execute = "MainTree" >
107 <BehaviorTree ID="MainTree">
108 <Sequence name="root">
109 <CalculateGoal goal="{GoalPosition}" />
110 <PrintTarget target="{GoalPosition}" />
111 <SetBlackboard output_key="OtherGoal" value="-1;3" />
112 <PrintTarget target="{OtherGoal}" />
129 tree.tickRootWhileRunning();
static const char * xml_text
void registerNodeType(const std::string &ID)
NodeStatus tick() override
Method to be implemented by the user.
CalculateGoal(const std::string &name, const NodeConfiguration &config)
PrintTarget(const std::string &name, const NodeConfiguration &config)
std::unordered_map< std::string, PortInfo > PortsList
Point3D convertFromString(StringView key)
static PortsList providedPorts()
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
std::vector< StringView > splitString(const StringView &strToSplit, char delimeter)
NodeStatus tick() override
Method to be implemented by the user.
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
double convertFromString< double >(StringView str)
nonstd::string_view StringView
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
static PortsList providedPorts()
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19