BehaviorTree/BehaviorTree.CPP

Adding NodeStatus::NEUTRAL?

galou opened this issue · 1 comments

Some nodes do not require a special NodeStatus, e.g. SetBlackboard, UnsetBlackboard, our Log node. It would be convenient that such nodes return a new NodeStatus::NEUTRAL status. This would be equivalent to NodeStatus::SKIPPED but the documentation states that nodes must not return NodeStatus::SKIPPED themselves.

My motivation is to avoid to wrap such nodes when using them inside Fallback control nodes, not only for consistency of the xml but mainly to avoid bugs because one forgot that the log node would have the Fallback node return SUCCESS:

<Fallback>
  <MoveToStraight/>
  <Log message="Cannot move straight, using a planning algorithm"/>
 <PlanAndMove/>
</Fallback>

vs.

<Fallback>
  <MoveToStraight/>
  <ForceFailure/>
    <Log message="Cannot move straight, using a planning algorithm"/>
  </ForceFailure>
 <PlanAndMove/>
</Fallback>

You are conceptually right, but I can not add more status, because that will require rewriting ALL the control nodes and decorators