Skip to content

Commit 3e716f8

Browse files
committed
Forgotten linting issues
Signed-off-by: silanus23 <[email protected]>
1 parent da44134 commit 3e716f8

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

nav2_controller/include/nav2_controller/controller_server.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class ControllerServer : public nav2::LifecycleNode
244244
std::unique_ptr<nav2_util::TwistPublisher> vel_publisher_;
245245
nav2::Subscription<nav2_msgs::msg::SpeedLimit>::SharedPtr speed_limit_sub_;
246246
rclcpp::Publisher<nav2_msgs::msg::TrackingError>::SharedPtr tracking_error_pub_;
247-
247+
248248
// Progress Checker Plugin
249249
pluginlib::ClassLoader<nav2_core::ProgressChecker> progress_checker_loader_;
250250
ProgressCheckerMap progress_checkers_;
@@ -276,8 +276,8 @@ class ControllerServer : public nav2::LifecycleNode
276276
double min_x_velocity_threshold_;
277277
double min_y_velocity_threshold_;
278278
double min_theta_velocity_threshold_;
279-
double search_window_ ;
280-
int start_index_ ;
279+
double search_window_;
280+
int start_index_;
281281

282282
double failure_tolerance_;
283283
bool use_realtime_priority_;

nav2_controller/src/controller_server.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -609,18 +609,17 @@ void ControllerServer::setPlannerPath(const nav_msgs::msg::Path & path)
609609
throw nav2_core::InvalidPath("Path is empty.");
610610
}
611611
controllers_[current_controller_]->setPlan(path);
612-
612+
613613
end_pose_ = path.poses.back();
614614
end_pose_.header.frame_id = path.header.frame_id;
615615
goal_checkers_[current_goal_checker_]->reset();
616-
616+
617617
RCLCPP_DEBUG(
618618
get_logger(), "Path end point is (%.2f, %.2f)",
619619
end_pose_.pose.position.x, end_pose_.pose.position.y);
620-
620+
621621
start_index_ = 0;
622622
current_path_ = path;
623-
624623
}
625624

626625
void ControllerServer::computeAndPublishVelocity()
@@ -770,16 +769,18 @@ void ControllerServer::publishTrackingState()
770769
return;
771770
}
772771

773-
const double distance_to_goal = nav2_util::geometry_utils::euclidean_distance(robot_pose, end_pose_);
774-
const auto path_search_result = nav2_util::distance_from_path(current_path_, robot_pose.pose, start_index_, search_window_);
772+
const double distance_to_goal = nav2_util::geometry_utils::euclidean_distance(robot_pose,
773+
end_pose_);
774+
const auto path_search_result = nav2_util::distance_from_path(current_path_, robot_pose.pose,
775+
start_index_, search_window_);
775776
const size_t closest_idx = path_search_result.closest_segment_index;
776777
start_index_ = closest_idx;
777778

778-
const auto& segment_start = current_path_.poses[closest_idx];
779-
const auto& segment_end = current_path_.poses[closest_idx + 1];
780-
779+
const auto & segment_start = current_path_.poses[closest_idx];
780+
const auto & segment_end = current_path_.poses[closest_idx + 1];
781+
781782
double cross_product = nav2_util::geometry_utils::cross_product_2d(
782-
robot_pose.pose.position, segment_start.pose,segment_end.pose);
783+
robot_pose.pose.position, segment_start.pose, segment_end.pose);
783784

784785
nav2_msgs::msg::TrackingError tracking_error_msg;
785786
tracking_error_msg.header.stamp = now();

nav2_util/include/nav2_util/geometry_utils.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ inline double distance_to_segment(
229229
}
230230

231231
/**
232-
* @brief Computes the 2D cross product between the vector from start to end and the vector from start to point.
233-
* The sign of this calculation's result can be used to determine which side are you on of the track.
234-
*
232+
* @brief Computes the 2D cross product between the vector from start to end and the vector from start to point.
233+
* The sign of this calculation's result can be used to determine which side are you on of the track.
234+
*
235235
* See: https://en.wikipedia.org/wiki/Cross_product
236-
*
236+
*
237237
* @param point The point to check relative to the segment.
238238
* @param start The starting pose of the segment.
239239
* @param end The ending pose of the segment.

0 commit comments

Comments
 (0)