AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
TreeExecutorServer Class Reference

#include <auto_apms_behavior_tree/executor/executor_server.hpp>

Inheritance diagram for TreeExecutorServer:

Public Types

using StartActionContext = auto_apms_core::ActionContext<auto_apms_interfaces::action::StartTreeExecutor>
 
using CommandActionContext = auto_apms_core::ActionContext<auto_apms_interfaces::action::CommandTreeExecutor>
 
- Public Types inherited from TreeExecutor
enum class  ExecutionState : uint8_t {
  IDLE , STARTING , RUNNING , PAUSED ,
  HALTED
}
 
enum class  ControlCommand : uint8_t { RUN , PAUSE , HALT , TERMINATE }
 
enum class  TreeExitBehavior : uint8_t { TERMINATE , RESTART }
 
enum class  ExecutionResult : uint8_t { TREE_SUCCEEDED , TREE_FAILED , TERMINATED_PREMATURELY , ERROR }
 
using CreateTreeCallback = std::function<Tree(TreeBlackboardSharedPtr)>
 
using ExecutorParams = executor_params::Params
 

Public Member Functions

 TreeExecutorServer (const std::string &name, const rclcpp::NodeOptions &options)
 
 TreeExecutorServer (const rclcpp::NodeOptions &options)
 
CreateTreeCallback makeCreateTreeCallback (const std::string &tree_builder_name, const std::string &tree_build_request, const NodeManifest &node_overrides={})
 
- Public Member Functions inherited from TreeExecutor
 TreeExecutor (rclcpp::Node::SharedPtr node_ptr)
 
std::shared_future< ExecutionResultstartExecution (CreateTreeCallback create_tree_cb)
 
bool isBusy ()
 
ExecutionState getExecutionState ()
 
std::string getTreeName ()
 
void setControlCommand (ControlCommand cmd)
 
void setExecutorParameters (const ExecutorParams &p)
 
rclcpp::Node::SharedPtr getNodePtr ()
 
rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface ()
 
TreeBlackboardSharedPtr getGlobalBlackboardPtr ()
 
ExecutorParams getExecutorParameters ()
 
BTStateObservergetStateObserver ()
 

Static Public Attributes

static const std::string PARAM_NAME_TREE_BUILDER = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_TREE_BUILDER
 
static const std::string PARAM_NAME_TICK_RATE = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_TICK_RATE
 
static const std::string PARAM_NAME_GROOT2_PORT = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_GROOT2_PORT
 
static const std::string PARAM_NAME_STATE_CHANGE_LOGGER = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_STATE_CHANGE_LOGGER
 
static const std::string DEFAULT_NODE_NAME = "tree_executor"
 

Detailed Description

Definition at line 27 of file executor_server.hpp.

Member Typedef Documentation

◆ StartActionContext

using StartActionContext = auto_apms_core::ActionContext<auto_apms_interfaces::action::StartTreeExecutor>

Definition at line 30 of file executor_server.hpp.

◆ CommandActionContext

using CommandActionContext = auto_apms_core::ActionContext<auto_apms_interfaces::action::CommandTreeExecutor>

Definition at line 31 of file executor_server.hpp.

Constructor & Destructor Documentation

◆ TreeExecutorServer() [1/2]

TreeExecutorServer ( const std::string & name,
const rclcpp::NodeOptions & options )

Constructor for TreeExecutorServer with custom name.

Parameters
[in]nameName of the rclcpp::Node instance.
[in]optionsOptions forwarded to rclcpp::Node constructor.

Definition at line 33 of file executor_server.cpp.

◆ TreeExecutorServer() [2/2]

TreeExecutorServer ( const rclcpp::NodeOptions & options)

Constructor for TreeExecutorServer with default name TreeExecutorServer::DEFAULT_NODE_NAME.

Parameters
[in]optionsOptions forwarded to rclcpp::Node constructor.

Definition at line 73 of file executor_server.cpp.

Member Function Documentation

◆ makeCreateTreeCallback()

TreeExecutorServer::CreateTreeCallback makeCreateTreeCallback ( const std::string & tree_builder_name,
const std::string & tree_build_request,
const NodeManifest & node_overrides = {} )

Definition at line 78 of file executor_server.cpp.

Member Data Documentation

◆ PARAM_NAME_TREE_BUILDER

const std::string PARAM_NAME_TREE_BUILDER = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_TREE_BUILDER
static

Definition at line 33 of file executor_server.hpp.

◆ PARAM_NAME_TICK_RATE

const std::string PARAM_NAME_TICK_RATE = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_TICK_RATE
static

Definition at line 34 of file executor_server.hpp.

◆ PARAM_NAME_GROOT2_PORT

const std::string PARAM_NAME_GROOT2_PORT = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_GROOT2_PORT
static

Definition at line 35 of file executor_server.hpp.

◆ PARAM_NAME_STATE_CHANGE_LOGGER

const std::string PARAM_NAME_STATE_CHANGE_LOGGER = _AUTO_APMS_BEHAVIOR_TREE__EXECUTOR_PARAM_STATE_CHANGE_LOGGER
static

Definition at line 36 of file executor_server.hpp.

◆ DEFAULT_NODE_NAME

const std::string DEFAULT_NODE_NAME = "tree_executor"
inlinestatic

Definition at line 37 of file executor_server.hpp.


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