-
Notifications
You must be signed in to change notification settings - Fork 102
feat(autoware_lanelet2_utils): create artificial lanelet object #669
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(autoware_lanelet2_utils): create artificial lanelet object #669
Conversation
Signed-off-by: Sarun Mukdapitak <[email protected]>
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Signed-off-by: Sarun Mukdapitak <[email protected]>
Signed-off-by: Sarun Mukdapitak <[email protected]>
…and their tests Signed-off-by: Sarun Mukdapitak <[email protected]>
Signed-off-by: Sarun Mukdapitak <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #669 +/- ##
==========================================
+ Coverage 51.06% 54.38% +3.31%
==========================================
Files 325 327 +2
Lines 21444 25101 +3657
Branches 9316 11794 +2478
==========================================
+ Hits 10950 13650 +2700
- Misses 9540 10305 +765
- Partials 954 1146 +192
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Sarun Mukdapitak <[email protected]>
* @return ConstLanelet | ||
*/ | ||
|
||
std::optional<lanelet::ConstLanelet> create_const_lanelet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overload is not necessary (Because we shoud avoid usage of non-const Point3d)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
Since both BasicPoint3d
and ConstPoint3d
need to be converted into LineString3d
before converting into ConstLanelet
, I decided to implement overload for Point3d
(because there is only Point3d
constructor for LineString3d
).
When I remove this overload, the last part of remaining types will be duplicate.
If you have any suggestion on how to shortcut from BasicPoint3d
to ConstLanelet
, please let me know.
const std::vector<lanelet::Point3d> & left_points, | ||
const std::vector<lanelet::Point3d> & right_points); | ||
|
||
std::optional<lanelet::ConstLanelet> create_const_lanelet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename to
- create_safe_linestring
- create_safe_lanelet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
I also remove 3d
from the function name for create_basic_linestring3d
-> create_basic_linestring
.
common/autoware_lanelet2_utils/include/autoware/lanelet2_utils/conversion.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Sarun Mukdapitak <[email protected]>
Signed-off-by: Sarun Mukdapitak <[email protected]>
Signed-off-by: Sarun Mukdapitak <[email protected]>
Signed-off-by: Sarun Mukdapitak <[email protected]>
common/autoware_lanelet2_utils/include/autoware/lanelet2_utils/conversion.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Sarun Mukdapitak <[email protected]>
…_safe_lanelet Signed-off-by: Sarun Mukdapitak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have read all the changed parts. I agree with merging this PR 👍
Description
This PR is to implement functions to create artificial lanelet object including
lanelet::BasicLineString3d
orlanelet::ConstLineString3d
fromlanelet::BasicPoint3d
orlanelet::ConstPoint3d
lanelet::ConstLanelet
fromright_points
andleft_points
lanelet::ConstLanelet lanelet{}
,lanelet::ConstLineString3d line{}
; is happening.remove_const
function.Related links
Default initialization of
lanelet::ConstLanelet
,lanelet::ConstLineString3d
andlanelet::BasicLineString3d
lanelet::ConstLanelet
autoware_core
common - autoware_lanelet2_utils/test/lanelet_sequence.cpp:53-55 (test)
planning - autoware_route_handler/route_handler.cpp:2159
autoware_universe
Planning -> behavior_path_planner
Perception
autoware_lanelet2_extension
lanelet::ConstLineString3d
- doesn't existlanelet::BasicLineString3d
autoware_universe
Planning
Parent Issue:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.