@@ -49,7 +49,7 @@ sufficient (and necessary) to describe it, without knowing any additional
49
49
detail about the actual implementation.
50
50
51
51
52
- # 2. Blackboard, NodeParameters an DataPorts
52
+ ## Blackboard, NodeParameters an DataPorts
53
53
54
54
In version ` 2.x ` we had the intuition that passing one or more arguments
55
55
to a ` TreeNode ` would make the node more generic and reusable.
@@ -222,3 +222,71 @@ The main differences are:
222
222
223
223
- Remapping to a shared entry ("GoalPose") is done at run-time in the XML.
224
224
225
+ ## SubTrees, remapping and isolated Blackboards
226
+
227
+ WIP
228
+
229
+ ## ControlNodes renamed/refactored
230
+
231
+ The [principle of least astonishment](https://en.wikipedia.org/wiki/Principle_of_least_astonishment)
232
+ applies to user interface and software design. A typical formulation of the principle, from 1984, is:
233
+
234
+ >"If a necessary feature has a high astonishment factor, it may be necessary
235
+ to redesign the feature.
236
+
237
+ To me the two main building blocks of BehaviorTree.CPp, the `SequenceNode`
238
+ and the `FallbackNode` have a very high astonishment factor.
239
+
240
+ The original authored design to build __reactive__ Behavior Trees (see for reference
241
+ this [publication](0https://arxiv.org/abs/1709.00084).
242
+
243
+ But reactive ControlNodes are useful but hard to reason about sometimes.
244
+ But their name seems to suggest that they are the "default" Sequence and Fallback.
245
+
246
+ I don't think they should be the default. For instance, most of the time users
247
+ of version 2.x should probably use `SequenceStar`, not `Sequence`.
248
+
249
+ I renamed ControlNodes as follow to reflect this reality; previous users might be
250
+ upset about it but the new major version was the opportunity to do things "right".
251
+
252
+
253
+ | Old Name (v2) | New name (v3) | Is reactive? |
254
+ |---|---|:---:|
255
+ | Sequence | ReactiveSequence | YES |
256
+ | SequenceStar (reset_on_failure=true) | Sequence | NO |
257
+ | SequenceStar (reset_on_failure=false) | SequenceStar | NO |
258
+ | Fallback | ReactiveFallback | YES |
259
+ | FallbackStar | Fallback | NO |
260
+ | Parallel | Parallel | Yes(v2) / No(v3) |
261
+
262
+ By __"reactive"__ we mean that:
263
+
264
+ - Children (usually `ConditionNodes`) that returned
265
+ a valid value such as SUCCESS or FAILURE, might be ticked again if another
266
+ child returns RUNNING.
267
+
268
+ - A different result in that Condition might abort/halt the RUNNING asynchronous child.
269
+
270
+
271
+ A reactive `ParallelNode` was very confusing. In most cases, you want to use
272
+ `ReactiveSequence` instead.
273
+
274
+ In version `2.x` it was unclear what would happen if a "reactive" node has
275
+ more than a single asynchronous child. __The new recommendation is: they shouldn't__.
276
+
277
+ This is a very opinionated decision; on the other hand, it doesn't limit
278
+ your ability to create arbitrarily complex Behavior Trees, but it helps
279
+ keeping the cognitive overhead a little lower.
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
0 commit comments