Skip to content

Commit

Permalink
Update planning/autoware_path_generator/src/utils.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: Mitsuhiro Sakamoto <50359861+mitukou1109@users.noreply.github.com>
  • Loading branch information
sasakisasaki and mitukou1109 authored Mar 10, 2025
1 parent 05885f7 commit f83965b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions planning/autoware_path_generator/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,7 @@ std::optional<lanelet::ConstLanelets> extract_lanelets_from_path(
int64_t lane_id = path_point.lane_ids.at(0);
lanelet::ConstLanelet lanelet = planner_data.lanelet_map_ptr->laneletLayer.get(lane_id);

const bool is_unique =
std::find(refined_path_lanelets.begin(), refined_path_lanelets.end(), lanelet) ==
refined_path_lanelets.end();

if (is_unique) {
if (!exists(refined_path_lanelets, lanelet)) {
refined_path_lanelets.push_back(lanelet);
}
} catch (const std::out_of_range & e) {
Expand Down

0 comments on commit f83965b

Please sign in to comment.