Skip to content

[TEST] RJD-1769 Find scenarios with custom centerline #1593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions simulation/traffic_simulator/src/hdmap_utils/hdmap_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,10 +1080,11 @@ auto HdMapUtils::generateMarker() const -> visualization_msgs::msg::MarkerArray
auto HdMapUtils::overwriteLaneletsCenterline() -> void
{
for (auto & lanelet_obj : lanelet_map_ptr_->laneletLayer) {
if (!lanelet_obj.hasCustomCenterline()) {
const auto fine_center_line = generateFineCenterline(lanelet_obj, 2.0);
lanelet_obj.setCenterline(fine_center_line);
if (lanelet_obj.hasCustomCenterline()) {
THROW_SIMULATION_ERROR("Detected custom centerline in lanelet map");
}
const auto fine_center_line = generateFineCenterline(lanelet_obj, 2.0);
lanelet_obj.setCenterline(fine_center_line);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ auto LaneletLoader::overwriteLaneletsCenterline(lanelet::LaneletMapPtr lanelet_m
}
return centerline;
};

for (auto & lanelet_obj : lanelet_map_ptr->laneletLayer) {
if (!lanelet_obj.hasCustomCenterline()) {
lanelet_obj.setCenterline(generateFineCenterline(lanelet_obj));
if (lanelet_obj.hasCustomCenterline()) {
THROW_SIMULATION_ERROR("Detected custom centerline in lanelet map");
}
lanelet_obj.setCenterline(generateFineCenterline(lanelet_obj));
}
}

Expand Down
Loading