Go to the documentation of this file.
25 int failure_threshold) :
27 success_threshold_(success_threshold),
28 failure_threshold_(failure_threshold),
29 read_parameter_from_ports_(
false)
31 setRegistrationID(
"Parallel");
36 success_threshold_(1),
37 failure_threshold_(1),
38 read_parameter_from_ports_(true)
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");
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
NodeStatus status() const
void setSuccessThreshold(int threshold_M)
ParallelNode(const std::string &name, int success_threshold, int failure_threshold=1)
size_t successThreshold() const
void setFailureThreshold(int threshold_M)
static constexpr const char * THRESHOLD_SUCCESS
std::set< int > skip_list_
virtual void halt() override
virtual void halt() override
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19