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

QR Action Client implementation using the CUSTOM RosActionNode template. Target Action: planner_msgs::action::QR. More...

#include <qr_action.hpp>

+ Inheritance diagram for behavior_tree::QrAction:
+ Collaboration diagram for behavior_tree::QrAction:

Public Member Functions

 QrAction (const std::string &name, const BT::NodeConfig &config, rclcpp::Publisher< std_msgs::msg::String >::SharedPtr logger_pub, rclcpp::Node::SharedPtr ros_node)
 Constructor matching the custom base class signature.
 
bool setGoal (typename Action::Goal &goal) override
 Sets the goal.start to true to trigger the server.
 
BT::NodeStatus onResult (const WrappedResult &wr) override
 Checks if the action finished successfully.
 
void onFeedback (const std::shared_ptr< const Feedback > feedback) override
 Feedback callback (Empty for QR action but required to implement)
 
- Public Member Functions inherited from behavior_tree::RosActionNode< planner_msgs::action::QR >
 RosActionNode (const std::string &name, const BT::NodeConfig &config, rclcpp::Node::SharedPtr ros_node)
 Create action client.
 
virtual bool setGoal (typename Action::Goal &goal)=0
 Configures the Goal message.
 
virtual BT::NodeStatus onResult (const WrappedResult &wr)=0
 Processes the final result received from the server.
 
virtual void onFeedback (const std::shared_ptr< const Feedback > feedback)
 Behavior when recieving feadback.
 
BT::NodeStatus onStart () override
 Called when the node is first ticked. Initiates the ROS 2 action.
 
BT::NodeStatus onRunning () override
 This method manages the asynchronous state machine:
 
void onHalted () override
 Cancels the currently active goal if one exists.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Define ports Input: action_name.
 

Additional Inherited Members

- Public Types inherited from behavior_tree::RosActionNode< planner_msgs::action::QR >
using Action = planner_msgs::action::QR
 
using GoalHandle = rclcpp_action::ClientGoalHandle< Action >
 
using ActionClient = rclcpp_action::Client< Action >
 
using WrappedResult = typename rclcpp_action::ClientGoalHandle< Action >::WrappedResult
 
using Feedback = typename Action::Feedback
 
- Protected Attributes inherited from behavior_tree::RosActionNode< planner_msgs::action::QR >
rclcpp::Node::SharedPtr ros_node_
 
ActionClient::SharedPtr client_
 
std::string action_name
 
std::shared_future< typename GoalHandle::SharedPtr > future_goal_handle_
 
std::shared_future< WrappedResultfuture_result_
 
GoalHandle::SharedPtr active_goal_handle_
 

Detailed Description

QR Action Client implementation using the CUSTOM RosActionNode template. Target Action: planner_msgs::action::QR.

Constructor & Destructor Documentation

◆ QrAction()

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

Constructor matching the custom base class signature.

Member Function Documentation

◆ onFeedback()

void behavior_tree::QrAction::onFeedback ( const std::shared_ptr< const Feedback feedback)
override

Feedback callback (Empty for QR action but required to implement)

◆ onResult()

BT::NodeStatus behavior_tree::QrAction::onResult ( const WrappedResult wr)
override

Checks if the action finished successfully.

◆ providedPorts()

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

Define ports Input: action_name.

◆ setGoal()

bool behavior_tree::QrAction::setGoal ( typename Action::Goal &  goal)
overridevirtual

Sets the goal.start to true to trigger the server.

Implements behavior_tree::RosActionNode< planner_msgs::action::QR >.


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