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

Skip to content

Commit e96865d

Browse files
Merge pull request BehaviorTree#66 from hlzl/doc_typos
Fixed some typos in the documentation
2 parents 708f00d + 3e3880f commit e96865d

11 files changed

+44
-44
lines changed

.DS_Store

6 KB
Binary file not shown.

docs/BT_basics.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,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 communicate with the "server" that performs the
11+
the "client" code that communicates with the "server" that performs the
1212
operation.
1313

1414
In the following example, we can see two Actions executed in a sequence,
@@ -19,7 +19,7 @@ In the following example, we can see two Actions executed in a sequence,
1919
The other nodes of the tree, those which are __not leaves__, control the
2020
"flow of execution".
2121

22-
To better understand how this control flow takes place , imagine a signal
22+
To better understand how this control flow takes place, imagine a signal
2323
called "__tick__"; it is executed at the __root__ of the tree and it propagates
2424
through the branches until it reaches one or multiple leaves.
2525

@@ -51,10 +51,10 @@ which child should be ticked next or may return a result to its own parent.
5151
__ControlNodes__ are nodes which can have 1 to N children. Once a tick
5252
is received, this tick may be propagated to one or more of the children.
5353

54-
__DecoratorNodes__ is similar to the ControlNode, but it can have only a single child.
54+
__DecoratorNodes__ are similar to the ControlNode, but can only have a single child.
5555

5656
__ActionNodes__ are leaves and do not have any children. The user should
57-
implement their own ActionNodes to perform the actual task.
57+
implement their own ActionNodes to perform the actual tasks.
5858

5959
__ConditionNodes__ are equivalent to ActionNodes, but
6060
they are always atomic and synchronous, i.e. they must not return RUNNING.
@@ -65,7 +65,7 @@ They should not alter the state of the system.
6565

6666
## Examples
6767

68-
To better understand how a BehaviorTrees work, let's focus on some practical
68+
To better understand how BehaviorTrees work, let's focus on some practical
6969
examples. For the sake of simplicity we will not take into account what happens
7070
when an action returns RUNNING.
7171

@@ -108,7 +108,7 @@ You can extend your grammar creating your own Decorators.
108108
![Simple Decorator: Enter Room](images/DecoratorEnterRoom.png)
109109

110110
The node __Inverter__ is a Decorator that inverts
111-
the result returned by its child; Inverter followed by the node called
111+
the result returned by its child; An Inverter followed by the node called
112112
__DoorOpen__ is therefore equivalent to
113113

114114
"Is the door closed?".
@@ -133,9 +133,9 @@ But...
133133

134134
### Second ControlNode: Fallback
135135

136-
[FallbackNodes](FallbackNode.md), known also as __"Selector"__,
136+
[FallbackNodes](FallbackNode.md), known also as __"Selectors"__,
137137
are nodes that can express, as the name suggests, fallback strategies,
138-
ie. what to do next if a child returns FAILURE.
138+
i.e. what to do next if a child returns FAILURE.
139139

140140
It ticks the children in order and:
141141

@@ -144,7 +144,7 @@ It ticks the children in order and:
144144
Fallback returns SUCCESS.
145145
- If all the children return FAILURE, then the Fallback returns FAILURE too.
146146

147-
In the next example, you can see how Sequence and Fallbacks can be combined:
147+
In the next example, you can see how Sequences and Fallbacks can be combined:
148148

149149
![FallbackNodes](images/FallbackBasic.png)
150150

docs/FallbackNode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ They share the following rules:
1717
- If a child returns __SUCCESS__, it stops and returns __SUCCESS__.
1818
All the children are halted.
1919

20-
The two version of fallback differ in the way they react when a child returns
20+
The two versions of Fallback differ in the way they react when a child returns
2121
RUNNING:
2222

23-
- Plain old Fallback will return RUNNING and, the next time it is ticked,
24-
it will tick the same child.
23+
- FallbackStar will return RUNNING and the next time it is ticked,
24+
it will tick the same child where it left off before.
2525

2626
- Plain old Fallback will return RUNNING and the index of the next child to
27-
execute is reset.
27+
execute is reset after each execution.
2828

