Skip to content

Commit d90135e

Browse files
Fixed a silly spelling error
Signed-off-by: Joseph Duchesne <josephgeek@gmail.com>
1 parent 524ab92 commit d90135e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

nav2_controller/include/nav2_controller/plugins/path_complete_goal_checker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class PathCompleteGoalChecker : public SimpleGoalChecker
6969

7070
protected:
7171
// threshold for path goal
72-
int path_length_tolerence_;
72+
int path_length_tolerance_;
7373

7474
/**
7575
* @brief Callback executed when a paramter change is detected

nav2_controller/plugins/path_complete_goal_checker.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace nav2_controller
4343
{
4444

4545
PathCompleteGoalChecker::PathCompleteGoalChecker()
46-
: SimpleGoalChecker(), path_length_tolerence_(1)
46+
: SimpleGoalChecker(), path_length_tolerance_(1)
4747
{
4848
}
4949

@@ -58,10 +58,10 @@ void PathCompleteGoalChecker::initialize(
5858

5959
nav2_util::declare_parameter_if_not_declared(
6060
node,
61-
plugin_name + ".path_length_tolerence",
62-
rclcpp::ParameterValue(path_length_tolerence_));
61+
plugin_name + ".path_length_tolerance",
62+
rclcpp::ParameterValue(path_length_tolerance_));
6363

64-
node->get_parameter(plugin_name + ".path_length_tolerence", path_length_tolerence_);
64+
node->get_parameter(plugin_name + ".path_length_tolerance", path_length_tolerance_);
6565

6666
// Replace SimpleGoalChecker's callback for dynamic parameters
6767
node->remove_on_set_parameters_callback(dyn_params_handler_.get());
@@ -78,9 +78,9 @@ bool PathCompleteGoalChecker::isGoalReached(
7878
const geometry_msgs::msg::Pose & query_pose, const geometry_msgs::msg::Pose & goal_pose,
7979
const geometry_msgs::msg::Twist & twist, const nav_msgs::msg::Path & path)
8080
{
81-
// return false if more than path_length_tolerence_ waypoints exist
81+
// return false if more than path_length_tolerance_ waypoints exist
8282
// note: another useful version of this could check path length
83-
if (path.poses.size() > (unsigned int)path_length_tolerence_) {
83+
if (path.poses.size() > (unsigned int)path_length_tolerance_) {
8484
return false;
8585
}
8686
// otherwise defer to SimpleGoalChecker's isGoalReached
@@ -98,8 +98,8 @@ PathCompleteGoalChecker::dynamicParametersCallback(std::vector<rclcpp::Parameter
9898
const auto & name = parameter.get_name();
9999

100100
if (type == ParameterType::PARAMETER_INTEGER) {
101-
if (name == plugin_name_ + ".path_length_tolerence") {
102-
path_length_tolerence_ = parameter.as_int();
101+
if (name == plugin_name_ + ".path_length_tolerance") {
102+
path_length_tolerance_ = parameter.as_int();
103103
}
104104
}
105105
}

nav2_controller/plugins/test/goal_checker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ TEST(PathCompleteGoalChecker, test_goal_checking)
216216
checkMacro(pcgc, 0, 0, 0, 0, 0, 0, 0, 0, 1, path, true);
217217

218218
// add a second default constructed pose to the path
219-
// this should prevent any completions due to path_length_tolerence=1
219+
// this should prevent any completions due to path_length_tolerance=1
220220
path.poses.emplace_back();
221221

222222
checkMacro(pcgc, 0, 0, 0, 0, 0, 0, 0, 0, 0, path, false);
@@ -339,7 +339,7 @@ TEST(PathCompleteGoalChecker, get_tol_and_dynamic_params)
339339
auto results = rec_param->set_parameters_atomically(
340340
{rclcpp::Parameter("test3.xy_goal_tolerance", 200.0),
341341
rclcpp::Parameter("test3.yaw_goal_tolerance", 200.0),
342-
rclcpp::Parameter("test3.path_length_tolerence", 3),
342+
rclcpp::Parameter("test3.path_length_tolerance", 3),
343343
rclcpp::Parameter("test3.stateful", true)});
344344

345345
rclcpp::spin_until_future_complete(
@@ -348,7 +348,7 @@ TEST(PathCompleteGoalChecker, get_tol_and_dynamic_params)
348348

349349
EXPECT_EQ(x->get_parameter("test3.xy_goal_tolerance").as_double(), 200.0);
350350
EXPECT_EQ(x->get_parameter("test3.yaw_goal_tolerance").as_double(), 200.0);
351-
EXPECT_EQ(x->get_parameter("test3.path_length_tolerence").as_int(), 3);
351+
EXPECT_EQ(x->get_parameter("test3.path_length_tolerance").as_int(), 3);
352352
EXPECT_EQ(x->get_parameter("test3.stateful").as_bool(), true);
353353

354354
// Test the dynamic parameters impacted the tolerances

0 commit comments

Comments
 (0)