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

#include <auto_apms_behavior_tree/executor/executor.hpp>

Inheritance diagram for TreeExecutor:

Public Types

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

 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 ()
 

Detailed Description

Definition at line 30 of file executor.hpp.

Member Typedef Documentation

◆ CreateTreeCallback

Definition at line 65 of file executor.hpp.

◆ ExecutorParams

using ExecutorParams = executor_params::Params

Definition at line 66 of file executor.hpp.

Member Enumeration Documentation

◆ ExecutionState

enum class ExecutionState : uint8_t
strong
Enumerator
IDLE 
STARTING 
RUNNING 
PAUSED 
HALTED 

Definition at line 33 of file executor.hpp.

◆ ControlCommand

enum class ControlCommand : uint8_t
strong
Enumerator
RUN 
PAUSE 
HALT 
TERMINATE 

Definition at line 41 of file executor.hpp.

◆ TreeExitBehavior

enum class TreeExitBehavior : uint8_t
strong
Enumerator
TERMINATE 
RESTART 

Definition at line 48 of file executor.hpp.

◆ ExecutionResult

enum class ExecutionResult : uint8_t
strong
Enumerator
TREE_SUCCEEDED 
TREE_FAILED 
TERMINATED_PREMATURELY 
ERROR 

Definition at line 53 of file executor.hpp.

Constructor & Destructor Documentation

◆ TreeExecutor()

TreeExecutor ( rclcpp::Node::SharedPtr node_ptr)

Definition at line 25 of file executor.cpp.

Member Function Documentation

◆ startExecution()

std::shared_future< TreeExecutor::ExecutionResult > startExecution ( CreateTreeCallback create_tree_cb)

Definition at line 34 of file executor.cpp.

◆ isBusy()

bool isBusy ( )

Definition at line 82 of file executor.cpp.

◆ getExecutionState()

TreeExecutor::ExecutionState getExecutionState ( )

Definition at line 87 of file executor.cpp.

◆ getTreeName()

std::string getTreeName ( )

Definition at line 103 of file executor.cpp.

◆ setControlCommand()

void setControlCommand ( ControlCommand cmd)

Definition at line 255 of file executor.cpp.

◆ setExecutorParameters()

void setExecutorParameters ( const ExecutorParams & p)

Definition at line 260 of file executor.cpp.

◆ getNodePtr()

rclcpp::Node::SharedPtr getNodePtr ( )

Get a pointer to the internal ROS2 node instance.

Definition at line 265 of file executor.cpp.

◆ get_node_base_interface()

rclcpp::node_interfaces::NodeBaseInterface::SharedPtr get_node_base_interface ( )

Get the node's base interface. Is required to be able to register derived classes as ROS2 components.

Definition at line 270 of file executor.cpp.

◆ getGlobalBlackboardPtr()

TreeBlackboardSharedPtr getGlobalBlackboardPtr ( )

Get a pointer to the global blackboard instance.

The global blackboard is used as a root blackboard on every tree that is being created. This means, that all entries of the global blackboard are publicly available to the trees at runtime.

Definition at line 275 of file executor.cpp.

◆ getExecutorParameters()

TreeExecutor::ExecutorParams getExecutorParameters ( )

Definition at line 280 of file executor.cpp.

◆ getStateObserver()

BTStateObserver & getStateObserver ( )

Definition at line 285 of file executor.cpp.


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