Skip to content

Commit 74c039b

Browse files
author
andrewluiqut
committed
behaviours_base.py: method update on changing how the GeneralCommanderStates.ABORTED signal is handled, updated to enables the task trees to report pytree FAILURE but the task status can stay the same. This allows the task status is WORKING and so other parts of the behaviour tree may deal with the arm commander abort signal such as retry or trying another branch
1 parent c544569 commit 74c039b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

task_trees/behaviours_base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,12 @@ def update(self):
235235
return Status.SUCCESS
236236
elif self.commander_state == GeneralCommanderStates.ABORTED:
237237
logger.error(f'ConditionalCommanderBehaviour handles task aborted')
238-
if self.the_blackboard.exists('task'):
239-
self.the_blackboard.set('task.state', TaskStates.ABORTED)
240-
self.tidy_up()
238+
# NOTE: the update enables the task trees to report pytree FAILURE but the task status can stay the same
239+
# This allows the task status is WORKING and so other parts of the behaviour tree may deal with the arm commander abort signal
240+
# such as retry or trying another branch
241+
# if self.the_blackboard.exists('task'):
242+
# self.the_blackboard.set('task.state', TaskStates.ABORTED)
243+
# self.tidy_up()
241244
return Status.FAILURE
242245
elif self.commander_state == GeneralCommanderStates.ERROR:
243246
logger.error(f'ConditionalCommanderBehaviour handles task error')

0 commit comments

Comments
 (0)