[ros-users] [Discourse.ros.org] [General] New Software Release - Py Trees

Daniel Stonier ros.discourse at gmail.com
Tue Jul 4 18:38:55 UTC 2017

>  multi-agent parts of behavior3

Gaming is really focused on this aspect of behaviour trees because they are trying to control hundreds, if not thousands of npc characters that all interact with each other. This leads to all kinds of wonderful multi-tree co-ordination techniques and parallelising optimisations to make sure that it remains manageable and latency stays low. 

If you're just looking to co-ordinate a single robot's behaviour though, this is a non-issue and greatly simplifies the behaviour tree implementation. There is just one agent and the complexity is typically only in the order of hundreds of behaviours. No parallelisation nor multi-agent co-ordination is required. If you're starting to consider thousands of behaviours, or looking for a higher level robot fleet co-ordinator with an extreme number of robots (py_trees could probably handle tens of robots), then you might start thinking about behaviour trees ala professional gaming considerations.

I mention this briefly [here](http://docs.ros.org/kinetic/api/py_trees/html/background.html#design).

> Apparently the editor serialises trees to a JSON format. I don't know if that is something that could be used to programmatically construct trees @Daniel_Stonier?

The behaviour3.com format has string based key-value dictionary types that could be used to store esoteric information that the py_trees serialisations have. That means a converter should be trivial. Having said that, it probably wouldn't be that useful since you'd have to manually plug all of this information in (i.e. you lose the benefit of the gui) and can't properly visualise it. py_trees dot graph visualisations of a python `create_tree` function are just as good (latex style workflow). The editor though might have ways of extending its functionality, or could probably be forked and hacked on directly as a good starting point. For us though, this starts to sound like a great deal of work with little benefit over the py_trees dot graph generator approach (which also happens to fit neatly into a CI workflow to generate graphs of your tree/subtree/behaviour library).

[Visit Topic](https://discourse.ros.org/t/new-software-release-py-trees/2046/7) or reply to this email to respond.

More information about the ros-users mailing list