Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kosuke55 committed Dec 27, 2023
1 parent 1829ee4 commit 28db8ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions planning/behavior_path_goal_planner_module/src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ bool checkOriginalGoalIsInShoulder(const std::shared_ptr<RouteHandler> & route_h
double calcLateralDeviationBetweenPaths(
const PathWithLaneId & reference_path, const PathWithLaneId & target_path)
{
double lateral_deviation = std::numeric_limits<double>::max();
double lateral_deviation = 0.0;
for (const auto & target_point : target_path.points) {
const size_t nearest_index =
motion_utils::findNearestIndex(reference_path.points, target_point.point.pose.position);
lateral_deviation = std::min(
lateral_deviation = std::max(
lateral_deviation,
std::abs(tier4_autoware_utils::calcLateralDeviation(
reference_path.points[nearest_index].point.pose, target_point.point.pose.position)));
Expand Down

0 comments on commit 28db8ed

Please sign in to comment.