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

HdMapUtils refactor (PR 2/6) - extend lanelet_wrapper: add ::distance and necessary parts of ::route, ::lanelet_map, ::traffic_lights #1478

Draft
wants to merge 18 commits into
base: ref/RJD-1387-hdmap-utils-to-lanelet-wrapper-pose
Choose a base branch
from

Conversation

dmoszynski
Copy link
Contributor

@dmoszynski dmoszynski commented Dec 5, 2024

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:

These static methods are used by the sub-namespaces of lanelet_wrapper.
lanelet_wrapper namespace consist of 6 sub-namespaces:

As a result of the merge of this PR 2/6, the namespaces lanelet_wrapper::lanelet_map, lanelet_wrapper::distance, lanelet_wrapper::route and lanelet_wrapper::traffic_lights were added to the project. But most importantly, the ::distance from utils 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 in lanelet_wrapper and only the strictly necessary parts of route and traffic_lights are developed.

Important

By moving from HdMapUtils, we mean moving the entire member function to lanelet_wrapper - making it a free function.
This is accessible to traffic_simulator through free functions in utils 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 the get 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::getLateralDistancelanelet_wrapper::distance::lateralDistance

Old name New name
HdMapUtils::getLateralDistance distance::lateralDistancelanelet_wrapper::distance::lateralDistance
HdMapUtils::getLongitudinalDistance distance::longitudinalDistancelanelet_wrapper::distance::longitudinalDistance
HdMapUtils::getDistanceToStopLine distance::distanceToStopLinelanelet_wrapper::distance::distanceToStopLine
HdMapUtils::getDistanceToTrafficLightStopLine distance::distanceToTrafficLightStopLinelanelet_wrapper::distance::distanceToTrafficLightStopLine
HdMapUtils::getDistanceToCrosswalk distance::distanceToCrosswalklanelet_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::routelanelet_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

dmoszynski and others added 13 commits December 5, 2024 13:10
…ecessary parts of ::route, ::lanelet_map, ::traffic_lights
…): use ::distance from lanelet_wrapper instead of hdmap_utils
…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 dmoszynski self-assigned this Dec 10, 2024
@dmoszynski 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
dmoszynski and others added 5 commits December 11, 2024 17:33
…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]>
@TauTheLepton TauTheLepton self-assigned this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants