-
Notifications
You must be signed in to change notification settings - Fork 802
Open
Description
Calling fullPath of a TreeNode return only its node name without the full path
/// Human readable identifier, that includes the hierarchy of Subtrees
/// See tutorial 10 as an example.
[[nodiscard]] const std::string& fullPath() const;
To solve the problem I modified BehaviorTree.CPP/src/xml_parsing.cpp
- add child_prefix
- replace prefix by child_prefix in recursiveStep call arg
// common case: iterate through all children
if(node->type() != NodeType::SUBTREE)
{
std::string child_prefix = prefix;
if(!node->name().empty())
{
child_prefix += node->name();
child_prefix += "/";
}
for(auto child_element = element->FirstChildElement(); child_element != nullptr;
child_element = child_element->NextSiblingElement())
{
recursiveStep(node, subtree, child_prefix, child_element);
}
}
else // special case: SubTreeNode
{ ...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels