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

Skip to content

Commit 0a4896d

Browse files
author
Davide Faconti
committed
Deployed 336ad32 with MkDocs version: 1.0.4
1 parent 5c1eb68 commit 0a4896d

File tree

15 files changed

+69
-74
lines changed

15 files changed

+69
-74
lines changed

BT_basics/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -786,14 +786,14 @@ <h1 id="introduction-to-bts">Introduction to BTs</h1>
786786
<p>The <strong>leaves</strong> of the tree are the actual commands, i.e. the place where
787787
our coordinating component interacts with the rest of the system.</p>
788788
<p>For instance, in a service-oriented architecture, the leaves would contain
789-
the "client" code that communicate with the "server" that performs the
789+
the "client" code that communicates with the "server" that performs the
790790
operation.</p>
791791
<p>In the following example, we can see two Actions executed in a sequence,
792792
<code>DetectObject</code> and <code>GraspObject</code>.</p>
793793
<p><img alt="Leaf To Component Communication" src="../images/LeafToComponentCommunication.png" /></p>
794794
<p>The other nodes of the tree, those which are <strong>not leaves</strong>, control the
795795
"flow of execution".</p>
796-
<p>To better understand how this control flow takes place , imagine a signal
796+
<p>To better understand how this control flow takes place, imagine a signal
797797
called "<strong>tick</strong>"; it is executed at the <strong>root</strong> of the tree and it propagates
798798
through the branches until it reaches one or multiple leaves.</p>
799799
<div class="admonition note">
@@ -817,15 +817,15 @@ <h1 id="introduction-to-bts">Introduction to BTs</h1>
817817
<h2 id="types-of-nodes">Types of nodes</h2>
818818
<p><strong>ControlNodes</strong> are nodes which can have 1 to N children. Once a tick
819819
is received, this tick may be propagated to one or more of the children.</p>
820-
<p><strong>DecoratorNodes</strong> is similar to the ControlNode, but it can have only a single child. </p>
820+
<p><strong>DecoratorNodes</strong> are similar to the ControlNode, but can only have a single child. </p>
821821
<p><strong>ActionNodes</strong> are leaves and do not have any children. The user should
822-
implement their own ActionNodes to perform the actual task.</p>
822+
implement their own ActionNodes to perform the actual tasks.</p>
823823
<p><strong>ConditionNodes</strong> are equivalent to ActionNodes, but
824824
they are always atomic and synchronous, i.e. they must not return RUNNING.
825825
They should not alter the state of the system.</p>
826826
<p><img alt="UML hierarchy" src="../images/TypeHierarchy.png" /></p>
827827
<h2 id="examples">Examples</h2>
828-
<p>To better understand how a BehaviorTrees work, let's focus on some practical
828+
<p>To better understand how BehaviorTrees work, let's focus on some practical
829829
examples. For the sake of simplicity we will not take into account what happens
830830
when an action returns RUNNING.</p>
831831
<p>We will assume that each Action is executed atomically and synchronously.</p>
@@ -857,7 +857,7 @@ <h3 id="decorators">Decorators</h3>
857857
<p>You can extend your grammar creating your own Decorators.</p>
858858
<p><img alt="Simple Decorator: Enter Room" src="../images/DecoratorEnterRoom.png" /></p>
859859
<p>The node <strong>Inverter</strong> is a Decorator that inverts
860-
the result returned by its child; Inverter followed by the node called
860+
the result returned by its child; An Inverter followed by the node called
861861
<strong>DoorOpen</strong> is therefore equivalent to </p>
862862
<div class="codehilite"><pre><span></span>&quot;Is the door closed?&quot;.
863863
</pre></div>
@@ -880,17 +880,17 @@ <h3 id="decorators">Decorators</h3>
880880
<p>We will see later how we can improve this tree. </p>
881881
</div>
882882
<h3 id="second-controlnode-fallback">Second ControlNode: Fallback</h3>
883-
<p><a href="../FallbackNode/">FallbackNodes</a>, known also as <strong>"Selector"</strong>,
883+
<p><a href="../FallbackNode/">FallbackNodes</a>, known also as <strong>"Selectors"</strong>,
884884
are nodes that can express, as the name suggests, fallback strategies,
885-
ie. what to do next if a child returns FAILURE.</p>
885+
i.e. what to do next if a child returns FAILURE.</p>
886886
<p>It ticks the children in order and:</p>
887887
<ul>
888888
<li>If a child returns FAILURE, tick the next one.</li>
889889
<li>If a child returns SUCCESS, then no more children are ticked and the
890890
Fallback returns SUCCESS.</li>
891891
<li>If all the children return FAILURE, then the Fallback returns FAILURE too.</li>
892892
</ul>
893-
<p>In the next example, you can see how Sequence and Fallbacks can be combined:</p>
893+
<p>In the next example, you can see how Sequences and Fallbacks can be combined:</p>
894894
<p><img alt="FallbackNodes" src="../images/FallbackBasic.png" /> </p>
895895
<blockquote>
896896
<p>Is the door open?</p>

