13 bool door_open =
self.blackboard()->get<
bool>(
"door_open");
15 return door_open ? NodeStatus::SUCCESS : NodeStatus::FAILURE;
21 bool door_locked =
self.blackboard()->get<
bool>(
"door_locked");
23 return door_locked ? NodeStatus::SUCCESS : NodeStatus::FAILURE;
29 self.blackboard()->set(
"door_locked",
false);
31 return NodeStatus::SUCCESS;
37 bool door_open =
self.blackboard()->get<
bool>(
"door_open");
39 return door_open ? NodeStatus::SUCCESS : NodeStatus::FAILURE;
45 return NodeStatus::SUCCESS;
51 bool door_locked =
self.blackboard()->get<
bool>(
"door_locked");
55 return NodeStatus::FAILURE;
58 self.blackboard()->set(
"door_open",
true);
59 return NodeStatus::SUCCESS;
64 bool door_open =
self.blackboard()->get<
bool>(
"door_open");
69 self.blackboard()->set(
"door_open",
false);
71 return NodeStatus::SUCCESS;
BT::NodeStatus PassThroughDoor(TreeNode &self)
BT::NodeStatus PassThroughWindow(TreeNode &self)
BT::NodeStatus CloseDoor(TreeNode &self)
void registerSimpleCondition(const std::string &ID, const SimpleConditionNode::TickFunctor &tick_functor)
Register a SimpleConditionNode.
BT::NodeStatus OpenDoor(TreeNode &self)
void RegisterNodes(BT::BehaviorTreeFactory &factory)
BT::NodeStatus IsDoorOpen(TreeNode &self)
void registerSimpleAction(const std::string &ID, const SimpleActionNode::TickFunctor &tick_functor)
Register a SimpleActionNode.
BT::NodeStatus IsDoorLocked(TreeNode &self)
BT::NodeStatus UnlockDoor(TreeNode &self)
BT_REGISTER_NODES(factory)