scenario_simulator_v2 C++ API
Classes | Functions
test_misc_object_entity.cpp File Reference
#include <gtest/gtest.h>
#include <ament_index_cpp/get_package_share_directory.hpp>
#include <scenario_simulator_exception/exception.hpp>
#include <traffic_simulator/entity/misc_object_entity.hpp>
#include <traffic_simulator/helper/helper.hpp>
#include "../catalogs.hpp"
#include "../expect_eq_macros.hpp"
#include "../helper_functions.hpp"
Include dependency graph for test_misc_object_entity.cpp:

Classes

class  MiscObjectEntityTest_HdMapUtils
 
class  MiscObjectEntityTest_FullObject
 

Functions

int main (int argc, char **argv)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getCurrentAction_npcNotStarted)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestSpeedChange_absolute)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestSpeedChange_relative)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestSpeedChange_absoluteTransition)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestAssignRoute_laneletPose)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestAssignRoute_pose)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestAcquirePosition_laneletPose)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, requestAcquirePosition_pose)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getRouteLanelets)
 
 TEST_F (MiscObjectEntityTest_FullObject, appendDebugMarker)
 
 TEST_F (MiscObjectEntityTest_FullObject, asFieldOperatorApplication)
 
 TEST_F (MiscObjectEntityTest_FullObject, get2DPolygon)
 
 TEST_F (MiscObjectEntityTest_FullObject, startNpcLogic)
 
 TEST_F (MiscObjectEntityTest_FullObject, activateOutOfRangeJob_speed)
 
 TEST_F (MiscObjectEntityTest_FullObject, activateOutOfRangeJob_acceleration)
 
 TEST_F (MiscObjectEntityTest_FullObject, activateOutOfRangeJob_jerk)
 
 TEST_F (MiscObjectEntityTest_FullObject, requestLaneChange_relativeTargetLaneletPose)
 
 TEST_F (MiscObjectEntityTest_FullObject, requestLaneChange_relativeTargetName)
 
 TEST_F (MiscObjectEntityTest_FullObject, requestLaneChange_relativeTargetInvalid)
 
 TEST_F (MiscObjectEntityTest_FullObject, requestFollowTrajectory)
 
 TEST_F (MiscObjectEntityTest_FullObject, requestWalkStraight)
 
 TEST_F (MiscObjectEntityTest_FullObject, updateStandStillDuration_startedMoving)
 
 TEST_F (MiscObjectEntityTest_FullObject, updateStandStillDuration_notStarted)
 
 TEST_F (MiscObjectEntityTest_FullObject, updateTraveledDistance_startedMoving)
 
 TEST_F (MiscObjectEntityTest_FullObject, updateTraveledDistance_notStarted)
 
 TEST_F (MiscObjectEntityTest_FullObject, stopAtCurrentPosition)
 
 TEST_F (MiscObjectEntityTest_FullObject, getMapPoseFromRelativePose_relative)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getLaneletPose_notOnRoadAndCrosswalkNotPedestrian)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getLaneletPose_onRoadAndCrosswalkNotPedestrian)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getLaneletPose_onCrosswalkNotOnRoadNotPedestrian)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST_F() [1/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
activateOutOfRangeJob_acceleration   
)
Note
Test basic functionality; test activating an out of range job with an entity that has a positive acceleration and an acceleration range specified in the job = [0, 0].

◆ TEST_F() [2/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
activateOutOfRangeJob_jerk   
)
Note
Test basic functionality; test activating an out of range job with an entity that has a positive jerk and a jerk range specified in the job = [0, 0].

◆ TEST_F() [3/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
activateOutOfRangeJob_speed   
)
Note
Test basic functionality; test activating an out of range job with an entity that has a positive speed and a speed range specified in the job = [0, 0]

◆ TEST_F() [4/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
appendDebugMarker   
)
Note
Test basic functionality; test whether the function does nothing.

◆ TEST_F() [5/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
asFieldOperatorApplication   
)
Note
Test basic functionality; test whether the function throws an error.

◆ TEST_F() [6/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
get2DPolygon   
)
Note
Test functionality used by other units; test correctness of 2d polygon calculations.

◆ TEST_F() [7/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
getMapPoseFromRelativePose_relative   
)
Note
Test functionality used by other units; test relative pose calculations correctness with a transformation argument passed.

