-
-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Is your feature request related to a problem? Please describe.
Sometimes it's nice to have comments inside your tree to clarify what some branches do, especially when your trees get bigger and more complex.
Describe the solution you'd like
We could use a name of a node inside the BT hierarchy as a comment.
There are a few implementations I can think of:
- add a separate
BeehaveCommentnode which would be completely ignored by the BT logic - make BT ignore nodes not inherited from
BeehaveNode, thus you could put a basic Node inside tree hierarchy without causing an error - add some fourth state (like
PASS/IGNORE/NONE) to the existingSUCCESS,FAILUREandRUNNINGso the nodes in BT would ignore nodes returning this state and continue execution as if they were not there - then you can for example return this state from basic BeehaveNode by default (this could break some compatibility though)
Describe alternatives you've considered
You can put an AlwaysSucceed or AlwaysFail decorator so it just gets skipped over by certain composites, but you have to always keep in mind under what composite you put it. For example, if you change selector to sequence, then you have to change all comment decorators from AlwaysFail to AlwaysSucceed. You also have to put an additional dummy node under said decorator anyway, so this gets bloated and ugly quickly.
Alternatively you can just use a built-in editor_description property, but it isn't so readable and clearly visible in your tree hierarchy.
