Open linhaiwei123 opened 7 years ago
i found the bug here. in limiter we should return the b3.RUNNING instead of b3.SUCCESS or b3.FAILURE cause the b3.SUCCESS or b3.FAILURE would exit the running state and reset the time in open when we tick again
yep i found that return b3.RUNNING in limiter still not work well. the only way to fix it is to check whether the key i is set or not. and set it in the first time we enter the open callback
@linhaiwei123 would you be able to submit a PR with the failing test or a simple way to reproduce the bug?
open: function(tick) { tick.blackboard.set('i', 0, tick.tree.id, this.id); }, The Decorator of Limiter will reset "i" to zero when child status == b3.SUCCESS || status == b3.FAILURE。 +1 ,reset 0, +1 ,reset 0……
@wqhk would you be able to submit a PR with a failing test?
@danielepolencic I submit a PR. Learn BT this week, maybe misunderstand the usage of Limiter =。=
the tree is as below
and i do enter the limiter but when i tick the tree in the update again the time of the limiter would reset to zero again.