BehaviorTree.CPP icon indicating copy to clipboard operation
BehaviorTree.CPP copied to clipboard

When Using Mock nodes allow conditional Success or Failure for return_status

Open pepeRossRobotics opened this issue 8 months ago • 0 comments

Issue We have been implementing mock testing using the process described in here and we find that sometimes we want the mock to return SUCCESS or FAILURE based on a particular condition. Currently we use the post_script to set up a flag and then in the tree we set a script that reacts to the flag.

This solution is not ideal because adds a lot of unnecessary code to the tree to be able to test complex trees.

Describe the solution you'd like It would be good to be able to set the return_status based on a script output e.g.

return_status = "(robot_failure == true) ? FAILURE : SUCCESS"

pepeRossRobotics avatar Jul 30 '25 12:07 pepeRossRobotics