Skip to content
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

feat(path_generator): add path cut feature #216

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

kosuke55
Copy link
Contributor

@kosuke55 kosuke55 commented Feb 24, 2025

Description

based on
mitukou1109#2, fix for latest main branch ( thanks @mitukou1109

This PR adds a feature to cut the path before the self-intersection to avoid incorrect neighbor search.

1 ) not cut if no self intersection

image

2 )
cut if self intersection

image

not cut after passing self intersection point

image

Related links

Parent Issue:

  • Link

How was this PR tested?

Psim

Screencast.from.2025.02.07.15.33.28.webm

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Feb 24, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kosuke55 kosuke55 force-pushed the feat/path_generator_path_cut branch from 977fa26 to 5315013 Compare February 24, 2025 04:43
@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 24, 2025
std::optional<double> get_first_self_intersection_arc_length(
const lanelet::BasicLineString2d & line_string, const double s_start, const double s_end)
{
const auto tree = lanelet::geometry::internal::makeIndexedSegmenTree(line_string);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kosuke55
Copy link
Contributor Author

( until porting autoware_test_utils to core we can not add unit test )

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (4cb18f5) to head (828f56a).
Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
planning/autoware_path_generator/src/utils.cpp 0.00% 20 Missing ⚠️
planning/autoware_path_generator/src/node.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #216       +/-   ##
==========================================
- Coverage   78.75%   0.00%   -78.76%     
==========================================
  Files          11      86       +75     
  Lines         193    8587     +8394     
  Branches       73     863      +790     
==========================================
- Hits          152       0      -152     
- Misses         11    8587     +8576     
+ Partials       30       0       -30     
Flag Coverage Δ
differential 0.00% <0.00%> (?)
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kosuke55 kosuke55 force-pushed the feat/path_generator_path_cut branch from 5315013 to b9dd1c4 Compare February 25, 2025 05:50
@kosuke55
Copy link
Contributor Author

this PR has lanelet2 typo
fzi-forschungszentrum-informatik/Lanelet2#388

@kosuke55 kosuke55 force-pushed the feat/path_generator_path_cut branch from b9dd1c4 to 143364e Compare February 25, 2025 06:00
* @return longitudinal distance of self-intersecting point (std::nullopt if no
* self-intersection)
*/
std::optional<double> get_first_self_intersection_arc_length(

Choose a reason for hiding this comment

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

Please update the README.
If time does not allow, it's acceptable to create another PR after this PR is merged.

@kosuke55
Copy link
Contributor Author

fix invalid link error of ci #221

mitukou1109 and others added 3 commits February 26, 2025 16:33
add path_generator package

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

fix spell check error

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

include necessary headers

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

change package version to 0.0.0

Co-authored-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

fix include guard name

Co-authored-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

replace flowchart uml with pre-generated image

Co-authored-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

style(pre-commit): autofix

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

replace tier4_planning_msgs with autoware_internal_planning_msgs

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

style(pre-commit): autofix

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

use LaneletSequence instead of ConstLanelets

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

set orientation to path points

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

crop path bound to fit trajectory

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

offset path bound

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

no need to make return value optional

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

address deprecation warning

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

add doxygen comments

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

support multiple previous/next lanelets

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

fix path bound cut issue

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

group parameters

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

add path cut feature

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

ensure s_end is not negative

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

simplify return value selection

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>

add doxygen comments

Signed-off-by: mitukou1109 <mitukou1109@gmail.com>
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
@kosuke55 kosuke55 force-pushed the feat/path_generator_path_cut branch from fda6f36 to 828f56a Compare February 26, 2025 07:33
@kosuke55 kosuke55 merged commit e633a67 into autowarefoundation:main Feb 26, 2025
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants