Skip to content

Commit

Permalink
Merge branch 'ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance-st…
Browse files Browse the repository at this point in the history
…ep-2' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-route
  • Loading branch information
TauTheLepton authored Jan 31, 2025
2 parents 408e632 + 078605d commit 2c1a29e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions simulation/traffic_simulator/src/lanelet_wrapper/lanelet_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,7 @@ auto centerPoints(const lanelet::Ids & lanelet_ids) -> std::vector<Point>
const auto & points = centerPoints(lanelet_id);
center_points.insert(center_points.end(), points.begin(), points.end());
}
std::sort(
center_points.begin(), center_points.end(), [](const Point & lhs, const Point & rhs) -> bool {
if (lhs.x < rhs.x) {
return true;
} else if (lhs.x == rhs.x && lhs.y < rhs.y) {
return true;
} else if (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z < rhs.z) {
return true;
} else {
return false;
}
});
/// @note We intentionally do not sort here, because only consecutive duplicates are supposed to be removed
center_points.erase(
std::unique(center_points.begin(), center_points.end()), center_points.end());
return center_points;
Expand Down

0 comments on commit 2c1a29e

Please sign in to comment.