FallbackNode/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,16 @@ <h1 id="fallback">Fallback</h1>
716716
All the children are halted. </p>
717717
</li>
718718
</ul>
719-
<p>The two version of fallback differ in the way they react when a child returns
719+
<p>The two versions of Fallback differ in the way they react when a child returns
720720
RUNNING:</p>
721721
<ul>
722722
<li>
723-
<p>Plain old Fallback will return RUNNING and, the next time it is ticked,
724-
it will tick the same child.</p>
723+
<p>FallbackStar will return RUNNING and the next time it is ticked,
724+
it will tick the same child where it left off before.</p>
725725
</li>
726726
<li>
727727
<p>Plain old Fallback will return RUNNING and the index of the next child to
728-
execute is reset.</p>
728+
execute is reset after each execution.</p>
729729
</li>
730730
</ul>
731731
<h2 id="fallback_1">Fallback</h2>

SequenceNode/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ <h1 id="sequences">Sequences</h1>
735735
the sequence returns <strong>SUCCESS</strong>.</p>
736736
</li>
737737
</ul>
738-
<p>To understand how the tree ControlNodes differ, refer to the following table:</p>
738+
<p>To understand how the three ControlNodes differ, refer to the following table:</p>
739739
<table>
740740
<thead>
741741
<tr>
@@ -805,9 +805,9 @@ <h2 id="sequence">Sequence</h2>
805805
<p>This node is particularly useful to continuously check Conditions; but
806806
the user should also be careful when using asynchronous children, to be
807807
sure that thy are not ticked more often that expected.</p>
808-
<p>Let's take a look to another example:</p>
808+
<p>Let's take a look at another example:</p>
809809
<p><img alt="ReactiveSequence" src="../images/ReactiveSequence.png" /></p>
810-
<p><code>ApproachEnemy</code> is an <strong>asynchronous</strong> action that m return RUNNING until
810+
<p><code>ApproachEnemy</code> is an <strong>asynchronous</strong> action that returns RUNNING until
811811
it is, eventually, completed.</p>
812812
<p>The condition <code>isEnemyVisible</code> will be called many times and,
813813
if it becomes false (i,e, "FAILURE"), <code>ApproachEnemy</code> is halted. </p>
@@ -830,8 +830,8 @@ <h2 id="sequence">Sequence</h2>
830830
<span class="k">return</span> <span class="n">SUCCESS</span><span class="p">;</span>
831831
</pre></div>
832832
</details><h2 id="sequencestar">SequenceStar</h2>
833-
<p>Use this ControlNode when you don't want to tick again children that
834-
return SUCCESS already</p>
833+
<p>Use this ControlNode when you don't want to tick children again that
834+
already returned SUCCESS.</p>
835835
<p><strong>Example</strong>:</p>
836836
<p>This is a patrolling agent/robot that must visit locations A, B and C <strong>only once</strong>.
837837
If the action <strong>GoTo(B)</strong> fails, <strong>GoTo(A)</strong> will not be ticked again.</p>

search/search_index.json

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

sitemap.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,92 +2,92 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>None</loc>
5-
<lastmod>2019-03-06</lastmod>
5+
<lastmod>2019-03-12</lastmod>
66
<changefreq>daily</changefreq>
77
</url>
88
<url>
99
<loc>None</loc>
10-
<lastmod>2019-03-06</lastmod>
10+
<lastmod>2019-03-12</lastmod>
1111
<changefreq>daily</changefreq>
1212
</url>
1313
<url>
1414
<loc>None</loc>
15-
<lastmod>2019-03-06</lastmod>
15+
<lastmod>2019-03-12</lastmod>
1616
<changefreq>daily</changefreq>
1717
</url>
1818
<url>
1919
<loc>None</loc>
20-
<lastmod>2019-03-06</lastmod>
20+
<lastmod>2019-03-12</lastmod>
2121
<changefreq>daily</changefreq>
2222
</url>
2323
<url>
2424
<loc>None</loc>
25-
<lastmod>2019-03-06</lastmod>
25+
<lastmod>2019-03-12</lastmod>
2626
<changefreq>daily</changefreq>
2727
</url>
2828
<url>
2929
<loc>None</loc>
30-
<lastmod>2019-03-06</lastmod>
30+
<lastmod>2019-03-12</lastmod>
3131
<changefreq>daily</changefreq>
3232
</url>
3333
<url>
3434
<loc>None</loc>
35-
<lastmod>2019-03-06</lastmod>
35+
<lastmod>2019-03-12</lastmod>
3636
<changefreq>daily</changefreq>
3737
</url>
3838
<url>
3939
<loc>None</loc>
40-
<lastmod>2019-03-06</lastmod>
40+
<lastmod>2019-03-12</lastmod>
4141
<changefreq>daily</changefreq>
4242
</url>
4343
<url>
4444
<loc>None</loc>
45-
<lastmod>2019-03-06</lastmod>
45+
<lastmod>2019-03-12</lastmod>
4646
<changefreq>daily</changefreq>
4747
</url>
4848
<url>
4949
<loc>None</loc>
50-
<lastmod>2019-03-06</lastmod>
50+
<lastmod>2019-03-12</lastmod>
5151
<changefreq>daily</changefreq>
5252
</url>
5353
<url>
5454
<loc>None</loc>
55-
<lastmod>2019-03-06</lastmod>
55+
<lastmod>2019-03-12</lastmod>
5656
<changefreq>daily</changefreq>
5757
</url>
5858
<url>
5959
<loc>None</loc>
60-
<lastmod>2019-03-06</lastmod>
60+
<lastmod>2019-03-12</lastmod>
6161
<changefreq>daily</changefreq>
6262
</url>
6363
<url>
6464
<loc>None</loc>
65-
<lastmod>2019-03-06</lastmod>
65+
<lastmod>2019-03-12</lastmod>
6666
<changefreq>daily</changefreq>
6767
</url>
6868
<url>
6969
<loc>None</loc>
70-
<lastmod>2019-03-06</lastmod>
70+
<lastmod>2019-03-12</lastmod>
7171
<changefreq>daily</changefreq>
7272
</url>
7373
<url>
7474
<loc>None</loc>
75-
<lastmod>2019-03-06</lastmod>
75+
<lastmod>2019-03-12</lastmod>
7676
<changefreq>daily</changefreq>
7777
</url>
7878
<url>
7979
<loc>None</loc>
80-
<lastmod>2019-03-06</lastmod>
80+
<lastmod>2019-03-12</lastmod>
8181
<changefreq>daily</changefreq>
8282
</url>
8383
<url>
8484
<loc>None</loc>
85-
<lastmod>2019-03-06</lastmod>
85+
<lastmod>2019-03-12</lastmod>
8686
<changefreq>daily</changefreq>
8787
</url>
8888
<url>
8989
<loc>None</loc>
90-
<lastmod>2019-03-06</lastmod>
90+
<lastmod>2019-03-12</lastmod>
9191
<changefreq>daily</changefreq>
9292
</url>
9393
</urlset>

sitemap.xml.gz

0 Bytes
Binary file not shown.

tutorial_01_first_tree/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ <h2 id="how-to-create-your-own-actionnodes">How to create your own ActionNodes</
772772
<span class="p">}</span>
773773

774774
<span class="k">private</span><span class="o">:</span>
775-
<span class="kt">bool</span> <span class="n">_open</span><span class="p">;</span> <span class="c1">// shrared information</span>
775+
<span class="kt">bool</span> <span class="n">_open</span><span class="p">;</span> <span class="c1">// shared information</span>
776776
<span class="p">};</span>
777777
</pre></div>
778778

