Groot icon indicating copy to clipboard operation
Groot copied to clipboard

loading tree with external files included not working

Open fmros opened this issue 4 years ago • 5 comments

I tried a minimal working example of the tutorial here to include external files into a behavior tree. When replicating the tutorial and trying to load the maintree.xml file, groot is not able to load the tree, giving following error prompt:

image

grasp.xml loading appart works fine, so that tree is well formed. When adding

    <TreeNodesModel>
        <SubTree ID="GraspObject"/>
    </TreeNodesModel>

into the maintree.xml the Tree is loaded, but the subtree GraspObject cannot be expanded: image

Is this feature not supported yet, or is there a workarround needed?

Thanks

fmros avatar May 25 '21 08:05 fmros

I encountered the same error as well, is there anybody who ever tried to solve the demand?

Jackey-Huo avatar Jun 15 '21 12:06 Jackey-Huo

I think this has to do with the parsing of the xml here that is not parsing the included file. Also i think that the saveToXml() function can't handle the separate file include and save it separately. So i guess it is not wanted to be able to parse them in the editor mode, since saving them again in the same shape as they have be read in would not be possible.

fmros avatar Oct 22 '21 11:10 fmros

Workarround: Include the subtrees as proposed here and do not expand them in the groot editor. Instead you could run a separate instance of groot and open the subtree of interest separately. However it is possible to use the logging and monitor functionality to view the full tree as e.g. here where subtree_1 and subtree_2 where included files: image

fmros avatar Oct 25 '21 07:10 fmros

@fmros Can you post an alternative link for this ? The link in previous post doesnt work.

@facontidavide with Groot (master) + BehaviorTree.CPP(v3.8), the visualization fails for externally included behavior trees. Does Groot on master/1.0.0 support visualization for separated xml files ?

sapan-cat avatar Jan 11 '23 03:01 sapan-cat

@fmros Can you post an alternative link for this ? The link in previous post doesnt work.

You can try this one.

li9i avatar Sep 18 '23 11:09 li9i