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

Fibonacci Action Client implementation using the RosActionNode template. More...

#include <fibonacci_action.hpp>

+ Inheritance diagram for behavior_tree::FibonacciAction:
+ Collaboration diagram for behavior_tree::FibonacciAction:

Public Member Functions

 FibonacciAction (const std::string &name, const BT::NodeConfig &config, rclcpp::Node::SharedPtr ros_node)
 Constructor.
 
bool setGoal (typename Action::Goal &goal) override
 Implementation of setGoal. Gets the "order" from the input port and populates the goal message.
 
BT::NodeStatus onResult (const WrappedResult &wr) override
 Implementation of onResult. Checks the result code and sets the output port if successful.
 
void onFeedback (const std::shared_ptr< const Feedback > feedback) override
 (Optional) Implementation of onFeedback. Logs the partial sequence length.
 
- Public Member Functions inherited from behavior_tree::RosActionNode< action_tutorials_interfaces::action::Fibonacci >
 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 required by this specific action.
 

Additional Inherited Members

- Public Types inherited from behavior_tree::RosActionNode< action_tutorials_interfaces::action::Fibonacci >
using Action = action_tutorials_interfaces::action::Fibonacci
 
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< action_tutorials_interfaces::action::Fibonacci >
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

Fibonacci Action Client implementation using the RosActionNode template.

Constructor & Destructor Documentation

◆ FibonacciAction()

behavior_tree::FibonacciAction::FibonacciAction ( const std::string &  name,
const BT::NodeConfig &  config,
rclcpp::Node::SharedPtr  ros_node 
)

Constructor.

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

Member Function Documentation

◆ onFeedback()

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

(Optional) Implementation of onFeedback. Logs the partial sequence length.

◆ onResult()

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

Implementation of onResult. Checks the result code and sets the output port if successful.

◆ providedPorts()

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

Define ports required by this specific action.

Returns
List of ports

◆ setGoal()

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

Implementation of setGoal. Gets the "order" from the input port and populates the goal message.

Implements behavior_tree::RosActionNode< action_tutorials_interfaces::action::Fibonacci >.


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