23 unsigned failure_threshold)
56 size_t success_childred_num = 0;
57 size_t failure_childred_num = 0;
63 throw LogicError(
"Number of children is less than threshold. Can never succeed.");
68 throw LogicError(
"Number of children is less than threshold. Can never fail.");
72 for (
unsigned int i = 0; i < children_count; i++)
76 bool in_skip_list = (
skip_list_.count(i) != 0);
81 child_status = child_node->
status();
95 success_childred_num++;
111 failure_childred_num++;
131 throw LogicError(
"A child node must never return IDLE");
unsigned int thresholdM()
const std::string & name() const
Name of the instance, not the type.
std::vector< TreeNode * > children_nodes_
const NodeConfiguration & config() const
virtual void halt() override
void setThresholdFM(unsigned int threshold_M)
static constexpr const char * THRESHOLD_SUCCESS
unsigned int success_threshold_
static constexpr const char * THRESHOLD_FAILURE
std::set< int > skip_list_
bool read_parameter_from_ports_
void setThresholdM(unsigned int threshold_M)
virtual void halt() override
unsigned int thresholdFM()
Result getInput(const std::string &key, T &destination) const
Abstract base class for Behavior Tree Nodes.
unsigned int failure_threshold_
void setRegistrationID(StringView ID)
ParallelNode(const std::string &name, unsigned success_threshold, unsigned failure_threshold=1)
NodeStatus status() const
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
virtual BT::NodeStatus executeTick()
The method that should be used to invoke tick() and setStatus();.