py_trees icon indicating copy to clipboard operation
py_trees copied to clipboard

py_trees Parallel is not work what I expected

Open sudalsol opened this issue 11 months ago • 0 comments

https://github.com/splintered-reality/py_trees/blob/devel/py_trees/composites.py#L778

        # clean up dangling (running) children
        for child in self.children:
            if child.status == common.Status.RUNNING:
                # this unfortunately knocks out it's running status for introspection
                # but logically is the correct thing to do, see #132.
                child.stop(common.Status.INVALID)
        Composite.stop(self, new_status)
  • child.stop() method makes child as INVALID state
  • Composite.stop() method makes not INVALID behavior to INVALID behavior use child.stop() method again
    • https://github.com/splintered-reality/py_trees/blob/devel/py_trees/composites.py#L175
  • but some low resource pc env, that method call child.stop() which already called in first step.
  • it makes behavior.terminate() twice.

"behavior.terminate() called twice in Parallel's children when Parallel decorator is stopped" is known issue?

sudalsol avatar Mar 13 '24 08:03 sudalsol