Common
common packages for kyubic
 
Loading...
Searching...
No Matches
always_running.hpp
Go to the documentation of this file.
1
10#ifndef _ALWAYS_RUNNING_HPP
11#define _ALWAYS_RUNNING_HPP
12
13#include <behaviortree_cpp/action_node.h>
14
15#include <rclcpp/rclcpp.hpp>
16#include <std_msgs/msg/string.hpp>
17
18namespace behavior_tree
19{
20
26class AlwaysRunning : public BT::StatefulActionNode
27{
28public:
35 const std::string & name, const BT::NodeConfig & config,
36 rclcpp::Publisher<std_msgs::msg::String>::SharedPtr logger_pub);
37
42 static BT::PortsList providedPorts();
43
48 BT::NodeStatus onStart() override;
49
54 BT::NodeStatus onRunning() override;
55
59 void onHalted() override;
60
61private:
62 rclcpp::Publisher<std_msgs::msg::String>::SharedPtr logger_pub_;
63};
64
65} // namespace behavior_tree
66
67#endif // !_ALWAYS_RUNNING_HPP
A simple node that constantly returns RUNNING.
Definition: always_running.hpp:27
void onHalted() override
Called when the node is halted.
Definition: always_running.cpp:36
BT::NodeStatus onStart() override
Called first when the node is ticked.
Definition: always_running.cpp:26
BT::NodeStatus onRunning() override
Called continuously after onStart() returns RUNNING.
Definition: always_running.cpp:34
static BT::PortsList providedPorts()
Defines the ports used by this node.
Definition: always_running.cpp:24