Skip to content

Including a tree from another directory which includes another tree fails #324

@asasine

Description

@asasine

When you include from another directory, and that tree includes another tree, the BT factory throws the error XML_ERROR_FILE_NOT_FOUND.

Given these example trees and directory structure:

/
  tree_includes_tree_includes_same_directory.xml
  child/
    tree_includes_same_directory.xml
    tree_child_directory.xml

tree_includes_tree_includes_same_directory.xml

<root main_tree_to_execute = "IncludesTreeIncludesSameDirectory">
  <include path="child/tree_includes_same_directory.xml" />

  <BehaviorTree ID="IncludesTreeIncludesSameDirectory">
    <Sequence>
      <SubTree ID="IncudesSameDirectoryTree" />
      <AlwaysSuccess />
    </Sequence>
  </BehaviorTree>
</root>

child/tree_child_directory.xml

<root main_tree_to_execute = "ChildDirectoryTree">
  <BehaviorTree ID="ChildDirectoryTree">
    <AlwaysSuccess />
  </BehaviorTree>
</root>

child/tree_includes_same_directory.xml

<root main_tree_to_execute = "IncudesSameDirectoryTree">
  <include path="tree_child_directory.xml" />

  <BehaviorTree ID="IncudesSameDirectoryTree">
    <Sequence>
      <SubTree ID="ChildDirectoryTree" />
      <AlwaysSuccess />
    </Sequence>
  </BehaviorTree>
</root>

Loading the tree tree_includes_tree_includes_same_directory.xml using an absolute path, it throws the above error XML_ERROR_FILE_NOT_FOUND.

It does not seem to matter whether the second tree (tree_includes_same_directory.xml in this example) includes a third tree from the same directory, a parent directory, or a sibling directory; they all fail in the same way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions