Skip to content

Commit 0181a1f

Browse files
authored
bugfix: typo in code (BehaviorTree#460)
Those fixes should not affect actual use.
1 parent 4189c72 commit 0181a1f

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

include/behaviortree_cpp/controls/manual_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ManualSelectorNode : public ControlNode
4343
int running_child_idx_;
4444
int previously_executed_idx_;
4545

46-
enum NumericarStatus
46+
enum NumericalStatus
4747
{
4848
NUM_SUCCESS = 253,
4949
NUM_FAILURE = 254,

include/behaviortree_cpp/controls/parallel_node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class ParallelNode : public ControlNode
4747
static PortsList providedPorts()
4848
{
4949
return {InputPort<int>(THRESHOLD_SUCCESS, -1,
50-
"number of childen which need to succeed to trigger a "
50+
"number of children which need to succeed to trigger a "
5151
"SUCCESS"),
5252
InputPort<int>(THRESHOLD_FAILURE, 1,
53-
"number of childen which need to fail to trigger a FAILURE")};
53+
"number of children which need to fail to trigger a FAILURE")};
5454
}
5555

5656
~ParallelNode() override = default;

include/behaviortree_cpp/decorators/repeat_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RepeatNode : public DecoratorNode
4343

4444
static PortsList providedPorts()
4545
{
46-
return {InputPort<int>(NUM_CYCLES, "Repeat a succesful child up to N times. "
46+
return {InputPort<int>(NUM_CYCLES, "Repeat a successful child up to N times. "
4747
"Use -1 to create an infinite loop.")};
4848
}
4949

src/bt_factory.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ std::unique_ptr<TreeNode> BehaviorTreeFactory::instantiateTreeNode(
261261
node->setRegistrationID(ID);
262262
node->config_.enums = scripting_enums_;
263263

264-
auto AssignConditions = [](auto& conditions, auto& excutors) {
264+
auto AssignConditions = [](auto& conditions, auto& executors) {
265265
for (const auto& [cond_id, script] : conditions)
266266
{
267267
if (auto executor = ParseScript(script))
268268
{
269-
excutors[size_t(cond_id)] = executor.value();
269+
executors[size_t(cond_id)] = executor.value();
270270
}
271271
else
272272
{

src/controls/manual_node.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ NodeStatus ManualSelectorNode::selectStatus() const
9191
win = newwin(6, 70, 1, 1); // create a new window
9292

9393
mvwprintw(win, 0, 0, "No children.");
94-
mvwprintw(win, 1, 0, "Press: S to return SUCCESFULL,");
94+
mvwprintw(win, 1, 0, "Press: S to return SUCCESSFUL,");
9595
mvwprintw(win, 2, 0, " F to return FAILURE, or");
9696
mvwprintw(win, 3, 0, " R to return RUNNING.");
9797

@@ -152,7 +152,7 @@ uint8_t ManualSelectorNode::selectChild() const
152152
win = newwin(children_count + 6, 70, 1, 1); // create a new window
153153

154154
mvwprintw(win, 0, 0, "Use UP/DOWN arrow to select the child, Enter to confirm.");
155-
mvwprintw(win, 1, 0, "Press: S to skip and return SUCCESFULL,");
155+
mvwprintw(win, 1, 0, "Press: S to skip and return SUCCESSFUL,");
156156
mvwprintw(win, 2, 0, " F to skip and return FAILURE, or");
157157
mvwprintw(win, 3, 0, " R to skip and return RUNNING.");
158158

src/controls/parallel_node.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ NodeStatus ParallelNode::tick()
5252
}
5353
}
5454

55-
size_t success_childred_num = 0;
56-
size_t failure_childred_num = 0;
55+
size_t success_children_num = 0;
56+
size_t failure_children_num = 0;
5757

5858
const size_t children_count = children_nodes_.size();
5959

@@ -88,9 +88,9 @@ NodeStatus ParallelNode::tick()
8888
{
8989
case NodeStatus::SUCCESS: {
9090
skip_list_.insert(i);
91-
success_childred_num++;
91+
success_children_num++;
9292

93-
if (success_childred_num == successThreshold())
93+
if (success_children_num == successThreshold())
9494
{
9595
skip_list_.clear();
9696
haltChildren();
@@ -101,12 +101,12 @@ NodeStatus ParallelNode::tick()
101101

102102
case NodeStatus::FAILURE: {
103103
skip_list_.insert(i);
104-
failure_childred_num++;
104+
failure_children_num++;
105105

106106
// It fails if it is not possible to succeed anymore or if
107107
// number of failures are equal to failure_threshold_
108-
if ((failure_childred_num > children_count - successThreshold()) ||
109-
(failure_childred_num == failureThreshold()))
108+
if ((failure_children_num > children_count - successThreshold()) ||
109+
(failure_children_num == failureThreshold()))
110110
{
111111
skip_list_.clear();
112112
haltChildren();

tests/gtest_ports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ TEST(PortTest, Descriptions)
6262
</Sequence>
6363
</BehaviorTree>
6464
65-
<BehaviorTree ID="SubTree" _description="this is a subtre" >
65+
<BehaviorTree ID="SubTree" _description="this is a subtree" >
6666
<NodeWithPorts name="third" in_port_B="99" />
6767
</BehaviorTree>
6868

0 commit comments

Comments
 (0)