◆ TEST_F() [8/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
requestFollowTrajectory   
)
Note
Test function behavior when called with any argument - the goal is to test error throwing.

◆ TEST_F() [9/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
requestLaneChange_relativeTargetInvalid   
)
Note
Test basic functionality; test wrapper function with invalid relative target lane change
  • the goal is to request a lane change in the location where the lane change is impossible.

◆ TEST_F() [10/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
requestLaneChange_relativeTargetLaneletPose   
)
Note
Test basic functionality; test wrapper function with invalid relative target lanelet pose.

◆ TEST_F() [11/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
requestLaneChange_relativeTargetName   
)
Note
Test basic functionality; test wrapper function with invalid relative target name.

◆ TEST_F() [12/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
requestWalkStraight   
)
Note
Test function behavior when called with any argument - the goal is to test error throwing.

◆ TEST_F() [13/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
startNpcLogic   
)
Note
Test basic functionality; test whether the NPC logic is started correctly.

◆ TEST_F() [14/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
stopAtCurrentPosition   
)
Note
Test basic functionality; test stopping correctness - the goal is to check whether the entity status is changed to stopped (no velocity etc.).

◆ TEST_F() [15/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
updateStandStillDuration_notStarted   
)
Note
Test basic functionality; test updating stand still duration when NPC logic is not started.

◆ TEST_F() [16/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
updateStandStillDuration_startedMoving   
)
Note
test basic functionality; test updating stand still duration when NPC logic is started and velocity is greater than 0.

◆ TEST_F() [17/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
updateTraveledDistance_notStarted   
)
Note
Test basic functionality; test updating traveled distance correctness with NPC not started.

◆ TEST_F() [18/30]

TEST_F ( MiscObjectEntityTest_FullObject  ,
updateTraveledDistance_startedMoving   
)
Note
Test basic functionality; test updating traveled distance correctness with NPC logic started and velocity greater than 0.

◆ TEST_F() [19/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getCurrentAction_npcNotStarted   
)
Note
Test basic functionality. Test current action obtaining when NPC logic is not started.

◆ TEST_F() [20/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getLaneletPose_notOnRoadAndCrosswalkNotPedestrian   
)
Note
Test functionality used by other units; test lanelet pose obtaining with a matching distance smaller than a distance from an entity to the lanelet (both crosswalk and road) and status_.type.type != PEDESTRIAN.

◆ TEST_F() [21/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getLaneletPose_onCrosswalkNotOnRoadNotPedestrian   
)
Note
Test functionality used by other units; test lanelet pose obtaining with a matching distance greater than a distance from an entity to the crosswalk lanelet, but smaller than to the road lanelet and status_.type.type != PEDESTRIAN.

◆ TEST_F() [22/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getLaneletPose_onRoadAndCrosswalkNotPedestrian   
)
Note
Test functionality used by other units; test lanelet pose obtaining with a matching distance greater than a distance from an entity to the lanelet (both crosswalk and road) and status_.type.type != PEDESTRIAN.

◆ TEST_F() [23/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getRouteLanelets   
)
Note
Test function behavior when called with any argument - the goal is to test error throwing.

◆ TEST_F() [24/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestAcquirePosition_laneletPose   
)
Note
Test function behavior when position acquiring is requested with lanelet pose
  • the goal is to test throwing error.

◆ TEST_F() [25/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestAcquirePosition_pose   
)
Note
Test function behavior when position acquiring is requested with pose
  • the goal is to test throwing error.

◆ TEST_F() [26/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestAssignRoute_laneletPose   
)
Note
Test function behavior when route assigning is requested with lanelet pose
  • the goal is to test throwing error.

◆ TEST_F() [27/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestAssignRoute_pose   
)
Note
Test function behavior when route assigning is requested with pose
  • the goal is to test throwing error.

◆ TEST_F() [28/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestSpeedChange_absolute   
)
Note
Test function behavior when absolute speed change is requested - the goal is to test throwing error.

◆ TEST_F() [29/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestSpeedChange_absoluteTransition   
)
Note
Test function behavior when relative speed change with transition type is requested
  • the goal is to test throwing error.

◆ TEST_F() [30/30]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
requestSpeedChange_relative   
)
Note
Test function behavior when relative speed change is requested - the goal is to test throwing error.