AutoAPMS
Resilient Robot Mission Management
Loading...
Searching...
No Matches
Behavior Tree

Useful tooling for incorporating behavior trees for task development. More...

Namespaces

namespace  auto_apms_behavior_tree
 Useful tooling for incorporating behavior trees for task development.
 

Classes

class  TreeBuilder
 Class for configuring and instantiating behavior trees. More...
 
class  NodeManifest
 Data structure for information about which behavior tree node plugin to load and how to configure them. More...
 
class  NodeRegistrationLoader
 A pluginlib::ClassLoader specifically for loading installed behavior tree node plugins. More...
 
class  RosActionNode< ActionT >
 Generic behavior tree node wrapper for a ROS 2 action client. More...
 
class  RosPublisherNode< MessageT >
 Generic behavior tree node wrapper for a ROS 2 publisher. More...
 
class  RosServiceNode< ServiceT >
 Generic behavior tree node wrapper for a ROS 2 service client. More...
 
class  RosSubscriberNode< MessageT >
 Generic behavior tree node wrapper for a ROS 2 subscriber. More...
 
class  TreeDocument
 This class offers a programmatic approach for building behavior trees and stores the registration data of all tree nodes. More...
 
class  TreeResource
 Class containing behavior tree resource data. More...
 
class  TreeBuildHandler
 Base class for plugins that implement patterns for creating behavior trees using a standardized interface. More...
 
class  TreeBuildHandlerLoader
 A pluginlib::ClassLoader specifically for loading installed behavior tree build handler plugins. More...
 
class  TreeExecutorNode
 Flexible ROS 2 node implementing a standardized interface for dynamically executing behavior trees. More...
 

Macros

#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_NODE(type)
 Macro for registering a behavior tree node plugin.
 
#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_BUILD_HANDLER(type)
 Macro for registering a behavior tree build handler plugin which may be loaded at runtime to build a behavior tree according to the implementation.
 
model::StartExecutor insertStartExecutorFromString (core::TreeDocument::NodeElement &parent, const std::string &tree_str, const core::TreeDocument::NodeElement *before_this=nullptr)
 Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from string.
 
model::StartExecutor insertStartExecutorFromString (core::TreeDocument::NodeElement &parent, const core::TreeDocument::TreeElement &tree, const core::TreeDocument::NodeElement *before_this=nullptr)
 Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from a string.
 
model::StartExecutor insertStartExecutorFromResource (core::TreeDocument::NodeElement &parent, const core::TreeResourceIdentity &identity, const core::TreeDocument::NodeElement *before_this=nullptr)
 Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from a resource.
 

Detailed Description

Useful tooling for incorporating behavior trees for task development.

Macro Definition Documentation

◆ AUTO_APMS_BEHAVIOR_TREE_DECLARE_NODE

#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_NODE ( type)
Value:
PLUGINLIB_EXPORT_CLASS( \
auto_apms_behavior_tree::core::NodeRegistrationTemplate<type>, \
auto_apms_behavior_tree::core::NodeRegistrationInterface)

Macro for registering a behavior tree node plugin.

Behavior tree nodes should be created by inheriting from one of

Parameters
typeFully qualified name of the class.

Definition at line 40 of file node.hpp.

◆ AUTO_APMS_BEHAVIOR_TREE_DECLARE_BUILD_HANDLER

#define AUTO_APMS_BEHAVIOR_TREE_DECLARE_BUILD_HANDLER ( type)
Value:
PLUGINLIB_EXPORT_CLASS( \
auto_apms_behavior_tree::TreeBuildHandlerFactoryTemplate<type>, \
auto_apms_behavior_tree::TreeBuildHandlerFactoryInterface)

Macro for registering a behavior tree build handler plugin which may be loaded at runtime to build a behavior tree according to the implementation.

Build handler classes should be created by inheriting from auto_apms_behavior_tree::TreeBuildHandler.

Parameters
typeFully qualified name of the class.

Definition at line 29 of file build_handler.hpp.

Function Documentation

◆ insertStartExecutorFromString() [1/2]

model::StartExecutor insertStartExecutorFromString ( core::TreeDocument::NodeElement & parent,
const std::string & tree_str,
const core::TreeDocument::NodeElement * before_this = nullptr )

Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from string.

Parameters
parentParent behavior tree node.
tree_strXML string of the behavior tree to be executed.
before_thisPointer to an existing child node before which the new node will be placed. If nullptr, insert at the end.
Returns
Inserted StartExecutor node element.
Exceptions
auto_apms_behavior_tree::exceptions::TreeDocumentErrorif before_this is provided but not a child of parent.

Definition at line 19 of file node.cpp.

◆ insertStartExecutorFromString() [2/2]

model::StartExecutor insertStartExecutorFromString ( core::TreeDocument::NodeElement & parent,
const core::TreeDocument::TreeElement & tree,
const core::TreeDocument::NodeElement * before_this = nullptr )

Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from a string.

Parameters
parentParent behavior tree node.
treeTree element representing the behavior tree to be executed.
before_thisPointer to an existing child node before which the new node will be placed. If nullptr, insert at the end.
Returns
Inserted StartExecutor node element.
Exceptions
auto_apms_behavior_tree::exceptions::TreeDocumentErrorif before_this is provided but not a child of parent.

Definition at line 29 of file node.cpp.

◆ insertStartExecutorFromResource()

model::StartExecutor insertStartExecutorFromResource ( core::TreeDocument::NodeElement & parent,
const core::TreeResourceIdentity & identity,
const core::TreeDocument::NodeElement * before_this = nullptr )

Helper that extends the children of a given parent node by a StartExecutor node for a specific behavior tree to be created from a resource.

Parameters
parentParent behavior tree node.
identityIdentity object for the behavior tree resource that holds the tree to be executed. You may explicitly set the root tree by specifying the <tree_name> token of the identity.
before_thisPointer to an existing child node before which the new node will be placed. If nullptr, insert at the end.
Returns
Inserted StartExecutor node element.
Exceptions
auto_apms_behavior_tree::exceptions::TreeDocumentErrorif before_this is provided but not a child of parent.

Definition at line 37 of file node.cpp.