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

ROS 2 Lifecycle Node Management Action for BehaviorTree.CPP. More...

#include <lifecycle_manager.hpp>

+ Inheritance diagram for behavior_tree::LifecycleManager:
+ Collaboration diagram for behavior_tree::LifecycleManager:

Public Member Functions

 LifecycleManager (const std::string &name, const BT::NodeConfig &config, rclcpp::Publisher< std_msgs::msg::String >::SharedPtr logger_pub, rclcpp::Node::SharedPtr ros_node)
 Constructor.
 
BT::NodeStatus onStart () override
 Called first when the node is ticked (starts async operation)
 
BT::NodeStatus onRunning () override
 Called continuously after onStart() until async operation completes.
 
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

ROS 2 Lifecycle Node Management Action for BehaviorTree.CPP.

Requests a state transition specified by the "transition" port for the lifecycle node specified by the "node_name" port.

Constructor & Destructor Documentation

◆ LifecycleManager()

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

Constructor.

Parameters
nameNode name
configNode configuration
ros_nodeShared pointer to the ROS 2 node

Member Function Documentation

◆ onHalted()

void behavior_tree::LifecycleManager::onHalted ( )
override

Called when the node is halted.

◆ onRunning()

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

Called continuously after onStart() until async operation completes.

Returns
BT::NodeStatus::SUCCESS, FAILURE, or RUNNING

◆ onStart()

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

Called first when the node is ticked (starts async operation)

Returns
BT::NodeStatus::RUNNING

◆ providedPorts()

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

Defines the ports used by this node.

Returns
List of provided ports

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