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 <traffic_simulator/utils/pose.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, 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, stopAtCurrentPosition)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getCanonicalizedLaneletPose_notOnRoadAndCrosswalkNotPedestrian)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getCanonicalizedLaneletPose_onRoadAndCrosswalkNotPedestrian)
 
 TEST_F (MiscObjectEntityTest_HdMapUtils, getCanonicalizedLaneletPose_onCrosswalkNotOnRoadNotPedestrian)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST_F() [1/24]

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

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

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

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

◆ TEST_F() [5/24]

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

◆ TEST_F() [6/24]

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

◆ TEST_F() [7/24]

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

◆ TEST_F() [8/24]

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() [9/24]

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

◆ TEST_F() [10/24]

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

◆ TEST_F() [11/24]

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

◆ TEST_F() [12/24]

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() [13/24]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getCanonicalizedLaneletPose_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() [14/24]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getCanonicalizedLaneletPose_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() [15/24]

TEST_F ( MiscObjectEntityTest_HdMapUtils  ,
getCanonicalizedLaneletPose_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() [16/24]

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

◆ TEST_F() [17/24]

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

◆ TEST_F() [18/24]

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() [19/24]

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() [20/24]

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() [21/24]

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() [22/24]

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() [23/24]

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

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