post conditions #1063
Unanswered
tomdeblauwe
asked this question in
Q&A
post conditions
#1063
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a question about post conditions. I have an action node that checks a certain state and outputs this as an int on the output named "state".
I wanted to have a post condition that would fail if the "state" output after the tick is for example not 5. That would be nice to use in a retry until success decorator.
Intuitively I would want to say _successIf="state == 5" in the xml for my node. But then I found out that is actually a pre condition, so that was not usable for this. But, something similar would be nice... I would like to be able to check after the tick of the node: when the tick() returns success, then execute a script, and override the tick success status by the result of the outcome of this script.
I see in code this is not supported, only a post tick function can change the status, but it has no scripting possiblity it seems?
What would be the best way to do this? I could use precondition decorator after this "GetStateNode" and check the output port value there, but it would be nice if it could be written more compact.
Best regards
Beta Was this translation helpful? Give feedback.
All reactions