Fibonacci Action Client implementation using the RosActionNode template.
More...
#include <fibonacci_action.hpp>
|
| | 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.
|
| |
| | 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 BT::PortsList | providedPorts () |
| | Define ports required by this specific action.
|
| |
Fibonacci Action Client implementation using the RosActionNode template.
◆ FibonacciAction()
| behavior_tree::FibonacciAction::FibonacciAction |
( |
const std::string & |
name, |
|
|
const BT::NodeConfig & |
config, |
|
|
rclcpp::Node::SharedPtr |
ros_node |
|
) |
| |
Constructor.
- Parameters
-
| name | Node name |
| config | Node configuration |
| ros_node | Shared pointer to the ROS 2 node |
◆ 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 |
The documentation for this class was generated from the following files: