21#include "auto_apms_behavior_tree_core/behavior.hpp"
22#include "auto_apms_util/yaml.hpp"
157 friend class TreeDocument;
158 friend class TreeBuilder;
256 std::string doc_root_tree_name_;
268 static Node encode(
const Identity & rhs)
274 static bool decode(
const Node & node, Identity & rhs)
276 if (!node.IsScalar())
return false;
277 rhs = Identity(node.Scalar());
BehaviorResourceTemplate(const Identity &search_identity)
TreeResourceIdentity createIdentityForTree(const std::string &tree_name="") const
Create a valid identity string for a specific behavior tree of this resource.
std::string getRootTreeName() const
Get the name of the root tree of this behavior tree resource.
static TreeResource findByTreeName(const std::string &tree_name, const std::string &package_name="")
Find an installed behavior tree resource using a specific behavior tree name.
static TreeResource findByFileStem(const std::string &file_stem, const std::string &package_name="")
Find an installed behavior tree resource using a specific behavior tree XML file stem.
TreeResource(const TreeResourceIdentity &search_identity)
Assemble a behavior tree resource using a TreeResourceIdentity.
bool hasRootTreeName() const
Determine if this behavior tree resource specifies a root tree.
Core API for AutoAPMS's behavior tree implementation.
Powerful tooling for incorporating behavior trees for task development.
BehaviorResourceIdentity(const std::string &identity)
Constructor of a behavior resource identity object.
std::string str() const
Create the corresponding identity string.
Struct that encapsulates the identity string for a registered behavior tree.
std::string tree_name
Name of a specific tree inside the resource's tree document.
std::string file_stem
Name of the file (without extension) that contains the resource's tree document.
TreeResourceIdentity()=default
Constructor of an empty behavior tree resource identity object.
TreeResourceIdentity(const std::string &identity)
Constructor of a tree resource identity object.