From 69654ce250e79c14d45aa1a200520d827c15ce05 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Sat, 16 Sep 2023 02:32:44 +0900 Subject: [PATCH] fix segment index Signed-off-by: Takayuki Murooka --- .../utils/drivable_area_expansion/drivable_area_expansion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/behavior_path_planner/src/utils/drivable_area_expansion/drivable_area_expansion.cpp b/planning/behavior_path_planner/src/utils/drivable_area_expansion/drivable_area_expansion.cpp index ce4a5f5277a03..102ed5b8c5fd1 100644 --- a/planning/behavior_path_planner/src/utils/drivable_area_expansion/drivable_area_expansion.cpp +++ b/planning/behavior_path_planner/src/utils/drivable_area_expansion/drivable_area_expansion.cpp @@ -39,7 +39,7 @@ std::vector crop_and_resample( // crop const auto crop_seg_idx = motion_utils::findNearestSegmentIndex(points, crop_pose.position); const auto cropped_points = motion_utils::cropPoints( - points, crop_pose.position, crop_seg_idx + 1, params.max_path_arc_length, + points, crop_pose.position, crop_seg_idx, params.max_path_arc_length, params.max_path_arc_length - crop_distance); // resample PathWithLaneId cropped_path;