Go to the documentation of this file.
28 if(!
getInput(
"max_failures", max_failures))
30 throw RuntimeError(
"Missing parameter [max_failures] in ParallelNode");
35 size_t skipped_count = 0;
39 throw LogicError(
"Number of children is less than threshold. Can never fail.");
45 for(
size_t index = 0; index < children_count; index++)
81 throw LogicError(
"[",
name(),
"]: A children should not return IDLE");
86 if(skipped_count == children_count)
Result getInput(const std::string &key, T &destination) const
size_t failure_threshold_
std::set< size_t > completed_list_
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
Abstract base class for Behavior Tree Nodes.
std::vector< TreeNode * > children_nodes_
void setFailureThreshold(int threshold)
NodeStatus status() const
void setStatus(NodeStatus new_status)
setStatus changes the status of the node. it will throw if you try to change the status to IDLE,...
ParallelAllNode(const std::string &name, const NodeConfig &config)
const std::string & name() const
Name of the instance, not the type.
virtual void halt() override
void haltChildren()
same as resetChildren()
virtual void halt() override
size_t failureThreshold() const