Common
common packages for kyubic
 
Loading...
Searching...
No Matches
behavior_tree::AlwaysRunning Class Reference

A simple node that constantly returns RUNNING. More...

#include <always_running.hpp>

+ Inheritance diagram for behavior_tree::AlwaysRunning:
+ Collaboration diagram for behavior_tree::AlwaysRunning:

Public Member Functions

 AlwaysRunning (const std::string &name, const BT::NodeConfig &config, rclcpp::Publisher< std_msgs::msg::String >::SharedPtr logger_pub)
 Constructor.
 
BT::NodeStatus onStart () override
 Called first when the node is ticked.
 
BT::NodeStatus onRunning () override
 Called continuously after onStart() returns RUNNING.
 
void onHalted () override
 Called when the node is halted.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Defines the ports used by this node.
 

Detailed Description

A simple node that constantly returns RUNNING.

Returns RUNNING when onStart() is called. Returns RUNNING when onRunning() is called.

Constructor & Destructor Documentation

◆ AlwaysRunning()

behavior_tree::AlwaysRunning::AlwaysRunning ( const std::string &  name,
const BT::NodeConfig &  config,
rclcpp::Publisher< std_msgs::msg::String >::SharedPtr  logger_pub 
)

Constructor.

Parameters
nameNode name
configNode configuration

Member Function Documentation

◆ onHalted()

void behavior_tree::AlwaysRunning::onHalted ( )
override

Called when the node is halted.

◆ onRunning()

BT::NodeStatus behavior_tree::AlwaysRunning::onRunning ( )
override

Called continuously after onStart() returns RUNNING.

Returns
BT::NodeStatus::RUNNING forever.

◆ onStart()

BT::NodeStatus behavior_tree::AlwaysRunning::onStart ( )
override

Called first when the node is ticked.

Returns
BT::NodeStatus::RUNNING immediately.

◆ providedPorts()

BT::PortsList behavior_tree::AlwaysRunning::providedPorts ( )
static

Defines the ports used by this node.

Returns
An empty list as this node requires no ports.

The documentation for this class was generated from the following files: