scenario_simulator_v2 C++ API
Classes | Functions
test_hdmap_utils.cpp File Reference
#include <geometry_msgs/msg/point.h>
#include <gtest/gtest.h>
#include <ament_index_cpp/get_package_share_directory.hpp>
#include <geometry/quaternion/euler_to_quaternion.hpp>
#include <string>
#include <traffic_simulator/hdmap_utils/hdmap_utils.hpp>
#include <traffic_simulator/helper/helper.hpp>
#include "../expect_eq_macros.hpp"
#include "../helper_functions.hpp"
Include dependency graph for test_hdmap_utils.cpp:

Classes

class  HdMapUtilsTest_StandardMap
 
class  HdMapUtilsTest_WithRoadShoulderMap
 
class  HdMapUtilsTest_EmptyMap
 
class  HdMapUtilsTest_FourTrackHighwayMap
 
class  HdMapUtilsTest_CrossroadsWithStoplinesMap
 

Functions

int main (int argc, char **argv)
 
 TEST (HdMapUtils, Construct)
 
 TEST (HdMapUtils, Construct_invalid)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapBin)
 
 TEST_F (HdMapUtilsTest_StandardMap, matchToLane)
 
 TEST_F (HdMapUtilsTest_StandardMap, matchToLane_includeCrosswalk)
 
 TEST_F (HdMapUtilsTest_StandardMap, matchToLane_noMatch)
 
 TEST_F (HdMapUtilsTest_StandardMap, AlongLaneletPose_insideDistance)
 
 TEST_F (HdMapUtilsTest_StandardMap, AlongLaneletPose_outsideDistance)
 
 TEST_F (HdMapUtilsTest_StandardMap, AlongLaneletPose_negativeDistance)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, AlongLaneletPose_afterLast)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, AlongLaneletPose_beforeFirst)
 
 TEST_F (HdMapUtilsTest_StandardMap, CanonicalizeNegative)
 
 TEST_F (HdMapUtilsTest_StandardMap, CanonicalizePositive)
 
 TEST_F (HdMapUtilsTest_StandardMap, Canonicalize)
 
 TEST_F (HdMapUtilsTest_StandardMap, CanonicalizeAllNegative)
 
 TEST_F (HdMapUtilsTest_StandardMap, CanonicalizeAllPositive)
 
 TEST_F (HdMapUtilsTest_StandardMap, CanonicalizeAll)
 
 TEST_F (HdMapUtilsTest_StandardMap, filterLaneletIds_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, filterLaneletIds_emptyIds)
 
 TEST_F (HdMapUtilsTest_StandardMap, filterLaneletIds_invalidSubtype)
 
 TEST_F (HdMapUtilsTest_StandardMap, filterLaneletIds_invalidIds)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNearbyLaneletIds)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNearbyLaneletIds_unsuccessful)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNearbyLaneletIds_crosswalkUnsuccessful)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCollisionPointInLaneCoordinate_intersects)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCollisionPointInLaneCoordinate_disjoint)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCollisionPointInLaneCoordinate_invalidLanelet)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCollisionPointInLaneCoordinate_invalidCrosswalkLanelet)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_negativeOffset)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_reverse)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_notOnLanelet)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, toLaneletPose_boundingBoxMatchPrevious)
 
 TEST_F (HdMapUtilsTest_StandardMap, getSpeedLimit_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, getSpeedLimit_crosswalk)
 
 TEST_F (HdMapUtilsTest_StandardMap, getSpeedLimit_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, getClosestLaneletId_near)
 
 TEST_F (HdMapUtilsTest_StandardMap, getClosestLaneletId_away)
 
 TEST_F (HdMapUtilsTest_StandardMap, getClosestLaneletId_crosswalkCloserButExcluded)
 
 TEST_F (HdMapUtilsTest_StandardMap, getClosestLaneletId_onlyCrosswalkNearButExcluded)
 
 TEST_F (HdMapUtilsTest_EmptyMap, getClosestLaneletId_emptyMap)
 
 TEST_F (HdMapUtilsTest_StandardMap, getPreviousLaneletIds)
 
 TEST_F (HdMapUtilsTest_WithRoadShoulderMap, getPreviousLaneletIds_RoadShoulder)
 
 TEST_F (HdMapUtilsTest_StandardMap, getPreviousLaneletIds_multiplePrevious)
 
 TEST_F (HdMapUtilsTest_StandardMap, getPreviousLaneletIds_direction)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNextLaneletIds)
 
 TEST_F (HdMapUtilsTest_WithRoadShoulderMap, getNextLaneletIds_RoadShoulder)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNextLaneletIds_multipleNext)
 
 TEST_F (HdMapUtilsTest_StandardMap, getNextLaneletIds_direction)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInRoute_onRoute)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInRoute_notOnRoute)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInRoute_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInLanelet_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInLanelet_after)
 
 TEST_F (HdMapUtilsTest_StandardMap, isInLanelet_before)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPoints_correctPoints)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPoints_negativeS)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPoints_sLargerThanLaneletLength)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPoints_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPose_onlyOffset)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPose_additionalRotation)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPose_negativeS)
 
 TEST_F (HdMapUtilsTest_StandardMap, toMapPose_sLargerThanLaneletLength)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_straight)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_leftNoChangeable)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_leftChangeable)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_rightNoChangeable)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_rightChangeable)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_shift2LeftPossible)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_shift2LeftNotPossible)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_shift2RightPossible)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_shift2RightNotPossible)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLaneChangeableLaneletId_shift0)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightIds_correct)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getTrafficLightIds_noTrafficLight)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightBulbPosition_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightBulbPosition_invalidTrafficLight)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingLaneIds_conflicting)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingLaneIds_notConflicting)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingLaneIds_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingCrosswalkIds_conflicting)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingCrosswalkIds_notConflictingWithCrosswalk)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingCrosswalkIds_notConflicting)
 
 TEST_F (HdMapUtilsTest_StandardMap, getConflictingCrosswalkIds_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, clipTrajectoryFromLaneletIds_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, clipTrajectoryFromLaneletIds_startNotOnTrajectory)
 
 TEST_F (HdMapUtilsTest_StandardMap, clipTrajectoryFromLaneletIds_emptyTrajectory)
 
 TEST_F (HdMapUtilsTest_StandardMap, clipTrajectoryFromLaneletIds_smallForwardDistance)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_straightAfter)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_curveAfter)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getFollowingLanelets_notEnoughLaneletsAfter)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidateTrajectory)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidateTrajectoryNotEnough)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidatesDoNotMatch)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidateTrajectoryEmpty)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, canChangeLane_canChange)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, canChangeLane_canNotChange)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, canChangeLane_invalidLaneletId)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLateralDistance_sameLane)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLateralDistance_parallelLanesCanNotChange)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLateralDistance_parallelLanesCanChange)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLateralDistance_notConnected)
 
 TEST_F (HdMapUtilsTest_StandardMap, getRoute_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, getRoute_correctCache)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getRoute_impossibleRouting)
 
 TEST_F (HdMapUtilsTest_StandardMap, getRoute_circular)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCenterPoints_correct)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCenterPoints_correctCache)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCenterPoints_correctVector)
 
 TEST_F (HdMapUtilsTest_StandardMap, getCenterPoints_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLight_trafficLight)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLight_notTrafficLight)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLight_invalidId)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLightRegulatoryElement_trafficLightRegulatoryElement)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLightRegulatoryElement_noTrafficLightRegulatoryElement)
 
 TEST_F (HdMapUtilsTest_StandardMap, isTrafficLightRegulatoryElement_invalidId)
 
 TEST_F (HdMapUtilsTest_StandardMap, getLaneletLength_simple)
 
 TEST_F (HdMapUtilsTest_StandardMap, getLaneletLength_cache)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightIdsOnPath_noTrafficLights)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightIdsOnPath_trafficLights)
 
 TEST_F (HdMapUtilsTest_StandardMap, getTrafficLightIdsOnPath_empty)
 
 TEST_F (HdMapUtilsTest_StandardMap, getLongitudinalDistance_sameLanelet)
 
 TEST_F (HdMapUtilsTest_StandardMap, getLongitudinalDistance_sameLaneletBehind)
 
 TEST_F (HdMapUtilsTest_StandardMap, getLongitudinalDistance_differentLanelet)
 
 TEST_F (HdMapUtilsTest_FourTrackHighwayMap, getLongitudinalDistance_differentLaneletNoRoute)
 
 TEST_F (HdMapUtilsTest_StandardMap, getStopLineIdsOnPath_noStopLines)
 
 TEST_F (HdMapUtilsTest_StandardMap, getStopLineIdsOnPath_someStopLines)
 
 TEST_F (HdMapUtilsTest_StandardMap, getStopLineIdsOnPath_empty)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLineIds_stopLine)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLineIds_severalStopLines)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLineIds_invalidTrafficLightId)
 
