scenario_simulator_v2 C++ API
Classes | Functions
test_pose.cpp File Reference
#include <gtest/gtest.h>
#include <traffic_simulator/utils/pose.hpp>
#include "../helper_functions.hpp"
Include dependency graph for test_pose.cpp:

Classes

class  PoseTest
 

Functions

int main (int argc, char **argv)
 
 TEST (pose, quietNaNPose)
 
 TEST (pose, quietNaNLaneletPose)
 
 TEST_F (PoseTest, canonicalize_default)
 
 TEST_F (PoseTest, canonicalize_invalid)
 
 TEST_F (PoseTest, canonicalize_valid)
 
 TEST_F (PoseTest, toMapPose_CanonicalizedLaneletPose)
 
 TEST_F (PoseTest, toMapPose_LaneletPose)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_noBoundingBox_noRoute_valid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_noBoundingBox_noRoute_invalid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_noRoute_valid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_noRoute_invalid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_route_emptyInvalid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_route_emptyValid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyInvalid)
 
 TEST_F (PoseTest, toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyValid)
 
 TEST (pose, transformRelativePoseToGlobal)
 
 TEST (pose, relativePose_poses_zero)
 
 TEST (pose, relativePose_poses_zeros)
 
 TEST (pose, relativePose_poses_complex)
 
 TEST_F (PoseTest, relativePose_canonicalized_end_position)
 
 TEST_F (PoseTest, relativePose_canonicalized_start_position)
 
 TEST_F (PoseTest, boundingBoxRelativePose_disjoint)
 
 TEST_F (PoseTest, boundingBoxRelativePose_commonEdge)
 
 TEST_F (PoseTest, boundingBoxRelativePose_intersect)
 
 TEST_F (PoseTest, relativeLaneletPose_s_invalid)
 
 TEST_F (PoseTest, relativeLaneletPose_s_valid)
 
 TEST_F (PoseTest, relativeLaneletPose_offset_invalid)
 
 TEST_F (PoseTest, relativeLaneletPose_offset_valid)
 
 TEST_F (PoseTest, boundingBoxRelativeLaneletPose_s_invalid)
 
 TEST_F (PoseTest, boundingBoxRelativeLaneletPose_s_valid)
 
 TEST_F (PoseTest, boundingBoxRelativeLaneletPose_offset_invalid)
 
 TEST_F (PoseTest, boundingBoxRelativeLaneletPose_offset_valid)
 
 TEST_F (PoseTest, isInLanelet_inside)
 
 TEST_F (PoseTest, isInLanelet_outsideFrontFar)
 
 TEST_F (PoseTest, isInLanelet_outsideFrontClose)
 
 TEST_F (PoseTest, isInLanelet_outsideBackFar)
 
 TEST_F (PoseTest, isInLanelet_outsideBackClose)
 
 TEST_F (PoseTest, isAtEndOfLanelets_noFollowing_within)
 
 TEST_F (PoseTest, isAtEndOfLanelets_singleFollowing_within)
 
 TEST_F (PoseTest, isAtEndOfLanelets_singleFollowing_outside)
 
 TEST_F (PoseTest, isAtEndOfLanelets_multipleFollowing_within)
 
 TEST_F (PoseTest, isAtEndOfLanelets_multipleFollowing_outside)
 
 TEST_F (PoseTest, laneletLength_invalid)
 
 TEST_F (PoseTest, laneletLength_valid)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ TEST() [1/6]

TEST ( pose  ,
quietNaNLaneletPose   
)
Note
Test created object values.

◆ TEST() [2/6]

TEST ( pose  ,
quietNaNPose   
)
Note
Test created object values.

◆ TEST() [3/6]

TEST ( pose  ,
relativePose_poses_complex   
)
Note
Test calculation correctness with a non trivial example.

◆ TEST() [4/6]

TEST ( pose  ,
relativePose_poses_zero   
)
Note
Test calculation correctness when only one pose is zeroed, the goal is to obtain a pose equal to the second argument.