@@ -783,7 +783,7 @@ <h2 id="how-to-create-your-own-actionnodes">How to create your own ActionNodes</
783783
<li>GripperInterface::close()</li>
784784
</ul>
785785
<h2 id="create-a-tree-dynamically-with-an-xml">Create a tree dynamically with an XML</h2>
786-
<p>Let's consider the followinf XML file named <strong>my_tree.xml</strong>:</p>
786+
<p>Let's consider the following XML file named <strong>my_tree.xml</strong>:</p>
787787
<div class="codehilite"><pre><span></span> <span class="nt">&lt;root</span> <span class="na">main_tree_to_execute =</span> <span class="s">&quot;MainTree&quot;</span> <span class="nt">&gt;</span>
788788
<span class="nt">&lt;BehaviorTree</span> <span class="na">ID=</span><span class="s">&quot;MainTree&quot;</span><span class="nt">&gt;</span>
789789
<span class="nt">&lt;Sequence</span> <span class="na">name=</span><span class="s">&quot;root_sequence&quot;</span><span class="nt">&gt;</span>

tutorial_02_basic_ports/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,11 @@ <h2 id="inputs-ports">Inputs ports</h2>
735735
<p>A "blackboard" is a simple <strong>key/value storage</strong> shared by all the nodes
736736
of the Tree.</p>
737737
<p>An "entry" of the Blackboard is a <strong>key/value pair</strong>.</p>
738-
<p>Inputs ports can read an entry in the Blackboard, whilst an Output port
738+
<p>Input ports can read an entry in the Blackboard, whilst an Output port
739739
can write into an entry.</p>
740740
<p>Let's suppose that we want to create an ActionNode called <code>SaySomething</code>,
741741
that should print a given string on <code>std::cout</code>.</p>
742-
<p>Such string will be passed using an input port called <code>message</code>.</p>
742+
<p>Such a string will be passed using an input port called <code>message</code>.</p>
743743
<p>Consider these alternative XML syntaxes:</p>
744744
<div class="codehilite"><pre><span></span> <span class="nt">&lt;SaySomething</span> <span class="na">name=</span><span class="s">&quot;first&quot;</span> <span class="na">message=</span><span class="s">&quot;hello world&quot;</span> <span class="nt">/&gt;</span>
745745
<span class="nt">&lt;SaySomething</span> <span class="na">name=</span><span class="s">&quot;second&quot;</span> <span class="na">message=</span><span class="s">&quot;{greetings}&quot;</span> <span class="nt">/&gt;</span>
@@ -751,7 +751,7 @@ <h2 id="inputs-ports">Inputs ports</h2>
751751

752752

753753
<p>The message is read from the XML file, therefore it can not change at run-time.</p>
754-
<p>The syntax of the <strong>second node</strong>, instead, means: </p>
754+
<p>The syntax of the <strong>second node</strong> instead means: </p>
755755
<div class="codehilite"><pre><span></span>&quot;Read the current value in the entry of the blackboard called &#39;greetings&#39; &quot;.
756756
</pre></div>
757757

@@ -819,7 +819,7 @@ <h2 id="inputs-ports">Inputs ports</h2>
819819
<h2 id="output-ports">Output ports</h2>
820820
<p>An input port pointing to the entry of the blackboard will be valid only
821821
if another node have already wrritten "something" inside that same entry.</p>
822-
<p><code>ThinkWhatToSay</code> is an example of Node that uses a <strong>output port</strong> to writes a
822+
<p><code>ThinkWhatToSay</code> is an example of Node that uses an <strong>output port</strong> to write a
823823
string into an entry.</p>
824824
<div class="codehilite"><pre><span></span><span class="k">class</span> <span class="nc">ThinkWhatToSay</span> <span class="o">:</span> <span class="k">public</span> <span class="n">SyncActionNode</span>
825825
<span class="p">{</span>
@@ -844,7 +844,7 @@ <h2 id="output-ports">Output ports</h2>
844844
<span class="p">};</span>
845845
</pre></div>
846846

