When Using Mock nodes allow conditional Success or Failure for return_status
Opened this issue · 0 comments
pepeRossRobotics commented
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"