◆ TEST() [5/6]

TEST ( pose  ,
relativePose_poses_zeros   
)
Note
Test calculation correctness when both poses are zeroed.

◆ TEST() [6/6]

TEST ( pose  ,
transformRelativePoseToGlobal   
)
Note
Test calculation correctness with a non trivial example.

◆ TEST_F() [1/38]

TEST_F ( PoseTest  ,
boundingBoxRelativeLaneletPose_offset_invalid   
)
Note
Test offset-value calculation correctness when lateral distance between the poses can not be calculated.

◆ TEST_F() [2/38]

TEST_F ( PoseTest  ,
boundingBoxRelativeLaneletPose_offset_valid   
)
Note
Test offset-value calculation correctness when lateral distance between the poses can be calculated.

◆ TEST_F() [3/38]

TEST_F ( PoseTest  ,
boundingBoxRelativeLaneletPose_s_invalid   
)
Note
Test s-value calculation correctness when longitudinal distance between the poses can not be calculated.

◆ TEST_F() [4/38]

TEST_F ( PoseTest  ,
boundingBoxRelativeLaneletPose_s_valid   
)
Note
Test s-value calculation correctness when longitudinal distance between the poses can be calculated.

◆ TEST_F() [5/38]

TEST_F ( PoseTest  ,
boundingBoxRelativePose_commonEdge   
)
Note
Test calculation correctness when bounding boxes share an edge.

◆ TEST_F() [6/38]

TEST_F ( PoseTest  ,
boundingBoxRelativePose_disjoint   
)
Note
Test calculation correctness when bounding boxes are disjoint.

◆ TEST_F() [7/38]

TEST_F ( PoseTest  ,
boundingBoxRelativePose_intersect   
)
Note
Test calculation correctness when bounding boxes intersect.

◆ TEST_F() [8/38]

TEST_F ( PoseTest  ,
canonicalize_default   
)
Note
Test canonicalization with a default constructed LaneletPose.

◆ TEST_F() [9/38]

TEST_F ( PoseTest  ,
canonicalize_invalid   
)
Note
Test canonicalization with an invalid LaneletPose.

◆ TEST_F() [10/38]

TEST_F ( PoseTest  ,
canonicalize_valid   
)
Note
Test canonicalization with a valid constructed LaneletPose.

◆ TEST_F() [11/38]

TEST_F ( PoseTest  ,
isAtEndOfLanelets_multipleFollowing_outside   
)
Note
Test calculation correctness when there are multiple following lanelets and the pose lies after the end of the lanelet.

◆ TEST_F() [12/38]

TEST_F ( PoseTest  ,
isAtEndOfLanelets_multipleFollowing_within   
)
Note
Test calculation correctness when there are multiple following lanelets and the pose lies within the lanelet.

◆ TEST_F() [13/38]

TEST_F ( PoseTest  ,
isAtEndOfLanelets_noFollowing_within   
)
Note
Test calculation correctness when there are no following lanelets and the pose lies within the lanelet.

◆ TEST_F() [14/38]

TEST_F ( PoseTest  ,
isAtEndOfLanelets_singleFollowing_outside   
)
Note
Test calculation correctness when there is a single following lanelet and the pose lies after the end of the lanelet.

◆ TEST_F() [15/38]

TEST_F ( PoseTest  ,
isAtEndOfLanelets_singleFollowing_within   
)
Note
Test calculation correctness when there is a single following lanelet and the pose lies within the lanelet.

◆ TEST_F() [16/38]

TEST_F ( PoseTest  ,
isInLanelet_inside   
)
Note
Test calculation correctness when the pose lies within the lanelet.

◆ TEST_F() [17/38]

TEST_F ( PoseTest  ,
isInLanelet_outsideBackClose   
)
Note
Test calculation correctness when the pose lies outside the back of the lanelet, distance smaller than the tolerance.

