-
Notifications
You must be signed in to change notification settings - Fork 60
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
HdMapUtils refactor (PR 2/6) - extend lanelet_wrapper: add ::distance and necessary parts of ::route, ::lanelet_map, ::traffic_lights #1478
Draft
dmoszynski
wants to merge
18
commits into
ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose
Choose a base branch
from
ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
base: ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ecessary parts of ::route, ::lanelet_map, ::traffic_lights
…): use ::distance from lanelet_wrapper instead of hdmap_utils
…arated parts, adapt hdmap_utils tests
…ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…let-wrapper-pose' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…let-wrapper-pose' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
dmoszynski
changed the title
HdMapUtils refactor (PR 2/X) - extend lanelet_wrapper: add ::distance and necessary parts of ::route, ::lanelet_map, ::traffic_lights
HdMapUtils refactor (PR 2/6) - extend lanelet_wrapper: add ::distance and necessary parts of ::route, ::lanelet_map, ::traffic_lights
Dec 11, 2024
…ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…let-wrapper-pose' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance
…let-wrapper-pose' into ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-distance Signed-off-by: Mateusz Palczuk <[email protected]>
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Abstract
This is the second PR of 6 related to the
HdMapUtils
refactor (for the first one, see #1472).For a full overview of changes that all 6 PRs will introduce, please see the Abstract of the first PR.
Background
The
lanelet_wrapper
namespace contains:LaneletLoader
LaneletWrapper
RouteCache
,CenterPointsCache
,LaneletLengthCache
TrafficRulesWithRoutingGraph
These static methods are used by the sub-namespaces of
lanelet_wrapper
.lanelet_wrapper
namespace consist of 6 sub-namespaces:lanelet_wrapper::lanelet_map
,lanelet_wrapper::pose
,lanelet_wrapper::distance
,lanelet_wrapper::route
,lanelet_wrapper::lane_change
,lanelet_wrapper::traffic_lights
.As a result of the merge of this PR 2/6, the namespaces
lanelet_wrapper::lanelet_map
,lanelet_wrapper::distance
,lanelet_wrapper::route
andlanelet_wrapper::traffic_lights
were added to the project. But most importantly, the::distance
fromutils
is adapted for its use.In addition to this, PR is making several other improvements to the code, see below for details.
Details
The
distance
namespace inlanelet_wrapper
and only the strictly necessary parts ofroute
andtraffic_lights
are developed.Important
By moving from
HdMapUtils
, we mean moving the entire member function tolanelet_wrapper
- making it a free function.This is accessible to
traffic_simulator
through free functions inutils
namespace.Before these changes the structure looked like this:
<HdMapUtils member function name>
After the changes structure looks like this:
<utils namespace and function name>
→<lanelet_wrapper namespace and function name>
Below is the list of moved function (member functions transformed to free functions)
Tip
Most functions that have been removed from
HdMapUtils
have been renamed in such a way that theget
prefix has been removed and thus the first letter of the new function name has been made lower case.Example of such name change can be the following
HdMapUtils::getLateralDistance
→lanelet_wrapper::distance::lateralDistance
HdMapUtils::getLateralDistance
distance::lateralDistance
→lanelet_wrapper::distance::lateralDistance
HdMapUtils::getLongitudinalDistance
distance::longitudinalDistance
→lanelet_wrapper::distance::longitudinalDistance
HdMapUtils::getDistanceToStopLine
distance::distanceToStopLine
→lanelet_wrapper::distance::distanceToStopLine
HdMapUtils::getDistanceToTrafficLightStopLine
distance::distanceToTrafficLightStopLine
→lanelet_wrapper::distance::distanceToTrafficLightStopLine
HdMapUtils::getDistanceToCrosswalk
distance::distanceToCrosswalk
→lanelet_wrapper::distance::distanceToCrosswalk
HdMapUtils::getLeftBound
lanelet_wrapper::lanelet_map::leftBound
HdMapUtils::getRightBound
lanelet_wrapper::lanelet_map::rightBound
HdMapUtils::getLaneletPolygon
lanelet_wrapper::lanelet_map::laneletPolygon
HdMapUtils::getStopLinePolygon
lanelet_wrapper::lanelet_map::stopLinePolygon
HdMapUtils::toPolygon
lanelet_wrapper::lanelet_map::toPolygon
HdMapUtils::getRightOfWayLaneletIds
lanelet_wrapper::lanelet_map::rightOfWayLaneletIds
HdMapUtils::getTrafficSignRegulatoryElementsOnPath
lanelet_wrapper::lanelet_map::trafficSignsOnPath
HdMapUtils::getStopLinesOnPath
lanelet_wrapper::lanelet_map::stopLinesOnPath
HdMapUtils::getStopLineIdsOnPath
lanelet_wrapper::lanelet_map::stopLineIdsOnPath
HdMapUtils::getRoute
route::route
→lanelet_wrapper::route::route
HdMapUtils::getTrafficLightStopLinesPoints
lanelet_wrapper::traffic_lights::trafficLightStopLinesPoints
HdMapUtils::getTrafficLightIdsOnPath
lanelet_wrapper::traffic_lights::trafficLightStopLinesPoints
HdMapUtils::getTrafficLights
lanelet_wrapper::traffic_lights::toAutowareTrafficLights
HdMapUtils::getTrafficLightRegulatoryElementsOnPath
lanelet_wrapper::traffic_lights::autowareTrafficLightsOnPath
References
Destructive Changes
Known Limitations