Skip to content

Honor pre- and post-conditions in ThreadedAction - #1286

Merged
facontidavide merged 1 commit into
BehaviorTree:masterfrom
km-robotics:pre_post_threaded_action
Nov 13, 2026
Merged

facontidavide merged 1 commit into
BehaviorTree:masterfrom
km-robotics:pre_post_threaded_action

Conversation

@galou

@galou galou commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

ThreadedAction::executeTick() overrides TreeNode::executeTick() without calling it, so the pre-conditions (_skipIf, _failureIf, _successIf, _while, _onlyIf, _onStart) and the post-conditions (_onSuccess, _onFailure, _post) were ignored on all subclasses of ThreadedAction: e.g. a node with _skipIf="true" was still ticked.

Check them as TreeNode::executeTick() does. The pre- and post-tick callbacks are still not called for threaded actions.

`ThreadedAction::executeTick()` overrides `TreeNode::executeTick()`
without calling it, so the pre-conditions (`_skipIf`, `_failureIf`,
`_successIf`, `_while`, `_onlyIf`, `_onStart`) and the post-conditions
(`_onSuccess`, `_onFailure`, `_post`) were ignored on all subclasses of
`ThreadedAction`: e.g. a node with `_skipIf="true"` was still ticked.

Check them as `TreeNode::executeTick()` does. The pre- and post-tick
callbacks are still not called for threaded actions.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
@facontidavide
facontidavide merged commit ba88b83 into BehaviorTree:master Nov 13, 2026
17 checks passed
@facontidavide

Copy link
Copy Markdown
Collaborator

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants