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<>
Point3D BT::convertFromString (StringView key)
 
int main ()
 

Variables

static const char * xml_text
 

Function Documentation

◆ main()

int main ( )

Definition at line 120 of file t03_generic_ports.cpp.

Variable Documentation

◆ xml_text

const char* xml_text
static
Initial value:
= R"(
<root BTCPP_format="4" >
<BehaviorTree ID="MainTree">
<Sequence name="root">
<CalculateGoal goal="{GoalPosition}" />
<PrintTarget target="{GoalPosition}" />
<Script code="OtherGoal='-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 Script 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 104 of file t03_generic_ports.cpp.



behaviortree_cpp_v4
Author(s): Davide Faconti
autogenerated on Fri Jun 28 2024 02:20:08