Template Class BtActionServer
Defined in File bt_action_server.hpp
Class Documentation
An action server that uses behavior tree to execute an action.
Public Types
Public Functions
A constructor for nav2_behavior_tree::BtActionServer class.
A destructor for nav2_behavior_tree::BtActionServer class.
Configures member variables Initializes action server for, builds behavior tree from xml file, and calls user-defined onConfigure.
- Returns:
bool true on SUCCESS and false on FAILURE
Activates action server.
- Returns:
bool true on SUCCESS and false on FAILURE
Deactivates action server.
- Returns:
bool true on SUCCESS and false on FAILURE
Resets member variables.
- Returns:
bool true on SUCCESS and false on FAILURE
Replace current BT with another one.
- Parameters:
bt_xml_filename – The file containing the new BT, uses default filename if empty
- Returns:
bool true if the resulting BT correspond to the one in bt_xml_filename. false if something went wrong, and previous BT is maintained
Getter function for BT Blackboard.
- Returns:
BT::Blackboard::Ptr Shared pointer to current BT blackboard
Getter function for current BT XML filename.
- Returns:
string Containing current BT XML filename
Getter function for default BT XML filename.
- Returns:
string Containing default BT XML filename
Wrapper function to accept pending goal if a preempt has been requested.
- Returns:
Shared pointer to pending action goal
Wrapper function to terminate pending goal if a preempt has been requested.
Wrapper function to get current goal.
- Returns:
Shared pointer to current action goal
Wrapper function to get pending goal.
- Returns:
Shared pointer to pending action goal
Wrapper function to publish action feedback.
Getter function for the current BT tree.
- Returns:
BT::Tree Current behavior tree
Function to halt the current tree. It will interrupt the execution of RUNNING nodes by calling their halt() implementation (only for Async nodes that may return RUNNING) This should already done for all the exit states of the action but preemption.
Protected Functions
Action server callback.
updates the action server result to the highest priority error code posted on the blackboard
- Parameters:
result – the action server result to be updated
Setting BT error codes to success. Used to clean blackboard between different BT runs.
Protected Attributes