AutoAPMS
Resilient Robot Mission Management
|
#include <auto_apms_behavior_tree/resource/tree_resource.hpp>
Public Member Functions | |
std::string | writeTreeToString () const |
Static Public Member Functions | |
static std::vector< TreeResource > | collectFromPackage (const std::string &package_name) |
static TreeResource | selectByTreeName (const std::string &tree_name, const std::string &package_name="") |
static TreeResource | selectByFileName (const std::string &file_name, const std::string &package_name="") |
static TreeResource | fromString (const std::string &identity) |
Public Attributes | |
std::string | tree_file_stem |
std::string | tree_file_path |
std::string | package_name |
std::string | node_manifest_file_path |
std::set< std::string > | tree_names |
Struct containing behavior tree resource data.
Definition at line 30 of file tree_resource.hpp.
|
static |
Collect all behavior tree resources registered by a certain package.
package_name | Name of the package to search for resources. |
package_name
. Definition at line 29 of file tree_resource.cpp.
|
static |
Definition at line 59 of file tree_resource.cpp.
|
static |
Definition at line 98 of file tree_resource.cpp.
|
static |
Find a behavior tree resource using an identity string.
To uniquely identify the resource, the identity
string may contain the <tree_file_stem>
, the <tree_name>
and the <package_name>
seperated by ::
in that order. Depending on the registered resources, it might be possible to use shorter, less precise signatures. All possible identity strings are listed below:
<tree_file_stem>::<tree_name>::<package_name>
Fully qualified identity string of a behavior tree resource.
<tree_file_stem>::<tree_name>::
Try to find the resource by searching for a tree with name <tree_name>
in a file with stem <tree_file_stem>
considering all packages.
<tree_file_stem>::::
Try to find the resource by searching for a file with stem <tree_file_stem>
considering all packages.
::<tree_name>::
Try to find the resource by searching for a tree with name <tree_name>
considering all packages.
::
must be kept when tokens are omitted.identity | Identity string with formatting compliant to the signatures above. |
exceptions::ResourceIdentityFormatError | if the identity string has wrong format. |
auto_apms_core::exceptions::ResourceNotFoundError | if the resource cannot be found using the given identity string. |
Definition at line 138 of file tree_resource.cpp.
std::string writeTreeToString | ( | ) | const |
Definition at line 166 of file tree_resource.cpp.
std::string tree_file_stem |
Definition at line 37 of file tree_resource.hpp.
std::string tree_file_path |
Definition at line 38 of file tree_resource.hpp.
std::string package_name |
Definition at line 39 of file tree_resource.hpp.
std::string node_manifest_file_path |
Definition at line 40 of file tree_resource.hpp.
std::set<std::string> tree_names |
Definition at line 41 of file tree_resource.hpp.