I am not sure how this happened, but on the demos page http://docs.ros.org/en/melodic/api/py_trees/html/demos.html#id1 , in the code used for the various demos, the lines of code for returning the status is invalid. Instead of new_status = py_trees.Status.SUCCESS it should be new_status = py_trees.common.Status.SUCCESS.
This is ofcourse the case in the script that's located in the pip package and the script that executes the main() in action.py runs as expected. I only discovered this error because I copy-pasted the code and ran it as I wanted to tweak around.
Actually, proceeding through the demos, I find plenty of mistakes in the code used in the documentation. At this point, I would put a disclaimer to NOT COPY the code directly from the documentation webpage.
I am not sure how this happened, but on the demos page http://docs.ros.org/en/melodic/api/py_trees/html/demos.html#id1 , in the code used for the various demos, the lines of code for returning the status is invalid. Instead of
new_status = py_trees.Status.SUCCESS
it should be new_status =py_trees.common.Status.SUCCESS
.This is ofcourse the case in the script that's located in the pip package and the script that executes the main() in action.py runs as expected. I only discovered this error because I copy-pasted the code and ran it as I wanted to tweak around.