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

Skip to content

Commit c439107

Browse files
author
Davide Faconti
committed
Deployed 1b5981e with MkDocs version: 1.0.4
1 parent 80851a4 commit c439107

File tree

5 files changed

+127
-15
lines changed

5 files changed

+127
-15
lines changed

BT_basics/index.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@
368368
<ul class="md-nav__list">
369369

370370
<li class="md-nav__item">
371-
<a href="#sequence" title="Sequence" class="md-nav__link">
372-
Sequence
371+
<a href="#first-controlnode-sequence" title="First ControlNode: Sequence" class="md-nav__link">
372+
First ControlNode: Sequence
373373
</a>
374374

375375
</li>
@@ -382,8 +382,8 @@
382382
</li>
383383

384384
<li class="md-nav__item">
385-
<a href="#fallback" title="Fallback" class="md-nav__link">
386-
Fallback
385+
<a href="#second-controlnode-fallback" title="Second ControlNode: Fallback" class="md-nav__link">
386+
Second ControlNode: Fallback
387387
</a>
388388

389389
</li>
@@ -596,8 +596,8 @@
596596
<ul class="md-nav__list">
597597

598598
<li class="md-nav__item">
599-
<a href="#sequence" title="Sequence" class="md-nav__link">
600-
Sequence
599+
<a href="#first-controlnode-sequence" title="First ControlNode: Sequence" class="md-nav__link">
600+
First ControlNode: Sequence
601601
</a>
602602

603603
</li>
@@ -610,8 +610,8 @@
610610
</li>
611611

612612
<li class="md-nav__item">
613-
<a href="#fallback" title="Fallback" class="md-nav__link">
614-
Fallback
613+
<a href="#second-controlnode-fallback" title="Second ControlNode: Fallback" class="md-nav__link">
614+
Second ControlNode: Fallback
615615
</a>
616616

617617
</li>
@@ -651,20 +651,23 @@ <h1 id="introduction-to-bts">Introduction to BTs</h1>
651651
<p>Unlike a Finite State Machine, a Behaviour Tree is a <strong>tree of hierarchical nodes</strong>
652652
that controls the flow of decision and the execution of "tasks" or, as we
653653
will call them further, "<strong>Actions</strong>".</p>
654-
<p>The <strong>leaves</strong> of the tree are the actual commands, ie.e the place where
654+
<p>The <strong>leaves</strong> of the tree are the actual commands, i.e. the place where
655655
our coordinating component interacts with the rest of the system.</p>
656656
<p>For instance, in a service-oriented architecture, the leaves would contain
657-
the "client" code that triggers an action.</p>
657+
the "client" code that communicate with the "server" that performs the
658+
operation.</p>
659+
<p><img alt="Leaf To Component Communication" src="../images/LeafToComponentCommunication.png" /></p>
658660
<p>The other nodes of the tree, those which are not leaves, control the
659661
"flow of execution".</p>
660662
<p>To better understand how this flow takes place , imagine a signal, that we will further
661-
call "<strong>tick</strong>" that is executed at the <strong>root</strong> of the tree and propagates through
663+
call "<strong>tick</strong>"; it is executed at the <strong>root</strong> of the tree and propagates through
662664
the branches until it reaches one or multiple leaves.</p>
663-
<p>The result of a tick can be either:</p>
665+
<p>The <code>tick()</code> callback returns a <code>NodeStatus</code> that will be either:</p>
664666
<ul>
665667
<li><strong>SUCCESS</strong></li>
666668
<li><strong>FAILURE</strong></li>
667669
<li><strong>RUNNING</strong></li>
670+
<li><strong>IDLE</strong></li>
668671
</ul>
669672
<p>The first two, as their names suggest, inform their parent that their operation
670673
was a success or a failure.</p>
@@ -689,7 +692,7 @@ <h2 id="learn-by-example">Learn by example</h2>
689692
examples. For the sake of simplicity we will not take into account what happens
690693
when an action returns RUNNING.</p>
691694
<p>We will assume that each Action is executed atomically and synchronously.</p>
692-
<h3 id="sequence">Sequence</h3>
695+
<h3 id="first-controlnode-sequence">First ControlNode: Sequence</h3>
693696
<p>Let's illustrate how a BT works using the most basic and frequently used
694697
ControlNode: the <a href="../SequenceNode/">SequenceNode</a>.</p>
695698
<p>The children of a ControlNode are always <strong>ordered</strong>; it is up to the ControlNode
@@ -727,7 +730,7 @@ <h3 id="sequence">Sequence</h3>
727730
<p><strong>But</strong> there is an error. Can you find it?</p>
728731
<details class="warning"><summary>Exercise: find the bug! Expand to read the answer.</summary><p>If <strong>DoorOpen</strong> returns FAILURE, we have the desired behaviour.
729732
But if it returns SUCCESS, the left branch fails and the entire Sequence
730-
is interrupted. </p></details><h3 id="fallback">Fallback</h3>
733+
is interrupted. </p></details><h3 id="second-controlnode-fallback">Second ControlNode: Fallback</h3>
731734
<p><a href="../FallbackNode/">FallbackNodes</a>, known also as <strong>"Selector"</strong>,
732735
are nodes that can express, as the name suggests, fallback strategies,
733736
ie. what to do next if a child returns FAILURE.</p>
6.91 KB
Loading

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sitemap.xml.gz

0 Bytes
Binary file not shown.

uml/LeafToComponentCommunication.uxf

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)