Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aee6327

Browse files
committed
fix tutorial doc
1 parent b95ee91 commit aee6327

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

docs/tutorial_04_sequence_star.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
# Sequences and Async Actions
1+
# Sequences and AsyncActionNode
22

33
The next example shows the difference between a `SequenceNode` and a
4-
`SequenceStarNode`.
5-
6-
Additionally, we introduce the __Loggers__ which are mechanism to print,
7-
store and publish state transitions in the tree.
8-
9-
## Asynchronous Actions
4+
`ReactiveSequence`.
105

116
An Asynchornous Action has it's own thread. This allows the user to
127
use blocking functions but to return the flow of execution
@@ -82,7 +77,7 @@ The user must also implement `convertFromString<Pose2D>(StringView)`,
8277
as shown in the previous tutorial.
8378

8479

85-
## Sequence VS SequenceStar
80+
## Sequence VS ReactiveSequence
8681

8782
The following example should use a simple `SequenceNode`.
8883

@@ -139,35 +134,32 @@ Expected output:
139134
[ MoveBase: STARTED ]. goal: x=1 y=2.0 theta=3.00
140135
141136
--- 2nd executeTick() ---
142-
[ Battery: OK ]
143137
[ MoveBase: FINISHED ]
144138
145139
--- 3rd executeTick() ---
146-
[ Battery: OK ]
147140
Robot says: "mission completed!"
148141
```
149142

150-
151143
You may noticed that when `executeTick()` was called, `MoveBase` returned
152144
__RUNNING__ the 1st and 2nd time, and eventually __SUCCESS__ the 3rd time.
153145

154-
On the other hand, the `ConditionNode` called `BatteryOK` was executed three times.
155-
If, at any point, `BatteryOK` returned __FAILURE__, the `MoveBase` actions
156-
would be _interrupted_ (_halted_, to be specific).
146+
`BatteryOK` is executed only once.
157147

148+
If we use `ReactiveSequence` instead, when the child `MoveBase` returns RUNNING,
149+
the sequence is restarted and the condition `BatteryOK` is executed __again__.
158150

159-
If we use `SequenceStarNode` instead, any succesful children (in particular
160-
`BatteryOK`) will be executed only _once_.
151+
If, at any point, `BatteryOK` returned __FAILURE__, the `MoveBase` actions
152+
would be _interrupted_ (_halted_, to be specific).
161153

162154
```XML hl_lines="3"
163155
<root>
164156
<BehaviorTree>
165-
<SequenceStar>
157+
<ReactiveSequence>
166158
<BatteryOK/>
167159
<SaySomething message="mission started..." />
168160
<MoveBase goal="1;2;3"/>
169161
<SaySomething message="mission completed!" />
170-
</SequenceStar>
162+
</ReactiveSequence>
171163
</BehaviorTree>
172164
</root>
173165
```
@@ -182,9 +174,11 @@ Expected output:
182174
[ MoveBase: STARTED ]. goal: x=1 y=2.0 theta=3.00
183175
184176
--- 2nd executeTick() ---
177+
[ Battery: OK ]
185178
[ MoveBase: FINISHED ]
186179
187180
--- 3rd executeTick() ---
181+
[ Battery: OK ]
188182
Robot says: "mission completed!"
189183
```
190184

0 commit comments

Comments
 (0)