Go to the documentation of this file.
26 , success_threshold_(-1)
27 , failure_threshold_(1)
28 , read_parameter_from_ports_(
false)
30 setRegistrationID(
"Parallel");
35 , success_threshold_(-1)
36 , failure_threshold_(1)
37 , read_parameter_from_ports_(true)
59 throw LogicError(
"Number of children is less than threshold. Can never succeed.");
64 throw LogicError(
"Number of children is less than threshold. Can never fail.");
69 size_t skipped_count = 0;
72 for(
size_t i = 0; i < children_count; i++)
104 throw LogicError(
"[",
name(),
"]: A children should not return IDLE");
122 if(((children_count -
failure_count_) < required_success_count) ||
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
Result getInput(const std::string &key, T &destination) const
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.
static constexpr const char * THRESHOLD_FAILURE
Abstract base class for Behavior Tree Nodes.
std::vector< TreeNode * > children_nodes_
bool read_parameter_from_ports_
size_t failureThreshold() 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,...
size_t successThreshold() const
void setFailureThreshold(int threshold)
const std::string & name() const
Name of the instance, not the type.
ParallelNode(const std::string &name)
static constexpr const char * THRESHOLD_SUCCESS
void setSuccessThreshold(int threshold)
virtual void halt() override
virtual void halt() override
std::set< size_t > completed_list_