Go to the documentation of this file. 1 #ifndef SIMPLE_BT_NODES_H
2 #define SIMPLE_BT_NODES_H
64 return{ BT::InputPort<std::string>(
"message") };
82 return{ BT::InputPort<int>(
"msec") };
92 return NodeStatus::SUCCESS;
95 using namespace std::chrono;
97 deadline_ = system_clock::now() + milliseconds(msec);
98 return NodeStatus::RUNNING;
105 if ( std::chrono::system_clock::now() >=
deadline_ )
107 return NodeStatus::SUCCESS;
110 return NodeStatus::RUNNING;
117 std::cout <<
"SleepNode interrupted" << std::endl;
139 #endif // SIMPLE_BT_NODES_H
Result getInput(const std::string &key, T &destination) const
SyncActionNode(const std::string &name, const NodeConfiguration &config)
static BT::PortsList providedPorts()
ApproachObject(const std::string &name)
void registerNodeType(const std::string &ID)
std::chrono::system_clock::time_point deadline_
NodeStatus onRunning() override
method invoked by an action in the RUNNING state.
Abstract base class for Behavior Tree Nodes.
BT::NodeStatus CheckBattery()
std::unordered_map< std::string, PortInfo > PortsList
BT::NodeStatus SaySomethingSimple(BT::TreeNode &self)
const NodeConfiguration & config() const
StatefulActionNode(const std::string &name, const NodeConfiguration &config)
NodeStatus tick() override
Method to be implemented by the user.
NodeStatus tick() override
Method to be implemented by the user.
void RegisterNodes(BT::BehaviorTreeFactory &factory)
NodeStatus onStart() override
The BehaviorTreeFactory is used to create instances of a TreeNode at run-time.
const std::string & name() const
Name of the instance, not the type.
BT::NodeStatus SayHello()
SleepNode(const std::string &name, const BT::NodeConfiguration &config)
SaySomething(const std::string &name, const BT::NodeConfiguration &config)
void registerSimpleCondition(const std::string &ID, const SimpleConditionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleCondition help you register nodes of type SimpleConditionNode.
static BT::PortsList providedPorts()
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
BT::NodeStatus CheckTemperature()
void registerSimpleAction(const std::string &ID, const SimpleActionNode::TickFunctor &tick_functor, PortsList ports={})
registerSimpleAction help you register nodes of type SimpleActionNode.
The ActionNode is the prefered way to implement asynchronous Actions. It is actually easier to use co...
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19