-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
In the documentation about pre conditions, there is no specification of order of execution between the preconditions of a node:
btcpp_website/docs/guides/pre_post_conditions.md
Lines 26 to 33 in a63ca21
| ## Pre conditions | |
| | Name | Description | | |
| |-------------|---------| | |
| | **_skipIf** | Skip the execution of this Node, if the condition is true | | |
| | **_failureIf** | Skip and return FAILURE, if the condition is true | | |
| | **_successIf** | Skip and return SUCCESS, if the condition is true | | |
| | **_while** | Same as _skipIf, but may also interrupt a RUNNING Node if the condition becomes false. | |
Preconditions can easily overlap in real trees (meaning for example, both a _failureIf and a _successIf can become true at the same time) and it can become difficult to know what happens then.
After checking the implementation of the library :
enum class PreCond
{
// order of the enums also tell us the execution order
FAILURE_IF = 0,
SUCCESS_IF,
SKIP_IF,
WHILE_TRUE,
COUNT_
};It seems the order of execution is specified here. I have tested on v4.8.2 and I observed the same results. I believe adding the order in the documentation would help users of the library.
Metadata
Metadata
Assignees
Labels
No labels