◆ TEST_F() [18/38]

TEST_F ( PoseTest  ,
isInLanelet_outsideBackFar   
)
Note
Test calculation correctness when the pose lies outside the back of the lanelet, distance greater than the tolerance.

◆ TEST_F() [19/38]

TEST_F ( PoseTest  ,
isInLanelet_outsideFrontClose   
)
Note
Test calculation correctness when the pose lies outside the front of the lanelet, distance smaller than the tolerance.

◆ TEST_F() [20/38]

TEST_F ( PoseTest  ,
isInLanelet_outsideFrontFar   
)
Note
Test calculation correctness when the pose lies outside the front of the lanelet, distance greater than the tolerance.

◆ TEST_F() [21/38]

TEST_F ( PoseTest  ,
laneletLength_invalid   
)
Note
Test function behavior when non existent lanelet::Id has been passed.

◆ TEST_F() [22/38]

TEST_F ( PoseTest  ,
laneletLength_valid   
)
Note
Test calculation correctness when a correct lanelet::Id has been passed.

◆ TEST_F() [23/38]

TEST_F ( PoseTest  ,
relativeLaneletPose_offset_invalid   
)
Note
Test offset-value calculation correctness when lateral distance between the poses can not be calculated.

◆ TEST_F() [24/38]

TEST_F ( PoseTest  ,
relativeLaneletPose_offset_valid   
)
Note
Test offset-value calculation correctness when lateral distance between the poses can be calculated.

◆ TEST_F() [25/38]

TEST_F ( PoseTest  ,
relativeLaneletPose_s_invalid   
)
Note
Test s-value calculation correctness when longitudinal distance between the poses can not be calculated.

◆ TEST_F() [26/38]

TEST_F ( PoseTest  ,
relativeLaneletPose_s_valid   
)
Note
Test s-value calculation correctness when longitudinal distance between the poses can be calculated.

◆ TEST_F() [27/38]

TEST_F ( PoseTest  ,
relativePose_canonicalized_end_position   
)
Note
Test calculation correctness with the overload.

◆ TEST_F() [28/38]

TEST_F ( PoseTest  ,
relativePose_canonicalized_start_position   
)
Note
Test calculation correctness with the overload.

◆ TEST_F() [29/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_noRoute_invalid   
)
Note
Test function behavior with a pose that can not be canonicalized, matching distance too large.

◆ TEST_F() [30/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_noRoute_valid   
)
Note
Test function behavior with a pose that can be canonicalized.

◆ TEST_F() [31/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_route_emptyInvalid   
)
Note
Test function behavior with an empty unique_route_lanelets vector and a pose that can not be canonicalized.

◆ TEST_F() [32/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_route_emptyValid   
)
Note
Test function behavior with an empty unique_route_lanelets vector and a pose that can be canonicalized.

◆ TEST_F() [33/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyInvalid   
)
Note
Test function behavior with a non empty unique_route_lanelets vector and a pose that can not be canonicalized.

◆ TEST_F() [34/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyValid   
)
Note
Test function behavior with a non empty unique_route_lanelets vector and a pose that can be canonicalized.

◆ TEST_F() [35/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_noBoundingBox_noRoute_invalid   
)
Note
Test function behavior with a pose that can not be canonicalized.

◆ TEST_F() [36/38]

TEST_F ( PoseTest  ,
toCanonicalizedLaneletPose_noBoundingBox_noRoute_valid   
)
Note
Test function behavior with a pose that can be canonicalized.

◆ TEST_F() [37/38]

TEST_F ( PoseTest  ,
toMapPose_CanonicalizedLaneletPose   
)
Note
Test conversion to geometry_msgs::msg::Pose from CanonicalizedLaneletPose.

◆ TEST_F() [38/38]

TEST_F ( PoseTest  ,
toMapPose_LaneletPose   
)
Note
Test conversion to geometry_msgs::msg::Pose from LaneletPose with HdMapUtils pointer.