Skip to content

Commit 1ea0204

Browse files
authored
Update fallback documentation to V3 (BehaviorTree#288)
* Update FallbackNode.md description to V3 * Fix typo
1 parent d769f59 commit 1ea0204

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

docs/BT_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The first two, as their names suggests, inform their parent that their operation
3939
was a success or a failure.
4040

4141
RUNNING is returned by __asynchronous__ nodes when their execution is not
42-
completed and they needs more time to return a valid result.
42+
completed and they need more time to return a valid result.
4343

4444
__Asynchronous nodes can be halted__.
4545

docs/FallbackNode.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ in other frameworks.
55

66
Their purpose is to try different strategies, until we find one that "works".
77

8+
Currently the framework provides two kinds of nodes:
9+
10+
- Fallback
11+
- ReactiveFallback
12+
813
They share the following rules:
914

1015
- Before ticking the first child, the node status becomes __RUNNING__.
@@ -17,14 +22,19 @@ They share the following rules:
1722
- If a child returns __SUCCESS__, it stops and returns __SUCCESS__.
1823
All the children are halted.
1924

20-
The two versions of Fallback differ in the way they react when a child returns
21-
RUNNING:
25+
To understand how the two ControlNodes differ, refer to the following table:
2226

23-
- FallbackStar will return RUNNING and the next time it is ticked,
24-
it will tick the same child where it left off before.
25-
26-
- Plain old Fallback will return RUNNING and the index of the next child to
27-
execute is reset after each execution.
27+
| Type of ControlNode | Child returns RUNNING |
28+
|---|:---:|
29+
| Fallback | Tick again |
30+
| ReactiveFallback | Restart |
31+
32+
- "__Restart__" means that the entire fallback is restarted from the first
33+
child of the list.
34+
35+
- "__Tick again__" means that the next time the fallback is ticked, the
36+
same child is ticked again. Previous sibling, which returned FAILURE already,
37+
are not ticked again.
2838

2939
## Fallback
3040

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ __BehaviorTree.CPP__ has many interesting features, when compared to other imple
1313

1414
- It makes asynchronous Actions, i.e. non-blocking, a first-class citizen.
1515
- It allows the creation of trees at run-time, using a textual representation (XML).
16-
- You can link staticaly you custom TreeNodes or convert them into plugins
16+
- You can link staticaly your custom TreeNodes or convert them into plugins
1717
which are loaded at run-time.
1818
- It includes a __logging/profiling__ infrastructure that allows the user
1919
to visualize, record, replay and analyze state transitions.

0 commit comments

Comments
 (0)