Skip to content

Commit e9474e4

Browse files
authored
Merge branch 'beta/v0.11.1' into visualize-curbstone-v0.11.1
2 parents 8de8ef2 + c5b6dc8 commit e9474e4

File tree

1 file changed

+13
-0
lines changed
  • planning/behavior_path_planner/src/utils

1 file changed

+13
-0
lines changed

planning/behavior_path_planner/src/utils/utils.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,8 @@ std::vector<lanelet::ConstPoint3d> getBoundWithHatchedRoadMarkings(
15861586
} else {
15871587
if (!polygon) {
15881588
will_close_polygon = true;
1589+
} else if (polygon.value().id() != current_polygon.value().id()) {
1590+
will_close_polygon = true;
15891591
} else {
15901592
current_polygon_border_indices.push_back(
15911593
get_corresponding_polygon_index(*current_polygon, bound_point.id()));
@@ -1620,6 +1622,17 @@ std::vector<lanelet::ConstPoint3d> getBoundWithHatchedRoadMarkings(
16201622
(*current_polygon)[mod(target_poly_idx, current_polygon_points_num)]);
16211623
}
16221624
}
1625+
1626+
if (polygon.has_value() && current_polygon.has_value()) {
1627+
if (polygon.value().id() != current_polygon.value().id()) {
1628+
current_polygon = polygon;
1629+
current_polygon_border_indices.clear();
1630+
current_polygon_border_indices.push_back(
1631+
get_corresponding_polygon_index(current_polygon.value(), bound_point.id()));
1632+
continue;
1633+
}
1634+
}
1635+
16231636
current_polygon = std::nullopt;
16241637
current_polygon_border_indices.clear();
16251638
}

0 commit comments

Comments
 (0)