Skip to content

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

Open
galou wants to merge 1 commit into
BehaviorTree:masterfrom
km-robotics:pre_post_threaded_action
Open

galou wants to merge 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>

This branch has not been deployed

No deployments
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.

1 participant