21.0.0
Description
Abstract
This PR contains refactoring of HdMapUtils with the goal of moving functionality from this class to free functions.
Background
This is a part of #1479
See that PR for more background on why these changes are made.
Details
All changes are listed in the points below.
1
ActionNode::getDistanceToTargetEntity member function has been replaced with distance::splineDistanceToBoundingBox function.
The functionality is not changed, some surrounding changes had to be made in order to achieve this separation:
- Added
getAltitudeRangemember function to all spline classes.- It returns lowest and highest altitude if given spline
- Added
lanelet_wrapper::pose::isAltitudeWithinRangefunction- It checks whether the given altitude is within a given range
This change necessitated changing several places where ActionNode::getDistanceToTargetEntity was used before.
2
ActionNode::getOtherEntitiesCanonicalizedEntityStatuses member function has been added.
It returns Canonicalized entity statuses of all other entities.
3
Fixed mistakes where local variables and function arguments used a _ suffix, which is a convention for member variables.
This mistake was introduced when renaming member variables in this commit.
4
Added check whether entity is in lanelet in ActionNode::getFrontEntityName.
This condition should be checked, because searching for entity in front is done on the lanelets.
5
Added check whether entity is in lanenet in ActionNode::getDistanceToConflictingEntity.
This condition should be checked, because searching for conflicting entity is done on the lanelets.
6
HdMapUtils::getAltitude was removed, because it was not used, and the functionality is in the traffic simulator utils.
7
Moved implementation of conflicting IDs functions from HdMapUtils to lanelet_wrapper::lanelet_map namespace.
The HdMapUtils forwarding member functions will be removed in the future.
HdMapUtils::getConflictingCrosswalkIds=>lanelet_wrapper::lanelet_map::conflictingCrosswalkIdsHdMapUtils::getConflictingLaneIds=>lanelet_wrapper::lanelet_map::conflictingLaneIds
8
lanelet_wrapper::pose::isAltitudeMatching has been renamed to lanelet_wrapper::pose::isAltitudeWithinThreshold.
This change makes it clear that a threshold is being used and to make it in line with lanelet_wrapper::pose::isAltitudeWithinRange naming.
The threshold altitude_threshold has been moved to header as global constant ALTITUDE_THRESHOLD to use it in both isAltitudeWithinThreshold and isAltitudeWithinRange.
References
Description of #1479 and Abstract of #1472 for better overview of the changes.
Destructive Changes
Some functions have been renamed, as explained in Details, but the codebase has been adjusted.
Known Limitations
None