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

feat(lanelet2_extension): overwriteLaneletsCenterline supports "waypoints" #252

Merged
merged 10 commits into from
Jun 17, 2024

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Jun 13, 2024

Description

The Autoware's usage of the centerline has several limitations.
By introducing a waypoints flag in the overwriteLaneletsCenterline function to handle the centerline, the limitations are solved.

Please see the document in this PR in detail.

NOTE: This PR includes the fix for clang-tidy in the lanelet2_extension_python package.

Tests performed

Unit test

Effects on system behavior

Nothing

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 marked this pull request as ready for review June 13, 2024 14:42
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
tmp/lanelet2_extension_python/src/utility.cpp Outdated Show resolved Hide resolved
@takayuki5168 takayuki5168 changed the title feat(lanelet2_extension): centerline is converted to waypoints feat(lanelet2_extension): overwriteLaneletsCenterline supports "waypoints" Jun 13, 2024
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
tmp/lanelet2_extension/lib/utilities.cpp Outdated Show resolved Hide resolved
Comment on lines 512 to 519
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned that the function start to exceed what it was originally designed for.
Is it necessary to move the customized center line to waypoints at runtime?

/**
 * @brief  Apply a patch for centerline because the original implementation
 * doesn't have enough quality
 */

@@ -501,12 +501,28 @@ lanelet::ConstLanelets getExpandedLanelets(
}

void overwriteLaneletsCenterline(
lanelet::LaneletMapPtr lanelet_map, const double resolution, const bool force_overwrite)
lanelet::LaneletMapPtr lanelet_map, const double resolution, const bool use_waypoints,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a comment, since the third argument of the function has changed it's meaning, we should make sure that any other code that uses force_overwrite argument should be merged at the same time as this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@takayuki5168 Have you checked if the codes in autoware.universe and autoware_tools are fine with the modification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review.
Yes, I've already checked. The following PR is the change for the universe.
https://github.com/autowarefoundation/autoware.universe/pull/7480/files

takayuki5168 and others added 2 commits June 17, 2024 12:22
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 merged commit dba6de4 into main Jun 17, 2024
14 of 15 checks passed
@takayuki5168 takayuki5168 deleted the feat/centerline-by-waypoints branch June 17, 2024 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants