Nav2 Navigation Stack - jazzy  jazzy
ROS 2 Navigation Stack
Public Member Functions | Static Public Member Functions | List of all members
nav2_behavior_tree::NavigateToPoseAction Class Reference

A nav2_behavior_tree::BtActionNode class that wraps nav2_msgs::action::NavigateToPose. More...

#include <nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/navigate_to_pose_action.hpp>

Inheritance diagram for nav2_behavior_tree::NavigateToPoseAction:
Inheritance graph
[legend]
Collaboration diagram for nav2_behavior_tree::NavigateToPoseAction:
Collaboration graph
[legend]

Public Member Functions

 NavigateToPoseAction (const std::string &xml_tag_name, const std::string &action_name, const BT::NodeConfiguration &conf)
 A constructor for nav2_behavior_tree::NavigateToPoseAction. More...
 
void on_tick () override
 Function to perform some user-defined operation on tick.
 
BT::NodeStatus on_success () override
 Function to perform some user-defined operation upon successful completion of the action.
 
BT::NodeStatus on_aborted () override
 Function to perform some user-defined operation upon abortion of the action.
 
BT::NodeStatus on_cancelled () override
 Function to perform some user-defined operation upon cancellation of the action.
 
- Public Member Functions inherited from nav2_behavior_tree::BtActionNode< nav2_msgs::action::NavigateToPose >
 BtActionNode (const std::string &xml_tag_name, const std::string &action_name, const BT::NodeConfiguration &conf)
 A nav2_behavior_tree::BtActionNode constructor. More...
 
void createActionClient (const std::string &action_name)
 Create instance of an action client. More...
 
virtual void on_wait_for_result (std::shared_ptr< const typename ActionT::Feedback >)
 Function to perform some user-defined operation after a timeout waiting for a result that hasn't been received yet. Also provides access to the latest feedback message from the action server. Feedback will be nullptr in subsequent calls to this function if no new feedback is received while waiting for a result. More...
 
BT::NodeStatus tick () override
 The main override required by a BT action. More...
 
void halt () override
 The other (optional) override required by a BT action. In this case, we make sure to cancel the ROS2 action if it is still running.
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Creates list of BT ports. More...
 
- Static Public Member Functions inherited from nav2_behavior_tree::BtActionNode< nav2_msgs::action::NavigateToPose >
static BT::PortsList providedBasicPorts (BT::PortsList addition)
 Any subclass of BtActionNode that accepts parameters must provide a providedPorts method and call providedBasicPorts in it. More...
 
static BT::PortsList providedPorts ()
 Creates list of BT ports. More...
 

Additional Inherited Members

- Protected Member Functions inherited from nav2_behavior_tree::BtActionNode< nav2_msgs::action::NavigateToPose >
bool should_cancel_goal ()
 Function to check if current goal should be cancelled. More...
 
void send_new_goal ()
 Function to send new goal to action server.
 
bool is_future_goal_handle_complete (std::chrono::milliseconds &elapsed)
 Function to check if the action server acknowledged a new goal. More...
 
void increment_recovery_count ()
 Function to increment recovery count on blackboard if this node wraps a recovery.
 
- Protected Attributes inherited from nav2_behavior_tree::BtActionNode< nav2_msgs::action::NavigateToPose >
std::string action_name_
 
std::shared_ptr< rclcpp_action::Client< nav2_msgs::action::NavigateToPose > > action_client_
 
ActionT::Goal goal_
 
bool goal_updated_
 
bool goal_result_available_
 
rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose >::SharedPtr goal_handle_
 
rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose >::WrappedResult result_
 
std::shared_ptr< const typename ActionT::Feedback > feedback_
 
rclcpp::Node::SharedPtr node_
 
rclcpp::CallbackGroup::SharedPtr callback_group_
 
rclcpp::executors::SingleThreadedExecutor callback_group_executor_
 
std::chrono::milliseconds server_timeout_
 
std::chrono::milliseconds max_timeout_
 
std::chrono::milliseconds wait_for_service_timeout_
 
std::shared_ptr< std::shared_future< typename rclcpp_action::ClientGoalHandle< nav2_msgs::action::NavigateToPose >::SharedPtr > > future_goal_handle_
 
rclcpp::Time time_goal_sent_
 
bool should_send_goal_
 

Detailed Description

A nav2_behavior_tree::BtActionNode class that wraps nav2_msgs::action::NavigateToPose.

Definition at line 31 of file navigate_to_pose_action.hpp.

Constructor & Destructor Documentation

◆ NavigateToPoseAction()

nav2_behavior_tree::NavigateToPoseAction::NavigateToPoseAction ( const std::string &  xml_tag_name,
const std::string &  action_name,
const BT::NodeConfiguration &  conf 
)

A constructor for nav2_behavior_tree::NavigateToPoseAction.

Parameters
xml_tag_nameName for the XML tag for this node
action_nameAction name this node creates a client for
confBT node configuration

Definition at line 23 of file navigate_to_pose_action.cpp.

Member Function Documentation

◆ providedPorts()

static BT::PortsList nav2_behavior_tree::NavigateToPoseAction::providedPorts ( )
inlinestatic

Creates list of BT ports.

Returns
BT::PortsList Containing basic ports along with node-specific ports

Definition at line 72 of file navigate_to_pose_action.hpp.

References nav2_behavior_tree::BtActionNode< nav2_msgs::action::NavigateToPose >::providedBasicPorts().

Here is the call graph for this function:

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