Struct used to store a tree. If this object goes out of scope, the tree is destroyed. More...
#include <bt_factory.h>
Public Member Functions | |
void | haltTree () |
void | initialize () |
Tree & | operator= (const Tree &)=delete |
Tree & | operator= (Tree &&other) |
Blackboard::Ptr | rootBlackboard () |
TreeNode * | rootNode () const |
void | sleep (std::chrono::system_clock::duration timeout) |
NodeStatus | tickRoot () |
tickRoot send the tick signal to the root node. It will propagate through the entire tree. More... | |
NodeStatus | tickRootWhileRunning (std::chrono::milliseconds sleep_time=std::chrono::milliseconds(10)) |
tickRootWhileRunning imply execute tickRoot in a loop as long as the status is RUNNING. More... | |
Tree () | |
Tree (const Tree &)=delete | |
Tree (Tree &&other) | |
~Tree () | |
Public Attributes | |
std::vector< Blackboard::Ptr > | blackboard_stack |
std::unordered_map< std::string, TreeNodeManifest > | manifests |
std::vector< TreeNode::Ptr > | nodes |
Private Attributes | |
std::shared_ptr< WakeUpSignal > | wake_up_ |
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
To tick the tree, simply call:
NodeStatus status = my_tree.tickRoot();
Definition at line 125 of file bt_factory.h.
|
inline |
Definition at line 132 of file bt_factory.h.
|
delete |
|
inline |
Definition at line 139 of file bt_factory.h.
BT::Tree::~Tree | ( | ) |
Definition at line 337 of file bt_factory.cpp.
|
inline |
Definition at line 162 of file bt_factory.h.
|
inline |
Definition at line 153 of file bt_factory.h.
Definition at line 144 of file bt_factory.h.
Blackboard::Ptr BT::Tree::rootBlackboard | ( | ) |
Definition at line 342 of file bt_factory.cpp.
|
inline |
Definition at line 181 of file bt_factory.h.
void BT::Tree::sleep | ( | std::chrono::system_clock::duration | timeout | ) |
Sleep for a certain amount of time. This sleep could be interrupted by the method TreeNode::emitStateChanged()
Definition at line 332 of file bt_factory.cpp.
|
inline |
tickRoot send the tick signal to the root node. It will propagate through the entire tree.
Definition at line 210 of file bt_factory.h.
|
inline |
tickRootWhileRunning imply execute tickRoot in a loop as long as the status is RUNNING.
sleep_time | maximum sleep time between consecutive loops. |
Definition at line 194 of file bt_factory.h.
std::vector<Blackboard::Ptr> BT::Tree::blackboard_stack |
Definition at line 129 of file bt_factory.h.
std::unordered_map<std::string, TreeNodeManifest> BT::Tree::manifests |
Definition at line 130 of file bt_factory.h.
std::vector<TreeNode::Ptr> BT::Tree::nodes |
Definition at line 128 of file bt_factory.h.
|
private |
Definition at line 239 of file bt_factory.h.