Skip to content

Commit 6765458

Browse files
committed
fix get_first_self_intersection_arc_length idx
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
1 parent dbc2d3a commit 6765458

File tree

1 file changed

+1
-1
lines changed
  • planning/autoware_path_generator/src

1 file changed

+1
-1
lines changed

planning/autoware_path_generator/src/utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ std::optional<double> get_first_self_intersection_arc_length(
399399
double s = 0.;
400400

401401
for (size_t i = 1; i < line_string.size() - 1; ++i) {
402-
if (first_self_intersection_long && i == first_self_intersection_long->idx) {
402+
if (first_self_intersection_long && i == first_self_intersection_long->idx + 1) {
403403
return s + first_self_intersection_long->s;
404404
}
405405
s += lanelet::geometry::distance2d(line_string.at(i - 1), line_string.at(i));

0 commit comments

Comments
 (0)