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

Skip to content

Commit 1b5981e

Browse files
author
Davide Faconti
committed
more docs
1 parent 86c2836 commit 1b5981e

File tree

3 files changed

+120
-7
lines changed

3 files changed

+120
-7
lines changed

docs/BT_basics.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,29 @@ Unlike a Finite State Machine, a Behaviour Tree is a __tree of hierarchical node
44
that controls the flow of decision and the execution of "tasks" or, as we
55
will call them further, "__Actions__".
66

7-
The __leaves__ of the tree are the actual commands, ie.e the place where
7+
The __leaves__ of the tree are the actual commands, i.e. the place where
88
our coordinating component interacts with the rest of the system.
99

1010
For instance, in a service-oriented architecture, the leaves would contain
11-
the "client" code that triggers an action.
11+
the "client" code that communicate with the "server" that performs the
12+
operation.
13+
14+
![Leaf To Component Communication](images/LeafToComponentCommunication.png)
15+
1216

1317
The other nodes of the tree, those which are not leaves, control the
1418
"flow of execution".
1519

1620
To better understand how this flow takes place , imagine a signal, that we will further
17-
call "__tick__" that is executed at the __root__ of the tree and propagates through
21+
call "__tick__"; it is executed at the __root__ of the tree and propagates through
1822
the branches until it reaches one or multiple leaves.
1923

20-
The result of a tick can be either:
24+
The `tick()` callback returns a `NodeStatus` that will be either:
2125

2226
- __SUCCESS__
2327
- __FAILURE__
2428
- __RUNNING__
25-
29+
- __IDLE__
2630

2731
The first two, as their names suggest, inform their parent that their operation
2832
was a success or a failure.
@@ -62,7 +66,7 @@ when an action returns RUNNING.
6266
We will assume that each Action is executed atomically and synchronously.
6367

6468

65-
### Sequence
69+
### First ControlNode: Sequence
6670

6771
Let's illustrate how a BT works using the most basic and frequently used
6872
ControlNode: the [SequenceNode](SequenceNode.md).
@@ -119,7 +123,7 @@ __But__ there is an error. Can you find it?
119123
is interrupted.
120124

121125

122-
### Fallback
126+
### Second ControlNode: Fallback
123127

124128
[FallbackNodes](FallbackNode.md), known also as __"Selector"__,
125129
are nodes that can express, as the name suggests, fallback strategies,
6.91 KB
Loading
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="UTF-8"?><diagram program="umlet" version="13.3">
2+
<zoom_level>10</zoom_level>
3+
<element>
4+
<id>UMLClass</id>
5+
<coordinates>
6+
<x>620</x>
7+
<y>150</y>
8+
<w>100</w>
9+
<h>30</h>
10+
</coordinates>
11+
<panel_attributes>Sequence
12+
</panel_attributes>
13+
<additional_attributes/>
14+
</element>
15+
<element>
16+
<id>UMLClass</id>
17+
<coordinates>
18+
<x>540</x>
19+
<y>230</y>
20+
<w>100</w>
21+
<h>30</h>
22+
</coordinates>
23+
<panel_attributes>DetectObject</panel_attributes>
24+
<additional_attributes/>
25+
</element>
26+
<element>
27+
<id>Relation</id>
28+
<coordinates>
29+
<x>580</x>
30+
<y>170</y>
31+
<w>110</w>
32+
<h>80</h>
33+
</coordinates>
34+
<panel_attributes>lt=-</panel_attributes>
35+
<additional_attributes>10.0;60.0;90.0;10.0</additional_attributes>
36+
</element>
37+
<element>
38+
<id>UMLClass</id>
39+
<coordinates>
40+
<x>710</x>
41+
<y>230</y>
42+
<w>100</w>
43+
<h>30</h>
44+
</coordinates>
45+
<panel_attributes>GraspObject</panel_attributes>
46+
<additional_attributes/>
47+
</element>
48+
<element>
49+
<id>Relation</id>
50+
<coordinates>
51+
<x>660</x>
52+
<y>170</y>
53+
<w>120</w>
54+
<h>80</h>
55+
</coordinates>
56+
<panel_attributes>lt=-</panel_attributes>
57+
<additional_attributes>100.0;60.0;10.0;10.0</additional_attributes>
58+
</element>
59+
<element>
60+
<id>UMLClass</id>
61+
<coordinates>
62+
<x>530</x>
63+
<y>330</y>
64+
<w>140</w>
65+
<h>50</h>
66+
</coordinates>
67+
<panel_attributes>ObjectRecognition
68+
Component
69+
bg=orange</panel_attributes>
70+
<additional_attributes/>
71+
</element>
72+
<element>
73+
<id>UMLClass</id>
74+
<coordinates>
75+
<x>690</x>
76+
<y>330</y>
77+
<w>140</w>
78+
<h>50</h>
79+
</coordinates>
80+
<panel_attributes>Manipulation
81+
Component
82+
bg=orange</panel_attributes>
83+
<additional_attributes/>
84+
</element>
85+
<element>
86+
<id>Relation</id>
87+
<coordinates>
88+
<x>580</x>
89+
<y>250</y>
90+
<w>30</w>
91+
<h>100</h>
92+
</coordinates>
93+
<panel_attributes>lt=&lt;.&gt;
94+
</panel_attributes>
95+
<additional_attributes>10.0;10.0;10.0;80.0</additional_attributes>
96+
</element>
97+
<element>
98+
<id>Relation</id>
99+
<coordinates>
100+
<x>750</x>
101+
<y>250</y>
102+
<w>30</w>
103+
<h>100</h>
104+
</coordinates>
105+
<panel_attributes>lt=&lt;.&gt;
106+
</panel_attributes>
107+
<additional_attributes>10.0;10.0;10.0;80.0</additional_attributes>
108+
</element>
109+
</diagram>

0 commit comments

Comments
 (0)