AutoAPMS
Resilient Robot Mission Management
|
#include <auto_apms_behavior_tree/executor/executor.hpp>
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< ExecutionResult > | startExecution (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 () |
BTStateObserver & | getStateObserver () |
Definition at line 30 of file executor.hpp.
using CreateTreeCallback = std::function<Tree(TreeBlackboardSharedPtr)> |
Definition at line 65 of file executor.hpp.
using ExecutorParams = executor_params::Params |
Definition at line 66 of file executor.hpp.
|
strong |
Enumerator | |
---|---|
IDLE | |
STARTING | |
RUNNING | |
PAUSED | |
HALTED |
Definition at line 33 of file executor.hpp.
|
strong |
Enumerator | |
---|---|
RUN | |
PAUSE | |
HALT | |
TERMINATE |
Definition at line 41 of file executor.hpp.
|
strong |
Enumerator | |
---|---|
TERMINATE | |
RESTART |
Definition at line 48 of file executor.hpp.
|
strong |
Enumerator | |
---|---|
TREE_SUCCEEDED | |
TREE_FAILED | |
TERMINATED_PREMATURELY | |
ERROR |
Definition at line 53 of file executor.hpp.
TreeExecutor | ( | rclcpp::Node::SharedPtr | node_ptr | ) |
Definition at line 25 of file executor.cpp.
std::shared_future< TreeExecutor::ExecutionResult > startExecution | ( | CreateTreeCallback | create_tree_cb | ) |
Definition at line 34 of file executor.cpp.
bool isBusy | ( | ) |
Definition at line 82 of file executor.cpp.
TreeExecutor::ExecutionState getExecutionState | ( | ) |
Definition at line 87 of file executor.cpp.
std::string getTreeName | ( | ) |
Definition at line 103 of file executor.cpp.
void setControlCommand | ( | ControlCommand | cmd | ) |
Definition at line 255 of file executor.cpp.
void setExecutorParameters | ( | const ExecutorParams & | p | ) |
Definition at line 260 of file executor.cpp.
rclcpp::Node::SharedPtr getNodePtr | ( | ) |
Get a pointer to the internal ROS2 node instance.
Definition at line 265 of file executor.cpp.
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.
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.
TreeExecutor::ExecutorParams getExecutorParameters | ( | ) |
Definition at line 280 of file executor.cpp.
BTStateObserver & getStateObserver | ( | ) |
Definition at line 285 of file executor.cpp.