00001 #include "behaviortree_cpp/bt_factory.h" 00002 00003 using namespace BT; 00004 00005 namespace CrossDoor 00006 { 00007 inline void SleepMS(int ms) 00008 { 00009 std::this_thread::sleep_for(std::chrono::milliseconds(ms)); 00010 } 00011 00012 BT::NodeStatus IsDoorOpen(TreeNode& self); 00013 00014 BT::NodeStatus IsDoorLocked(TreeNode& self); 00015 00016 BT::NodeStatus UnlockDoor(TreeNode& self); 00017 00018 BT::NodeStatus PassThroughDoor(TreeNode& self); 00019 00020 BT::NodeStatus PassThroughWindow(TreeNode& self); 00021 00022 BT::NodeStatus OpenDoor(TreeNode& self); 00023 00024 BT::NodeStatus CloseDoor(TreeNode& self); 00025 00026 void RegisterNodes(BT::BehaviorTreeFactory& factory); 00027 }