My team and I added a couple of node types that we found missing from the default behaviour tree nodes in NodeCanvas. Passing along a couple of patches for you.
1. Inverter node to switch success/failure on a decorated node
2. TimeOut node which will interrupt a decorated node after a certain amount of time has elapsed.
3. Added the “FirstSuccessOrFailure” policy to Parallel node. We needed this and there is no better way to do it.
Would be great if you could include these in the your next update.
Thats great of you sharing those 🙂 Actually the 1st and 2nd do exist but not as a single node doing exactly that.
The Inverter can be achieved with the Remapper Decorator (remaping Success to Failure and Failure to Success).
The Timeout Interruptor, can be achieved with the Interrutor Decorator by assigning it the TimeOut Condition Task.
But I can see that having them self-contained nodes may speed up workflow 🙂
So in practise, the FirstSuccessOrFailure parallel policy will break out as soon as any child node returns anything but Running with the parallel returning that status. I can’t think of a use case out of my head right now, but it certainly seems interesting. I will add that as well.