void sortStoplines (std::vector< std::vector< geometry_msgs::msg::Point >> &stoplines)
 
void compareStoplines (const std::vector< std::vector< geometry_msgs::msg::Point >> &a, const std::vector< std::vector< geometry_msgs::msg::Point >> &b)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLinesPoints_stopLine)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLinesPoints_severalStopLines)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getTrafficLightStopLinesPoints_invalidTrafficLightId)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getStopLinePolygon_stopLine)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getStopLinePolygon_invalidLaneletId)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_trafficLightOnSpline)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_noTrafficLightOnSpline)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_trafficLightOnWaypoints)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_noTrafficLightOnWaypoints)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_emptyVector_waypoints)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithTrafficLightsOnSpline)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithNoTrafficLightsOnSplineCongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithTrafficLightsNotOnSplineIncongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_emptyVector_splineRoute)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithTrafficLightsOnWaypoints)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithNoTrafficLightsOnWaypointsIncongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_routeWithTrafficLightsNotOnWaypointsCongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToTrafficLightStopLine_emptyVector_waypointsRoute)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_stopLineOnSpline)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_noStopLineOnSplineCongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_noStopLineOnSplineIncongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_emptyVector_spline)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_stopLineOnWaypoints)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_noStopLineOnWaypointsCongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_noStopLineOnWaypointsIncongruent)
 
 TEST_F (HdMapUtilsTest_CrossroadsWithStoplinesMap, getDistanceToStopLine_emptyVector_waypoints)
 

Function Documentation

◆ compareStoplines()

void compareStoplines ( const std::vector< std::vector< geometry_msgs::msg::Point >> &  a,
const std::vector< std::vector< geometry_msgs::msg::Point >> &  b 
)

