Classes | Namespaces | Functions | Variables
t03_generic_ports.cpp File Reference
#include "behaviortree_cpp/bt_factory.h"
Include dependency graph for t03_generic_ports.cpp:

Go to the source code of this file.

Classes

class  CalculateGoal
 
struct  Position2D
 
class  PrintTarget
 

Namespaces

 BT
 

Functions

template<>
Position2D BT::convertFromString (StringView str)
 
int main ()
 

Variables

static const char * xml_text
 

Function Documentation

int main ( )

Definition at line 118 of file t03_generic_ports.cpp.

Variable Documentation

const char* xml_text
static
Initial value:
= R"(
<root main_tree_to_execute = "MainTree" >
<BehaviorTree ID="MainTree">
<Sequence name="root">
<CalculateGoal goal="{GoalPosition}" />
<PrintTarget target="{GoalPosition}" />
<SetBlackboard output_key="OtherGoal" value="-1;3" />
<PrintTarget target="{OtherGoal}" />
</Sequence>
</BehaviorTree>
</root>
)"

The tree is a Sequence of 4 actions

1) Store a value of Position2D in the entry "GoalPosition" using the action CalculateGoal.

2) Call PrintTarget. The input "target" will be read from the Blackboard entry "GoalPosition".

3) Use the built-in action SetBlackboard to write the key "OtherGoal". A conversion from string to Position2D will be done under the hood.

4) Call PrintTarget. The input "goal" will be read from the Blackboard entry "OtherGoal".

Definition at line 102 of file t03_generic_ports.cpp.



behaviortree_cpp
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Sat Jun 8 2019 18:04:05