Skip to content

XML import semantics different between Groot and BT? #125

Open
@Beaudidly

Description

@Beaudidly

Hi, first off would like to show my gratification for your work!

Context: I am trying to create multiple separate "libraries" of commonly used nodes that projects can pick and choose which to include. One of my goals with this is to have it be easily maintainable. I started off not using Groot to edit, but have found it quite helpful to edit and visualize. So ideally I would have these projects work with Groot!

My attempt:

<root>
    <TreeNodesModel>
        <Action ID="MiscNode1"/>
        <Action ID="MiscNode2"/>
    </TreeNodesModel>
</root>

I created multiple "library" xml files that just look like the above example. Some of these files may have subtrees I may want to use, and others may not. As I understand, the TreeNodesModel section is only to satisfy Groot with "forward" declaring nodes, and is not needed by BT.

I have two issues with using this that seems to be maybe an inconsistency between how BT and Groot uses these files. I thought the <include path="path/to/xml"/> would have worked here. But on BT runtime, it errors out because there are no declared <BehaviorTree>s. This is just a small inconvenience as I can create a dummy tree that I won't use on runtime.

But the other issue is that this include doesn't semantically seem to work with Groot. If I include by path, it will say it can't find those nodes/subtrees. I understand that loading palettes via the gui can be a solution for nodes, but that is not very maintainable as it just copies the declaration text into the project file.

I might be fully misunderstanding something, but is it possible to use Groot with tree files that include from other xml files similar to C++? I place this here as its a cooperation between the two projects.

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