21#include "auto_apms_behavior_tree_core/node/node_manifest.hpp"
22#include "auto_apms_util/yaml.hpp"
67 std::string
str()
const;
170 friend class TreeDocument;
171 friend class TreeBuilder;
286 Identity
createIdentity(
const std::string & tree_name =
"")
const;
290 std::string package_name_;
291 std::string tree_file_path_;
292 std::vector<std::string> node_manifest_file_paths_;
293 std::string doc_root_tree_name_;
305 static Node encode(
const Identity & rhs)
311 static bool decode(
const Node & node, Identity & rhs)
313 if (!node.IsScalar())
return false;
314 rhs = Identity(node.Scalar());
Data structure for information about which behavior tree node plugin to load and how to configure the...
std::string getRootTreeName() const
Get the name of the root tree of this behavior tree resource.
static TreeResource selectByFileStem(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 Identity &identity)
Assemble a behavior tree resource using a TreeResourceIdentity.
std::string getPackageName() const
Get the name of the package this resource was registered by.
std::string getFileStem() const
Get the file stem of the XML file containing the tree document associated with this resource.
Identity createIdentity(const std::string &tree_name="") const
Create a valid tree resource identity string representing this resource.
static TreeResource selectByTreeName(const std::string &tree_name, const std::string &package_name="")
Find an installed behavior tree resource using a specific behavior tree name.
NodeManifest getNodeManifest() const
Get the node manifest associated with this resource.
bool hasRootTreeName() const
Determine if this behavior tree resource specifies a root tree.
Core API for AutoAPMS's behavior tree implementation.
Useful tooling for incorporating behavior trees for task development.
Struct that encapsulates the identity string for a declared behavior tree.
std::string tree_name
Name of a specific tree inside the resource's tree document.
bool empty() const
Determine whether this tree resource identity object is considered empty.
std::string file_stem
Name of the file (without extension) that contains the resource's tree document.
TreeResourceIdentity()=default
Constructor of an empty tree resource identity object.
TreeResourceIdentity(const std::string &identity)
Constructor of a behavior tree resource identity object.
std::string package_name
Name of the package that registers the resource.
std::string str() const
Create the corresponding identity string.