Go to the documentation of this file.
13 #ifndef DECORATOR_BLACKBOARD_PRECONDITION_NODE_H
14 #define DECORATOR_BLACKBOARD_PRECONDITION_NODE_H
17 #include <type_traits>
40 if (std::is_same<T, int>::value)
42 else if (std::is_same<T, double>::value)
44 else if (std::is_same<T, std::string>::value)
46 else if (std::is_same<T, bool>::value)
55 InputPort<NodeStatus>(
"return_on_mismatch")};
65 inline bool IsSame(
const T& a,
const T& b)
70 inline bool IsSame(
const double& a,
const double& b)
72 constexpr
double EPS =
static_cast<double>(std::numeric_limits<float>::epsilon());
73 return std::abs(a - b) <= EPS;
85 if (getInput(
"value_A", value_A) && getInput(
"value_B", value_B) &&
88 return child_node_->executeTick();
95 getInput(
"return_on_mismatch", default_return_status);
96 return default_return_status;
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
virtual ~BlackboardPreconditionNode() override=default
std::pair< std::string, PortInfo > InputPort(StringView name, StringView description={})
std::unordered_map< std::string, PortInfo > PortsList
const NodeConfiguration & config() const
void setRegistrationID(StringView ID)
const std::string & name() const
Name of the instance, not the type.
static PortsList providedPorts()
bool IsSame(const T &a, const T &b)
BlackboardPreconditionNode(const std::string &name, const NodeConfiguration &config)
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19