2929
## Fallback
3030

docs/SequenceNode.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ They share the following rules:
1818
- If the __last__ child returns __SUCCESS__ too, all the children are halted and
1919
the sequence returns __SUCCESS__.
2020

21-
To understand how the tree ControlNodes differ, refer to the following table:
21+
To understand how the three ControlNodes differ, refer to the following table:
2222

2323

2424
| Type of ControlNode | Child returns FAILURE | Child returns RUNNING |
@@ -74,11 +74,11 @@ This node is particularly useful to continuously check Conditions; but
7474
the user should also be careful when using asynchronous children, to be
7575
sure that thy are not ticked more often that expected.
7676

77-
Let's take a look to another example:
77+
Let's take a look at another example:
7878

7979
![ReactiveSequence](images/ReactiveSequence.png)
8080

81-
`ApproachEnemy` is an __asynchronous__ action that m return RUNNING until
81+
`ApproachEnemy` is an __asynchronous__ action that returns RUNNING until
8282
it is, eventually, completed.
8383

8484
The condition `isEnemyVisible` will be called many times and,
@@ -107,8 +107,8 @@ if it becomes false (i,e, "FAILURE"), `ApproachEnemy` is halted.
107107

108108
## SequenceStar
109109

110-
Use this ControlNode when you don't want to tick again children that
111-
return SUCCESS already
110+
Use this ControlNode when you don't want to tick children again that
111+
already returned SUCCESS.
112112

113113
__Example__:
114114

docs/tutorial_02_basic_ports.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ of the Tree.
2727

2828
An "entry" of the Blackboard is a __key/value pair__.
2929

30-
Inputs ports can read an entry in the Blackboard, whilst an Output port
30+
Input ports can read an entry in the Blackboard, whilst an Output port
3131
can write into an entry.
3232

3333
Let's suppose that we want to create an ActionNode called `SaySomething`,
3434
that should print a given string on `std::cout`.
3535

36-
Such string will be passed using an input port called `message`.
36+
Such a string will be passed using an input port called `message`.
3737

3838
Consider these alternative XML syntaxes:
3939

@@ -48,7 +48,7 @@ The attribute `message` in the __first node__ means:
4848

4949
The message is read from the XML file, therefore it can not change at run-time.
5050

51-
The syntax of the __second node__, instead, means:
51+
The syntax of the __second node__ instead means:
5252

5353
"Read the current value in the entry of the blackboard called 'greetings' ".
5454

@@ -124,7 +124,7 @@ check the validity of the returned value and to decide what to do:
124124
An input port pointing to the entry of the blackboard will be valid only
125125
if another node have already wrritten "something" inside that same entry.
126126

127-
`ThinkWhatToSay` is an example of Node that uses a __output port__ to writes a
127+
`ThinkWhatToSay` is an example of Node that uses an __output port__ to write a
128128
string into an entry.
129129

130130
```C++
@@ -151,7 +151,7 @@ class ThinkWhatToSay : public SyncActionNode
151151
};
152152
```
153153
154-
Alternatively, most of the times for debugging purposes, it is possible to write a
154+
Alternatively, most of the time for debugging purposes, it is possible to write a
155155
static value into an entry using the built-in Actions called `SetBlackboard`.
156156
157157
```XML

docs/tutorial_03_generic_ports.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ In the previous tutorials we introduced input and output ports, where the
44
type of the port itself was a `std::string`.
55

66
This is the easiest port type to deal with, because any parameter passed
7-
from the XML definition will be (obviosly) a string.
7+
from the XML definition will be (obviously) a string.
88

99
Next, we will describe how to use any generic C++ type in your code.
1010

@@ -13,7 +13,7 @@ Next, we will describe how to use any generic C++ type in your code.
1313
__BehaviorTree.CPP__ supports automatic conversion of strings into common
1414
types, such as `int`, `long`, `double`, `bool`, `NodeStatus`, etc.
1515

16-
But user defined types can be supported easily. For instance:
16+
But user defined types can be supported easily as well. For instance:
1717

1818
```C++
1919
// We want to be able to use this custom type
@@ -69,7 +69,7 @@ About the previous code:
6969
## Example
7070
7171
Similarly to the previous tutorial, we can create two custom Actions,
72-
one will writes into a port and the other will reads from a port.
72+
one will write into a port and the other will read from a port.
7373
7474
7575
```C++
@@ -123,7 +123,7 @@ public:
123123
};
124124
```
125125