847-
<p>Alternatively, most of the times for debugging purposes, it is possible to write a
847+
<p>Alternatively, most of the time for debugging purposes, it is possible to write a
848848
static value into an entry using the built-in Actions called <code>SetBlackboard</code>.</p>
849849
<div class="codehilite"><pre><span></span> <span class="nt">&lt;SetBlackboard</span> <span class="na">output_key=</span><span class="s">&quot;the_answer&quot;</span> <span class="na">value=</span><span class="s">&quot;The answer is 42&quot;</span> <span class="nt">/&gt;</span>
850850
</pre></div>

tutorial_03_generic_ports/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,12 @@ <h1 id="ports-with-generic-types">Ports with generic types</h1>
699699
<p>In the previous tutorials we introduced input and output ports, where the
700700
type of the port itself was a <code>std::string</code>.</p>
701701
<p>This is the easiest port type to deal with, because any parameter passed
702-
from the XML definition will be (obviosly) a string.</p>
702+
from the XML definition will be (obviously) a string.</p>
703703
<p>Next, we will describe how to use any generic C++ type in your code.</p>
704704
<h2 id="parsing-a-string">Parsing a string</h2>
705705
<p><strong>BehaviorTree.CPP</strong> supports automatic conversion of strings into common
706706
types, such as <code>int</code>, <code>long</code>, <code>double</code>, <code>bool</code>, <code>NodeStatus</code>, etc.</p>
707-
<p>But user defined types can be supported easily. For instance:</p>
707+
<p>But user defined types can be supported easily as well. For instance:</p>
708708
<div class="codehilite"><pre><span></span><span class="c1">// We want to be able to use this custom type</span>
709709
<span class="k">struct</span> <span class="n">Position2D</span>
710710
<span class="p">{</span>
@@ -753,7 +753,7 @@ <h2 id="parsing-a-string">Parsing a string</h2>
753753
</ul>
754754
<h2 id="example">Example</h2>
755755
<p>Similarly to the previous tutorial, we can create two custom Actions,
756-
one will writes into a port and the other will reads from a port.</p>
756+
one will write into a port and the other will read from a port.</p>
757757
<div class="codehilite"><pre><span></span><span class="k">class</span> <span class="nc">CalculateGoal</span><span class="o">:</span> <span class="k">public</span> <span class="n">SyncActionNode</span>
758758
<span class="p">{</span>
759759
<span class="k">public</span><span class="o">:</span>
@@ -803,7 +803,7 @@ <h2 id="example">Example</h2>
803803
<span class="p">};</span>
804804
</pre></div>
805805

806-
<p>We can now connect input/output ports as usual, pointing at the same
806+
<p>We can now connect input/output ports as usual, pointing to the same
807807
entry of the Blackboard.</p>
808808
<p>The tree in the next example is a Sequence of 4 actions</p>
809809
<ul>

tutorial_04_sequence_star/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,12 +804,12 @@ <h2 id="sequence-vs-reactivesequence">Sequence VS ReactiveSequence</h2>
804804
Robot says: &quot;mission completed!&quot;
805805
</pre></div>
806806

807-
<p>You may noticed that when <code>executeTick()</code> was called, <code>MoveBase</code> returned
807+
<p>You may have noticed that when <code>executeTick()</code> was called, <code>MoveBase</code> returned
808808
<strong>RUNNING</strong> the 1st and 2nd time, and eventually <strong>SUCCESS</strong> the 3rd time.</p>
809809
<p><code>BatteryOK</code> is executed only once. </p>
810-
<p>If we use <code>ReactiveSequence</code> instead, when the child <code>MoveBase</code> returns RUNNING,
810+
<p>If we use a <code>ReactiveSequence</code> instead, when the child <code>MoveBase</code> returns RUNNING,
811811
the sequence is restarted and the condition <code>BatteryOK</code> is executed <strong>again</strong>.</p>
812-
<p>If, at any point, <code>BatteryOK</code> returned <strong>FAILURE</strong>, the <code>MoveBase</code> actions
812+
<p>If, at any point, <code>BatteryOK</code> returned <strong>FAILURE</strong>, the <code>MoveBase</code> action
813813
would be <em>interrupted</em> (<em>halted</em>, to be specific).</p>
814814
<div class="codehilite"><pre><span></span> <span class="nt">&lt;root&gt;</span>
815815
<span class="nt">&lt;BehaviorTree&gt;</span>

0 commit comments

Comments
 (0)