py_trees: preempting a subtree

asked 2019-07-03 02:09:20 -0600

knxa gravatar image

I am trying to see if I can migrate my ROS SMACH based sequencing engine to py_trees. However I don't find any concept of preemption in py_trees. Nodes either fail or succeed.

In SMACH I am using a lot of concurrent actions where

  1. an action A runs in parallel with action B and C.
  2. A is the "master action" and B and C should maximum run as long as A.
  3. so when A succeeds, B and C will be preempted, and they will stop their task with a preempted status.
  4. The complete parallel task [A,B,C] will return succeeded.
  5. If any of A,B or C fails, the parallel node should fail as always.

Can I achieve a similar behaviour with py_trees or other behaviour tree implementations? The documentation suggests it would be a wrong track to create new composites.

edit retag flag offensive close merge delete