Skip to content

Commit c7b5514

Browse files
fix distance calculation to be minimum distance
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
1 parent ef2777c commit c7b5514

File tree

1 file changed

+1
-1
lines changed
  • planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src

1 file changed

+1
-1
lines changed

planning/behavior_velocity_planner/autoware_behavior_velocity_run_out_module/src/path_utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ geometry_msgs::msg::Point findLongitudinalNearestPoint(
2626
geometry_msgs::msg::Point min_dist_point{};
2727

2828
for (const auto & p : target_points) {
29-
const float dist = autoware::motion_utils::calcSignedArcLength(points, src_point, p);
29+
const float dist = std::abs(autoware::motion_utils::calcSignedArcLength(points, src_point, p));
3030
if (dist < min_dist) {
3131
min_dist = dist;
3232
min_dist_point = p;

0 commit comments

Comments
 (0)