Common
common packages for kyubic
 
Loading...
Searching...
No Matches
qr_action.hpp
Go to the documentation of this file.
1
10#ifndef _QR_ACTION_HPP
11#define _QR_ACTION_HPP
12
13#include <planner_msgs/action/qr.hpp>
14#include <rclcpp/rclcpp.hpp>
15#include <std_msgs/msg/string.hpp>
16
18
19namespace behavior_tree
20{
21
26class QrAction : public RosActionNode<planner_msgs::action::QR>
27{
28public:
33 const std::string & name, const BT::NodeConfig & config,
34 rclcpp::Publisher<std_msgs::msg::String>::SharedPtr logger_pub,
35 rclcpp::Node::SharedPtr ros_node);
36
41 static BT::PortsList providedPorts();
42
46 bool setGoal(typename Action::Goal & goal) override;
47
51 BT::NodeStatus onResult(const WrappedResult & wr) override;
52
56 void onFeedback(const std::shared_ptr<const Feedback> feedback) override;
57
58private:
59 rclcpp::Publisher<std_msgs::msg::String>::SharedPtr logger_pub_;
60};
61
62} // namespace behavior_tree
63
64#endif // _QR_ACTION_HPP
QR Action Client implementation using the CUSTOM RosActionNode template. Target Action: planner_msgs:...
Definition: qr_action.hpp:27
bool setGoal(typename Action::Goal &goal) override
Sets the goal.start to true to trigger the server.
Definition: qr_action.cpp:27
BT::NodeStatus onResult(const WrappedResult &wr) override
Checks if the action finished successfully.
Definition: qr_action.cpp:36
void onFeedback(const std::shared_ptr< const Feedback > feedback) override
Feedback callback (Empty for QR action but required to implement)
Definition: qr_action.cpp:48
static BT::PortsList providedPorts()
Define ports Input: action_name.
Definition: qr_action.cpp:22
Template for ROS2 Action with Behavior Tree.
Definition: ros_action_node.hpp:28
typename rclcpp_action::ClientGoalHandle< Action >::WrappedResult WrappedResult
Definition: ros_action_node.hpp:33
Abstract class for ROS2 Action client with Behavior Tree.