1 #include <gtest/gtest.h> 21 std::this_thread::sleep_for(std::chrono::milliseconds(10));
31 <BehaviorTree ID="MainTree"> 43 auto t1 = system_clock::now();
45 tree.sleep(milliseconds(200));
46 auto t2 = system_clock::now();
48 auto dT = duration_cast<milliseconds>(t2 - t1).
count();
49 std::cout <<
"Woke up after msec: " << dT << std::endl;
void registerNodeType(const std::string &ID)
The AsyncActionNode uses a different thread, where the action will be executed.
static const char * xml_text
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
static BT::PortsList providedPorts()
Tree createTreeFromText(const std::string &text, Blackboard::Ptr blackboard=Blackboard::create())
BT::NodeStatus tick() override
Method to be implemented by the user.
FastAction(const std::string &name, const BT::NodeConfiguration &config)
Struct used to store a tree. If this object goes out of scope, the tree is destroyed.
std::unordered_map< std::string, PortInfo > PortsList
static volatile int count