splintered-reality / py_trees

Python implementation of behaviour trees.
Other
415 stars 139 forks source link

Minor code mistake in documentation #441

Open Jibrangit opened 3 months ago

Jibrangit commented 3 months ago

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.

Jibrangit commented 3 months ago

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.