BehaviorTree / Groot2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Includes are not loaded if xml doesn't contain BehaviorTree tag

OPerepadia opened this issue · comments

Describe the bug
If included file doesn't contain any trees, it's includes are not loaded.

To Reproduce

Create top level tree:

<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4">

  <include path="macros.xml"/>

  <BehaviorTree ID="MainTree">
    <SubTree ID="IncludedSubtree"/>
  </BehaviorTree>

</root>

Create macros.xml:

<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4">

  <include path="macros_sim.xml"/>

<!-- <BehaviorTree ID="aaaaa">
    <AlwaysSuccess/>
  </BehaviorTree> -->

</root>

Create macros_sim.xml:

<?xml version="1.0" encoding="UTF-8"?>
<root BTCPP_format="4">

  <BehaviorTree ID="IncludedSubtree">
    <AlwaysSuccess/>
  </BehaviorTree>

</root>

The subtree IncludedSubtree is loaded only if the dummy tree in macros.xml is uncommented.

Expected behavior

Includes are loaded even if xml doesn't have any behavior trees.

I will check this out, thanks for reporting

fixed. Next version will include this change