Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Update tmp/lanelet2_extension/lib/utilities.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
  • Loading branch information
takayuki5168 and mitsudome-r authored Jun 17, 2024
1 parent 6d19fd5 commit fc7063d
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions tmp/lanelet2_extension/lib/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,21 +508,20 @@ void overwriteLaneletsCenterline(
if (force_overwrite) {
const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
} else {
if (use_waypoints) {
if (lanelet_obj.hasCustomCenterline()) {
const auto & centerline = lanelet_obj.centerline();
lanelet_obj.setAttribute("waypoints", centerline.id());
}

const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
} else {
if (!lanelet_obj.hasCustomCenterline()) {
const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
}
if (force_overwrite) {
const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
} else if (use_waypoints) {
if (lanelet_obj.hasCustomCenterline()) {
const auto & centerline = lanelet_obj.centerline();
lanelet_obj.setAttribute("waypoints", centerline.id());
}

const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
} else if (!lanelet_obj.hasCustomCenterline()) {
const auto fine_center_line = generateFineCenterline(lanelet_obj, resolution);
lanelet_obj.setCenterline(fine_center_line);
}
}
}
Expand Down

0 comments on commit fc7063d

Please sign in to comment.