◆ main()

int main ( int  argc,
char **  argv 
)

◆ sortStoplines()

void sortStoplines ( std::vector< std::vector< geometry_msgs::msg::Point >> &  stoplines)

◆ TEST() [1/2]

TEST ( HdMapUtils  ,
Construct   
)
Note
Test basic functionality. Test initialization correctness with a correct path to a lanelet map.

◆ TEST() [2/2]

TEST ( HdMapUtils  ,
Construct_invalid   
)
Note
Test basic functionality. Test initialization correctness with an invalid path to a lanelet map.

◆ TEST_F() [1/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_emptyVector_spline   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [2/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_emptyVector_waypoints   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [3/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_noStopLineOnSplineCongruent   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a spline and a route that is coherent with the spline and does not have a stop line on it.

◆ TEST_F() [4/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_noStopLineOnSplineIncongruent   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a spline and a route that is not coherent with the spline and has a stop line on it
  • the goal is to test the situation where the stop line is checked against a spline that does not overlay with it.

◆ TEST_F() [5/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_noStopLineOnWaypointsCongruent   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a road (waypoints) and a route that is coherent with the road and does not have a stop line on it.

◆ TEST_F() [6/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_noStopLineOnWaypointsIncongruent   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a road (waypoints) and a route that is not coherent with the road and has a stop line on it - the goal is to test the situation where the stop line is checked against a road that does not overlay with it.

◆ TEST_F() [7/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_stopLineOnSpline   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a spline and a route that is coherent with the spline and has a stop line on it.

◆ TEST_F() [8/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToStopLine_stopLineOnWaypoints   
)
Note
Test basic functionality. Test distance to stop line calculation correctness with a road (waypoints) and a route that is coherent with the road and has a stop line on it.

◆ TEST_F() [9/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_emptyVector_splineRoute   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [10/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_emptyVector_waypoints   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [11/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_emptyVector_waypointsRoute   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [12/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_noTrafficLightOnSpline   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a spline and a traffic light id that does not have a stop line on the spline.

◆ TEST_F() [13/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_noTrafficLightOnWaypoints   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a road (waypoints) and a traffic light id that does not have a stop line on the road.

◆ TEST_F() [14/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithNoTrafficLightsOnSplineCongruent   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a spline and a route that is coherent with the spline and does not have a traffic light on it.

◆ TEST_F() [15/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithNoTrafficLightsOnWaypointsIncongruent   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a road (waypoints) and a route that is not coherent with the road and has a traffic light on it - the goal is to test the situation where the traffic light and its stop line are checked against a road that does not overlay with them.

◆ TEST_F() [16/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithTrafficLightsNotOnSplineIncongruent   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a spline and a route that is not coherent with the spline and has a traffic light on it
  • the goal is to test the situation where the traffic light and its stop line are checked against a spline that does not overlay with them.

◆ TEST_F() [17/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithTrafficLightsNotOnWaypointsCongruent   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a road (waypoints) and a route that is coherent with the road and does not have a traffic light on it.

◆ TEST_F() [18/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithTrafficLightsOnSpline   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a spline and a route that is coherent with the spline and has a traffic light on it.

◆ TEST_F() [19/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_routeWithTrafficLightsOnWaypoints   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a road (waypoints) and a route that is coherent with the road and has a traffic light on it.

◆ TEST_F() [20/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_trafficLightOnSpline   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a spline and a traffic light id that has a stop line on the spline.

◆ TEST_F() [21/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getDistanceToTrafficLightStopLine_trafficLightOnWaypoints   
)
Note
Test basic functionality. Test distance to traffic light stop line obtaining correctness with a road (waypoints) and a traffic light id has a stop line on the road.

◆ TEST_F() [22/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getStopLinePolygon_invalidLaneletId   
)
Note
Test function behavior with an invalid lanelet id.

◆ TEST_F() [23/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getStopLinePolygon_stopLine   
)
Note
Test basic functionality. Test stop line polygon obtaining correctness with a lanelet that has a stop line.

◆ TEST_F() [24/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLineIds_invalidTrafficLightId   
)
Note
Test function behavior when passed an invalid traffic light id.

◆ TEST_F() [25/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLineIds_severalStopLines   
)
Note
Test basic functionality. Test obtaining traffic light stop line ids correctness with a traffic light that has several stop lines
  • the goal is to test the scenario where one traffic light has multiple stop lines (e.g. on a road with two parallel lanes with the same direction).

◆ TEST_F() [26/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLineIds_stopLine   
)
Note
Test basic functionality. Test obtaining traffic light stop line ids correctness with a traffic light that has one stop line.

◆ TEST_F() [27/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLinesPoints_invalidTrafficLightId   
)
Note
Test function behavior when passed an invalid traffic light id.

◆ TEST_F() [28/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLinesPoints_severalStopLines   
)
Note
Test basic functionality. Test obtaining traffic light stop line points correctness with a traffic light id that has multiple traffic light stop lines.

◆ TEST_F() [29/156]

TEST_F ( HdMapUtilsTest_CrossroadsWithStoplinesMap  ,
getTrafficLightStopLinesPoints_stopLine   
)
Note
Test basic functionality. Test obtaining traffic light stop line points correctness with a traffic light id that has only one traffic light stop line.

◆ TEST_F() [30/156]

TEST_F ( HdMapUtilsTest_EmptyMap  ,
getClosestLaneletId_emptyMap   
)
Note
Test function behavior when the map contains no lanelets - the goal is to test the branch when findNearest does not find anything and returns an empty vector.

◆ TEST_F() [31/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
AlongLaneletPose_afterLast   
)
Note
Test function behavior when passed a sufficiently large along distance and the last lanelet on the map as start - the goal is to test the situation when desired pose is outside the lanelet map.

◆ TEST_F() [32/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
AlongLaneletPose_beforeFirst   
)
Note
Test function behavior when passed a negative along distance and first lanelet on the map as start - the goal is to test the situation when desired pose is outside the lanelet map.

◆ TEST_F() [33/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
canChangeLane_canChange   
)
Note
Test basic functionality. Test lane change possibility checking correctness with lanelets that can be changed.

◆ TEST_F() [34/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
canChangeLane_canNotChange   
)
Note
Test basic functionality. Test lane change possibility checking correctness with lanelets that can not be changed (e.g. goal lanelet is behind the start lanelet).

◆ TEST_F() [35/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
canChangeLane_invalidLaneletId   
)
Note
Test function behavior when either of the lanelet ids is invalid.

◆ TEST_F() [36/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getFollowingLanelets_notEnoughLaneletsAfter   
)
Note
Test basic functionality. Test following lanelets obtaining with a lanelet that has lanelets after it for less than specified in the distance parameter
  • the goal is for the function to return trajectory shorter than distance specified.

◆ TEST_F() [37/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_leftChangeable   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has changeable lanelets (left direction) and direction = LEFT.

◆ TEST_F() [38/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_leftNoChangeable   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has no changeable lanelets and direction = LEFT.

◆ TEST_F() [39/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_rightChangeable   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has changeable lanelets (right direction) and direction = RIGHT.

◆ TEST_F() [40/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_rightNoChangeable   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has no changeable lanelets and direction = RIGHT.

◆ TEST_F() [41/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_shift0   
)
Note
Test function behavior when called with a direction = RIGHT and shift = 0.

◆ TEST_F() [42/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_shift2LeftNotPossible   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has 1 changeable lane to the left, direction = LEFT and shift = 2
  • the goal is to test the branch where we expect lanelet id for shifting 2 times left, but shifting 2 lanes is not possible.

◆ TEST_F() [43/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_shift2LeftPossible   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has at least two changeable lanes to the left, direction = LEFT and shift = 2.

◆ TEST_F() [44/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_shift2RightNotPossible   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has 1 changeable lane to the right, direction = RIGHT and shift = 2 - the goal is to test the branch where we expect lanelet id for shifting 2 times right, but shifting 2 lanes is not possible.

◆ TEST_F() [45/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_shift2RightPossible   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has at least two changeable lanes to the right, direction = RIGHT and shift = 2.

◆ TEST_F() [46/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLaneChangeableLaneletId_straight   
)
Note
Test basic functionality. Test changeable lanelets id obtaining with a lanelet that has no changeable lanelets and direction = STRAIGHT.

◆ TEST_F() [47/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLateralDistance_notConnected   
)
Note
Test basic functionality. Test lateral distance calculation correctness with two poses on lanelets that are not connected - the goal is to test the scenario when the distance cannot be calculated because two positions will never be able to come in contact.

◆ TEST_F() [48/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLateralDistance_parallelLanesCanChange   
)
Note
Test basic functionality. Test lateral distance calculation correctness with two lanelet poses on parallel lanes with a possibility of changing the lane.

◆ TEST_F() [49/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLateralDistance_parallelLanesCanNotChange   
)
Note
Test basic functionality. Test lateral distance calculation correctness with two lanelet poses on parallel lanes with no possibility of changing the lane.

◆ TEST_F() [50/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLateralDistance_sameLane   
)
Note
Test basic functionality. Test lateral distance calculation correctness with two lanelet poses on the same lanelet but with different offsets.

◆ TEST_F() [51/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getLongitudinalDistance_differentLaneletNoRoute   
)
Note
Test basic functionality. Test longitudinal distance calculation correctness with two poses on different lanelets where the goal pose is on lanelet unreachable from the start pose lanelet - the goal is to test the branch of execution where no route is found.

◆ TEST_F() [52/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getRoute_impossibleRouting   
)
Note
Test basic functionality. Test route obtaining correctness with the beginning and ending that are impossible to route between.

◆ TEST_F() [53/156]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
getTrafficLightIds_noTrafficLight   
)
Note
Test function behavior when there are no traffic lights on the map.

◆ TEST_F() [54/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
AlongLaneletPose_insideDistance   
)
Note
Test basic functionality. Test along lanelet pose obtaining with a distance along the lanelet less than the lanelet length - so the along pose is still the same lanelet.

◆ TEST_F() [55/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
AlongLaneletPose_negativeDistance   
)
Note
Test basic functionality. Test along lanelet pose obtaining with a negative distance along the lanelet and start from the beginning of one lanelet - the goal is to test the situation when the previous lanelet is returned.

◆ TEST_F() [56/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
AlongLaneletPose_outsideDistance   
)
Note
Test basic functionality. Test along lanelet pose obtaining with a distance along the lanelet more than the lanelet length - the goal is to test the situation when the next lanelet is returned.

◆ TEST_F() [57/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
Canonicalize   
)
Note
Testcase for lanelet pose canonicalization when s in range [0,length_of_the_lanelet] Canonicalized lanelet pose of (id=34981, s=2) is suppose to be the same.

◆ TEST_F() [58/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
CanonicalizeAll   
)
Note
Testcase for getAllCanonicalizedLaneletPoses() function when s in range [0,length_of_the_lanelet] Canonicalized lanelet pose of (id=34981, s=2) is supposed to be the same.

◆ TEST_F() [59/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
CanonicalizeAllNegative   
)
Note
Test lanelet pose vector obtaining correctness when s < 0. Function should find correct lanelet ids and canonicalize lanelet pose even when s < 0. Following lanelets: 34576 -> 34570 -> 34564 34981 -> 34636 -> 34564 34600 -> 34648 -> 34564 Canonicalized lanelet pose of (id=34564, s=-22) is suppose to be (id=34575, s=-22 + length of 34570 + length of 34576) (id=34981, s=-22 + length of 34636 + length of 34981) (id=34600, s=-22 + length of 34648 + length of 34600)

◆ TEST_F() [60/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
CanonicalizeAllPositive   
)
Note
Test lanelet pose vector obtaining correctness when s is larger than lanelet length. Function should find correct lanelet ids and canonicalize lanelet pose for s larger than lanelet length. Following lanelets: 34981 -> 34585 -> 34579 34981 -> 34636 -> 34564 34981 -> 34651 -> 34630 Canonicalized lanelet pose of (id=34981, s=30) is suppose to be (id=34579, s=30 - length of 34585 - length of 34981) (id=34564, s=30 - length of 34636 - length of 34981) (id=34630, s=30 - length of 34651 - length of 34981)

◆ TEST_F() [61/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
CanonicalizeNegative   
)
Note
Test lanelet pose obtaining correctness when s < 0. Function should find correct lanelet id and canonicalize lanelet pose even when s < 0. Following lanelets: 34576 -> 34570 -> 34564 Canonicalized lanelet pose of (id=34564, s=-22) is suppose to be (id=34576, s=-22 + length of 34570 + length of 34576)

◆ TEST_F() [62/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
CanonicalizePositive   
)
Note
Test lanelet pose obtaining correctness when s is larger than lanelet length. Function should find correct lanelet id and canonicalize lanelet pose for s larger than lanelet length. Following lanelets: 34981 -> 34585 -> 34579 Canonicalized lanelet pose of (id=34981, s=30) is suppose to be (id=34579, s=30 - length of 34585 - length of 34981)

◆ TEST_F() [63/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
clipTrajectoryFromLaneletIds_correct   
)
Note
Test basic functionality. Test clipping trajectory correctness with a correct vector of lanelets and the reference lanelet also correct and reasonable forward distance.

◆ TEST_F() [64/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
clipTrajectoryFromLaneletIds_emptyTrajectory   
)
Note
Test function behavior when passed an empty trajectory vector.

◆ TEST_F() [65/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
clipTrajectoryFromLaneletIds_smallForwardDistance   
)
Note
Test basic functionality. Test clipping trajectory correctness with a correct vector of lanelets, and the reference lanelet also correct and forward distance fairly small (e.g. 2).

◆ TEST_F() [66/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
clipTrajectoryFromLaneletIds_startNotOnTrajectory   
)
Note
Test basic functionality. Test clipping trajectory correctness with a correct vector of lanelets and the reference lanelet not on the trajectory and reasonable forward distance.

◆ TEST_F() [67/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
filterLaneletIds_correct   
)
Note
Test basic functionality. Test filtering correctness with some lanelet ids and a valid subtype name.

◆ TEST_F() [68/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
filterLaneletIds_emptyIds   
)
Note
Test function behavior when passed an empty lanelet ids vector.

◆ TEST_F() [69/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
filterLaneletIds_invalidIds   
)
Note
Test function behavior when passed a vector of invalid lanelet ids.

◆ TEST_F() [70/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
filterLaneletIds_invalidSubtype   
)
Note
Test function behavior when passed an invalid subtype name.

◆ TEST_F() [71/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCenterPoints_correct   
)
Note
Test basic functionality with a lanelet that has a centerline with 3 or more points.

◆ TEST_F() [72/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCenterPoints_correctCache   
)
Note
Test basic functionality with a lanelet that has a centerline with 3 or more points and call the function 2 times
  • the goal is to test whether the centerline cache works correctly.

◆ TEST_F() [73/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCenterPoints_correctVector   
)
Note
Test basic functionality with a vector containing valid lanelets.

◆ TEST_F() [74/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCenterPoints_empty   
)
Note
Test basic functionality with an empty lanelet vector.

◆ TEST_F() [75/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getClosestLaneletId_away   
)
Note
Test basic functionality. Test obtaining closest lanelet id with a pose far from the road lanelet (further than the distance_threshold).

◆ TEST_F() [76/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getClosestLaneletId_crosswalkCloserButExcluded   
)
Note
Test basic functionality. Test obtaining closest lanelet id with a pose near the crosswalk lanelet (closer than the distance_threshold) and include_crosswalk = false and road lanelet further than crosswalk, but closer than distance_threshold
  • the goal is to test whether the function returns road lanelet, when the crosswalk is closer, but should not be included.

◆ TEST_F() [77/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getClosestLaneletId_near   
)
Note
Test basic functionality. Test obtaining closest lanelet id with a pose near the road lanelet (closer than the distance_threshold).

◆ TEST_F() [78/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getClosestLaneletId_onlyCrosswalkNearButExcluded   
)
Note
Test basic functionality. Test obtaining closest lanelet id with a pose near the crosswalk lanelet (closer than the distance_threshold) and include_crosswalk = false and road lanelet further than crosswalk and further away than distance_threshold
  • the goal is to test scenario when the only lanelet in the considered distance is crosswalk, but should not be included.

◆ TEST_F() [79/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCollisionPointInLaneCoordinate_disjoint   
)
Note
Test basic functionality. Test collision point calculations correctness with ids of a road and a crosswalk that do not intersect.

◆ TEST_F() [80/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCollisionPointInLaneCoordinate_intersects   
)
Note
Test basic functionality. Test collision point calculations correctness with ids of a road and a crosswalk that do intersect.

◆ TEST_F() [81/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCollisionPointInLaneCoordinate_invalidCrosswalkLanelet   
)
Note
Test function behavior when called with an id of non existing crosswalk lanelet.

◆ TEST_F() [82/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getCollisionPointInLaneCoordinate_invalidLanelet   
)
Note
Test function behavior when called with an id of non existing lanelet.

◆ TEST_F() [83/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingCrosswalkIds_conflicting   
)
Note
Test basic functionality. Test obtaining conflicting crosswalk lanelets correctness with lanelets that do conflict with crosswalk lanelets.

◆ TEST_F() [84/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingCrosswalkIds_empty   
)
Note
Test function behavior when called with an empty vector.

◆ TEST_F() [85/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingCrosswalkIds_notConflicting   
)
Note
Test basic functionality. Test obtaining conflicting crosswalk lanelets correctness with lanelets that do not conflict with any other lanelets.

◆ TEST_F() [86/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingCrosswalkIds_notConflictingWithCrosswalk   
)
Note
Test basic functionality. Test obtaining conflicting crosswalk lanelets correctness with lanelets that do not conflict with any crosswalk lanelets, but do conflict with vehicle lanelets.

◆ TEST_F() [87/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingLaneIds_conflicting   
)
Note
Test basic functionality. Test obtaining conflicting lanelets correctness with lanelets that do conflict with other lanelets.

◆ TEST_F() [88/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingLaneIds_empty   
)
Note
Test function behavior when called with an empty vector.

◆ TEST_F() [89/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getConflictingLaneIds_notConflicting   
)
Note
Test basic functionality. Test obtaining conflicting lanelets correctness with lanelets that do not conflict with any other lanelets.

◆ TEST_F() [90/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_candidatesDoNotMatch   
)
Note
Test function behavior when called with a candidate trajectory that does not contain the starting lanelet.

◆ TEST_F() [91/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_candidateTrajectory   
)
Note
Test basic functionality. Test following lanelets obtaining with a candidate trajectory longer than the given distance.

◆ TEST_F() [92/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_candidateTrajectoryEmpty   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [93/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_candidateTrajectoryNotEnough   
)
Note
Test basic functionality. Test following lanelets obtaining with a candidate trajectory shorter than the given distance
  • the goal is to test generating lacking part of the trajectory.

◆ TEST_F() [94/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_curveAfter   
)
Note
Test basic functionality. Test following lanelets obtaining with a lanelet that has lanelets after it longer than parameter distance, but the following lanelets go through a curve (e.g there was an order to go right earlier on the lane).

◆ TEST_F() [95/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_straightAfter   
)
Note
Test basic functionality. Test following lanelets obtaining with a lanelet that has lanelets after it longer than parameter distance.

◆ TEST_F() [96/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getLaneletLength_cache   
)
Note
Test basic functionality. Test lanelet length obtaining with some lanelet id two times (the same lanelet id) - the goal is to test lanelet length caching correctness.

◆ TEST_F() [97/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getLaneletLength_simple   
)
Note
Test basic functionality. Test lanelet length obtaining with some lanelet id.

◆ TEST_F() [98/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getLongitudinalDistance_differentLanelet   
)
Note
Test basic functionality. Test longitudinal distance calculation correctness with two poses on different lanelets that are a few lanelets apart (e.g. 3).

◆ TEST_F() [99/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getLongitudinalDistance_sameLanelet   
)
Note
Test basic functionality. Test longitudinal distance calculation correctness with two poses on the same lanelet, where the goal pose is positioned in front of the start pose.

◆ TEST_F() [100/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getLongitudinalDistance_sameLaneletBehind   
)
Note
Test basic functionality. Test longitudinal distance calculation correctness with two poses on the same lanelet, where the goal pose is positioned behind the start pose.

◆ TEST_F() [101/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNearbyLaneletIds   
)
Note
Test basic functionality. Test obtaining nearest lanelet ids correctness with a position in the middle of the lane and relatively big distance threshold
  • the goal is to test successful scenario when there should be lanelets returned.

◆ TEST_F() [102/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNearbyLaneletIds_crosswalkUnsuccessful   
)
Note
Test basic functionality. Test obtaining nearest lanelet ids correctness (with a crosswalk) with a position on the side of the map and with fairly small distance threshold
  • the goal is to test unsuccessful scenario when there should be no lanelets returned.

◆ TEST_F() [103/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNearbyLaneletIds_unsuccessful   
)
Note
Test basic functionality. Test obtaining nearest lanelet ids correctness with a position on the side of the map and with fairly small distance threshold
  • the goal is to test unsuccessful scenario when there should be no lanelets returned.

◆ TEST_F() [104/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNextLaneletIds   
)
Note
Test basic functionality. Test next lanelets id obtaining correctness with a lanelet that has a lanelet following it.

◆ TEST_F() [105/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNextLaneletIds_direction   
)
Note
Test basic functionality. Test next lanelets id obtaining correctness with a lanelet that has several lanelets following it and a direction specified (e.g. right)
  • the goal is to test the function specialization that takes a direction as an argument and returns only the next lanelets that have this turn direction.

◆ TEST_F() [106/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getNextLaneletIds_multipleNext   
)
Note
Test basic functionality. Test next lanelets id obtaining correctness with a lanelet that has several lanelets following it.

◆ TEST_F() [107/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getPreviousLaneletIds   
)
Note
Test basic functionality. Test previous lanelets id obtaining correctness with a lanelet that has a lanelet preceding it.

◆ TEST_F() [108/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getPreviousLaneletIds_direction   
)
Note
Test basic functionality. Test previous lanelets id obtaining correctness with a lanelet that has several lanelets preceding it and a direction specified (e.g. right)
  • the goal is to test the function specialization that takes a direction as an argument and returns only the previous lanelets that have this turn direction.

◆ TEST_F() [109/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getPreviousLaneletIds_multiplePrevious   
)
Note
Test basic functionality. Test previous lanelets id obtaining correctness with a lanelet that has several lanelets preceding it.

◆ TEST_F() [110/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getRoute_circular   
)
Note
Test basic functionality. Test route obtaining correctness with beginning and ending of the route set to the same lanelet id.

◆ TEST_F() [111/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getRoute_correct   
)
Note
Test basic functionality. Test route obtaining correctness with a feasible route.

◆ TEST_F() [112/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getRoute_correctCache   
)
Note
Test basic functionality. Test route obtaining correctness with a feasible route and obtain it two times
  • the goal is to test whether the route cache works correctly.

◆ TEST_F() [113/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getSpeedLimit_correct   
)
Note
Test basic functionality. Test speed limit obtaining correctness with ids of lanelets that have different speed limits.

◆ TEST_F() [114/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getSpeedLimit_crosswalk   
)
Note
Test function behavior when crosswalk lanelet id is included in the vector.

◆ TEST_F() [115/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getSpeedLimit_empty   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [116/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getStopLineIdsOnPath_empty   
)
Note
Test function behavior when passed an empty vector of lanelet ids.

◆ TEST_F() [117/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getStopLineIdsOnPath_noStopLines   
)
Note
Test basic functionality. Test obtaining stop line ids correctness with a route that has no stop lines.

◆ TEST_F() [118/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getStopLineIdsOnPath_someStopLines   
)
Note
Test basic functionality. Test obtaining stop line ids correctness with a route that has a stop line.

◆ TEST_F() [119/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightBulbPosition_correct   
)
Note
Test basic functionality. Test traffic light position obtaining with a traffic light and bulb color specified.

◆ TEST_F() [120/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightBulbPosition_invalidTrafficLight   
)
Note
Test basic functionality. Test traffic light position obtaining with an id of a traffic light that does not exist
  • the goal is to test the branch when no traffic light is selected.

◆ TEST_F() [121/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightIds_correct   
)
Note
Test basic functionality. Test traffic lights id obtaining correctness.

◆ TEST_F() [122/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightIdsOnPath_empty   
)
Note
Test function behavior when passed an empty vector of lanelet ids.

◆ TEST_F() [123/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightIdsOnPath_noTrafficLights   
)
Note
Test basic functionality. Test traffic light ids obtaining correctness with a route that does not have any traffic lights.

◆ TEST_F() [124/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getTrafficLightIdsOnPath_trafficLights   
)
Note
Test basic functionality. Test traffic light ids obtaining correctness with a route that has some traffic lights.

◆ TEST_F() [125/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInLanelet_after   
)
Note
Test basic functionality. Test in lanelet presence correctness with a position that is after the given lanelet.

◆ TEST_F() [126/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInLanelet_before   
)
Note
Test basic functionality. Test in lanelet presence correctness with a position that is before the given lanelet.

◆ TEST_F() [127/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInLanelet_correct   
)
Note
Test basic functionality. Test in lanelet presence correctness with a position that is in the given lanelet.

◆ TEST_F() [128/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInRoute_empty   
)
Note
Test function behavior when an empty vector is passed.

◆ TEST_F() [129/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInRoute_notOnRoute   
)
Note
Test basic functionality. Test on route checking correctness with a route and a lanelet that is not on the route.

◆ TEST_F() [130/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isInRoute_onRoute   
)
Note
Test basic functionality. Test on route checking correctness with a route and a lanelet that is on the route.

◆ TEST_F() [131/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLight_invalidId   
)
Note
Test function behavior when called with an invalid lanelet id.

◆ TEST_F() [132/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLight_notTrafficLight   
)
Note
Test basic functionality. Test traffic light checking correctness with an id of not a traffic light.

◆ TEST_F() [133/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLight_trafficLight   
)
Note
Test basic functionality. Test traffic light checking correctness with an id of a traffic light.

◆ TEST_F() [134/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLightRegulatoryElement_invalidId   
)
Note
Test function behavior when called with an invalid lanelet id.

◆ TEST_F() [135/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLightRegulatoryElement_noTrafficLightRegulatoryElement   
)
Note
Test basic functionality. Test traffic light relation checking correctness with an id of a lanelet that does not have a relation with a traffic light.

◆ TEST_F() [136/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
isTrafficLightRegulatoryElement_trafficLightRegulatoryElement   
)
Note
Test basic functionality. Test traffic light relation checking correctness with an id of a lanelet that has a relation with a traffic light.

◆ TEST_F() [137/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
matchToLane   
)
Note
Test basic functionality. Test lanelet matching correctness with a small bounding box (1, 1) and a pose on a lanelet and without including the crosswalk.

◆ TEST_F() [138/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
matchToLane_includeCrosswalk   
)
Note
Test basic functionality. Test lanelet matching correctness with a small bounding box (1, 1) and a pose on a crosswalk lanelet and including the crosswalk.

◆ TEST_F() [139/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
matchToLane_noMatch   
)
Note
Test basic functionality. Test lanelet matching correctness with a small bounding box (1, 1) and such a pose so that no lanelets are in the distance of 1 unit
  • the goal is to test the branch where getDeterministicMatches returns nullopt and thus this function returns nullopt as well.

◆ TEST_F() [140/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_boundingBoxMatchPrevious   
)
Note
Test basic functionality. Test lanelet matching correctness with a bounding box and a pose that is:
  • exactly on the centerline of a lanelet
  • <0.9; 1) away from the next lanelet and a fairly small matching_distance (e.g. 0.5)
  • the goal is to test the branch in bounding box variant where the bounding box is matched to the next lanelet (with hardcoded max distance of 1), but the distance is more than the matching_distance. In this situation the previous lanelet has to be matched
  • so the loop over previous lanelets is executed.

◆ TEST_F() [141/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_correct   
)
Note
Test basic functionality. Test conversion to lanelet pose correctness with a point positioned on a given lanelet with the given matching distance
  • the goal is to test a regular usecase of correct conversion.

◆ TEST_F() [142/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_empty   
)
Note
test function behavior when passed an empty vector of lanelet ids (for the vector specialization).

◆ TEST_F() [143/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_negativeOffset   
)
Note
Test basic functionality. Test conversion to lanelet pose correctness with a point positioned near a given lanelet (closer than the given matching distance) and slightly behind the normal vector of the nearest point on the lanelet - the goal is to test the branch of execution where the inner product between:
  • the vector from the given pose to the nearest point on the spline and
  • the normal vector to the nearest point on the spline is negative - meaning the offset should be calculated negative

◆ TEST_F() [144/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_notOnLanelet   
)
Note
Test function behavior when passed a pose that is away from the given lanelet (over the matching distance).

◆ TEST_F() [145/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toLaneletPose_reverse   
)
Note
Test function behavior when passed a pose that is positioned on the given lanelet, but is facing the wrong direction (either parallel to the lanelet or aligned but in reverse)
  • the goal is to test the branch of execution where alignment with the lanelet is checked and if pose is nor oriented in similar direction the result is decided incorrect.

◆ TEST_F() [146/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapBin   
)
Note
Test basic functionality. Test map conversion to binary message correctness with a sample map.

◆ TEST_F() [147/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPoints_correctPoints   
)
Note
Test basic functionality. Test lanelet to map point transform correctness with a vector of several s larger than 0 but smaller than the lanelet length.

◆ TEST_F() [148/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPoints_empty   
)
Note
Test function behavior when called with an empty vector.

◆ TEST_F() [149/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPoints_negativeS   
)
Note
Test function behavior when called with a negative s.

◆ TEST_F() [150/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPoints_sLargerThanLaneletLength   
)
Note
Test function behavior when called with a value of s larger than the lanelet length.

◆ TEST_F() [151/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPose_additionalRotation   
)
Note
Test basic functionality. Test lanelet to map pose transform correctness with a position on the lanelet and additional rotation of 90 degrees
  • test the specialization taking a lanelet pose object as a parameter.

◆ TEST_F() [152/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPose_negativeS   
)
Note
Test function behavior when called with a negative s.

◆ TEST_F() [153/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPose_onlyOffset   
)
Note
Test basic functionality. Test lanelet to map pose transform correctness with a position on the lanelet and a small offset (e.g. 0.5) - test the specialization taking a lanelet id, s and an offset as parameters.

◆ TEST_F() [154/156]

TEST_F ( HdMapUtilsTest_StandardMap  ,
toMapPose_sLargerThanLaneletLength   
)
Note
Test function behavior when called with a value of s larger than the lanelet length.

◆ TEST_F() [155/156]

TEST_F ( HdMapUtilsTest_WithRoadShoulderMap  ,
getNextLaneletIds_RoadShoulder   
)
Note
Test basic functionality. Test next lanelets id obtaining correctness with a lanelet that has a lanelet following it and is a shoulder lane.

◆ TEST_F() [156/156]

TEST_F ( HdMapUtilsTest_WithRoadShoulderMap  ,
getPreviousLaneletIds_RoadShoulder   
)
Note
Test basic functionality. Test previous lanelets id obtaining correctness with a lanelet that has a lanelet preceding it and is a shoulder lane.