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
 
class  HdMapUtilsTest_KashiwanohaMap
 
class  HdMapUtilsTest_IntersectionMap
 

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_FourTrackHighwayMap, CountLaneChangesAlongRoute)
 
 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_candidateTrajectoryFalse)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidateTrajectoryNotEnough)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidatesDoNotMatch)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidateTrajectoryEmpty)
 
 TEST_F (HdMapUtilsTest_StandardMap, getFollowingLanelets_candidatesDoNotMatchRealTrajectory)
 
 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_KashiwanohaMap, getLongitudinalDistance_PullRequest1348)
 
 TEST_F (HdMapUtilsTest_IntersectionMap, getLongitudinalDistance_laneChange)
 
 TEST_F (HdMapUtilsTest_IntersectionMap, isInIntersection)
 
 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)
 
 TEST_F (HdMapUtilsTest_StandardMap, getPreviousLanelets)
 
 TEST_F (HdMapUtilsTest_WithRoadShoulderMap, routingWithRoadShoulder)
 

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/164]

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

◆ TEST_F() [2/164]

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

◆ TEST_F() [3/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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

◆ TEST_F() [10/164]

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

◆ TEST_F() [11/164]

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

◆ TEST_F() [12/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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

◆ TEST_F() [23/164]

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/164]

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

◆ TEST_F() [25/164]

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/164]

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/164]

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

◆ TEST_F() [28/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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/164]

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

◆ TEST_F() [36/164]

TEST_F ( HdMapUtilsTest_FourTrackHighwayMap  ,
CountLaneChangesAlongRoute   
)
Note
Testcase for countLaneChanges() function

◆ TEST_F() [37/164]

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() [38/164]

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() [39/164]

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() [40/164]

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() [41/164]

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() [42/164]

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

◆ TEST_F() [43/164]

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() [44/164]

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() [45/164]

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() [46/164]

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() [47/164]

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() [48/164]

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() [49/164]

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() [50/164]

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() [51/164]

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() [52/164]

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() [53/164]

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() [54/164]

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

◆ TEST_F() [55/164]

TEST_F ( HdMapUtilsTest_IntersectionMap  ,
getLongitudinalDistance_laneChange   
)
Note
Test for the corner case described in https://github.com/tier4/scenario_simulator_v2/issues/1364 Test in a scenario where lane change is necessary: if allow_lane_change = false, std::nullopt should be returned; if allow_lane_change = true, a value should be returned.

◆ TEST_F() [56/164]

TEST_F ( HdMapUtilsTest_IntersectionMap  ,
isInIntersection   
)
Note
Test for isInIntersection function

◆ TEST_F() [57/164]

TEST_F ( HdMapUtilsTest_KashiwanohaMap  ,
getLongitudinalDistance_PullRequest1348   
)
Note
Test for the corner-case fixed in https://github.com/tier4/scenario_simulator_v2/pull/1348.

◆ TEST_F() [58/164]

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() [59/164]

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() [60/164]

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() [61/164]

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() [62/164]

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() [63/164]

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() [64/164]

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() [65/164]

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() [66/164]

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() [67/164]

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() [68/164]

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

◆ TEST_F() [69/164]

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() [70/164]

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() [71/164]

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

◆ TEST_F() [72/164]

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

◆ TEST_F() [73/164]

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

◆ TEST_F() [74/164]

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

◆ TEST_F() [75/164]

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

◆ TEST_F() [76/164]

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() [77/164]

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

◆ TEST_F() [78/164]

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

◆ TEST_F() [79/164]

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() [80/164]

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() [81/164]

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() [82/164]

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() [83/164]

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() [84/164]

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() [85/164]

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

◆ TEST_F() [86/164]

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

◆ TEST_F() [87/164]

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() [88/164]

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

◆ TEST_F() [89/164]

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() [90/164]

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() [91/164]

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() [92/164]

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

◆ TEST_F() [93/164]

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() [94/164]

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() [95/164]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getFollowingLanelets_candidatesDoNotMatchRealTrajectory   
)
Note
Test function behavior when called with a candidate trajectory that contains wrong candidates

◆ TEST_F() [96/164]

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() [97/164]

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

◆ TEST_F() [98/164]

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

◆ TEST_F() [99/164]

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() [100/164]

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() [101/164]

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() [102/164]

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() [103/164]

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

◆ TEST_F() [104/164]

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() [105/164]

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() [106/164]

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() [107/164]

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() [108/164]

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() [109/164]

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() [110/164]

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() [111/164]

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() [112/164]

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() [113/164]

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() [114/164]

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() [115/164]

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() [116/164]

TEST_F ( HdMapUtilsTest_StandardMap  ,
getPreviousLanelets   
)
Note
Test basic functionality.

◆ TEST_F() [117/164]

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() [118/164]

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

◆ TEST_F() [119/164]

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() [120/164]

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() [121/164]

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

◆ TEST_F() [122/164]

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

◆ TEST_F() [123/164]

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

◆ TEST_F() [124/164]

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() [125/164]

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() [126/164]

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() [127/164]

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() [128/164]

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

◆ TEST_F() [129/164]

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

◆ TEST_F() [130/164]

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() [131/164]

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() [132/164]

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() [133/164]

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() [134/164]

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() [135/164]

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

◆ TEST_F() [136/164]

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() [137/164]

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() [138/164]

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

◆ TEST_F() [139/164]

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() [140/164]

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

◆ TEST_F() [141/164]

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

◆ TEST_F() [142/164]

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() [143/164]

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() [144/164]

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() [145/164]

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() [146/164]

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() [147/164]

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() [148/164]

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() [149/164]

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

◆ TEST_F() [150/164]

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() [151/164]

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() [152/164]

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() [153/164]

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

◆ TEST_F() [154/164]

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() [155/164]

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

◆ TEST_F() [156/164]

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

◆ TEST_F() [157/164]

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

◆ TEST_F() [158/164]

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() [159/164]

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

◆ TEST_F() [160/164]

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() [161/164]

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

◆ TEST_F() [162/164]

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() [163/164]

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.

◆ TEST_F() [164/164]

TEST_F ( HdMapUtilsTest_WithRoadShoulderMap  ,
routingWithRoadShoulder   
)