126-
We can now connect input/output ports as usual, pointing at the same
126+
We can now connect input/output ports as usual, pointing to the same
127127
entry of the Blackboard.
128128

129129
The tree in the next example is a Sequence of 4 actions

docs/tutorial_04_sequence_star.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ Expected output:
140140
Robot says: "mission completed!"
141141
```
142142

143-
You may noticed that when `executeTick()` was called, `MoveBase` returned
143+
You may have noticed that when `executeTick()` was called, `MoveBase` returned
144144
__RUNNING__ the 1st and 2nd time, and eventually __SUCCESS__ the 3rd time.
145145

146146
`BatteryOK` is executed only once.
147147

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

151-
If, at any point, `BatteryOK` returned __FAILURE__, the `MoveBase` actions
151+
If, at any point, `BatteryOK` returned __FAILURE__, the `MoveBase` action
152152
would be _interrupted_ (_halted_, to be specific).
153153

154154
```XML hl_lines="3"

docs/tutorial_05_subtrees.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Composition of Behaviors with Subtree
22

3-
We can build large scale behavior composing togheter smaller and reusable
3+
We can build large scale behavior composing together smaller and reusable
44
behaviors into larger ones.
55

66
In other words, we want to create __hierarchical__ behavior trees.
@@ -57,7 +57,7 @@ The desired behavior is:
5757

5858
## Loggers
5959

60-
On the C++ side we don't need to do anything to build reusable subtree.
60+
On the C++ side we don't need to do anything to build reusable subtrees.
6161

6262
Therefore we take this opportunity to introduce another neat feature of
6363
_BehaviorTree.CPP_ : __Loggers__.

docs/tutorial_06_subtree_ports.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ remapping is done entirely in the XML definition.
1414

1515
## Example
1616

17-
Le't consider this Beahavior Tree.
17+
Let's consider this Beahavior Tree.
1818

1919
```XML hl_lines="8 9"
2020
<root main_tree_to_execute = "MainTree">
@@ -49,7 +49,7 @@ Le't consider this Beahavior Tree.
4949

5050
You may notice that:
5151

52-
- We have a `MainTree` that include a suntree called `MoveRobot`.
52+
- We have a `MainTree` that includes a subtree called `MoveRobot`.
5353
- We want to "connect" (i.e. "remap") ports inside the `MoveRobot` subtree
5454
with other ports in the `MainTree`.
5555
- This is done using the XMl tag __<remap>__, where the words __internal/external__
@@ -64,7 +64,7 @@ respective blackboard, not the relationship in terms of Behavior Trees.
6464
![ports remapping](images/t06_remapping.png)
6565

6666
In terms of C++, we don't need to do much. For debugging purpose, we may show some
67-
information about the current state of a blackaboard with the method `debugMessage()`.
67+
information about the current state of a blackboard with the method `debugMessage()`.
6868

6969
```C++
7070
int main()

docs/tutorial_08_additional_args.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ constructor with the following signature
1111
In same cases, it is desirable to pass to the constructor of our class
1212
additional arguments, parameters, pointers, references, etc.
1313
14-
We will just use with the word _"parameter"_ for the rest of the tutorial.
14+
We will just use the word _"parameter"_ for the rest of the tutorial.
1515
16-
Even if, theoretically, this parameters can be passed using Input Ports,
16+
Even if, theoretically, these parameters can be passed using Input Ports,
1717
that would be the wrong way to do it if:
1818
1919
- The parameters are know at _deployment-time_.
@@ -24,7 +24,7 @@ If all these conditions are met, using ports is just cumbersome and highly disco
2424
2525
## The C++ example
2626
27-
Next, we can see two alternatice ways to pass parameters to a class:
27+
Next, we can see two alternative ways to pass parameters to a class:
2828
either as arguments of the constructor of the class or in an `init()` method.
2929
3030
```C++

0 commit comments

Comments
 (0)