#include "behaviortree_cpp/bt_factory.h"
Go to the source code of this file.
Classes | |
class | PrintNumber |
Functions | |
int | main () |
Variables | |
static const char * | xml_main |
int main | ( | ) |
Definition at line 74 of file t16_global_blackboard.cpp.
|
static |
This example introduces the concept of a "global blackboard", and the syntax to use it.
As you know know from previous tutorials, blackboard are "scoped", i.e. each SubTree (including the one in the root) has its own Blackboard, isolated by default, unless we do remapping.
It is possible (since version 4.6) to create a global BB, accessible from everywhere without remapping.
In the example below we can access the entry "value" and "value_sqr" from everywhere, as long as we use the pregix "@".
Note as <SubTree ID="MySub"> doesn't have any remapping
In other words, the prefix "@" means: "search the entry in the top-level blackboard of the hierarchy".
In this case, the top-level blackboard will be [global_blackboard].
Definition at line 28 of file t16_global_blackboard.cpp.