scenario_simulator_v2 C++ API
Functions | Variables
test_catmull_rom_subspline.cpp File Reference
#include <gtest/gtest.h>
#include <geometry/spline/catmull_rom_subspline.hpp>
#include <scenario_simulator_exception/exception.hpp>
#include "../expect_eq_macros.hpp"
#include "../test_utils.hpp"
Include dependency graph for test_catmull_rom_subspline.cpp:

Functions

std::shared_ptr< math::geometry::CatmullRomSplinemakeLine ()
 Helper function generating line: p(0,0)-> p(1,3) -> p(2,6) More...
 
 TEST (CatmullRomSubspline, getLength)
 
 TEST (CatmullRomSubspline, getLength_zero)
 
 TEST (CatmullRomSubspline, getCollisionPointIn2D)
 
 TEST (CatmullRomSubspline, getCollisionPointIn2D_shiftedBeginning)
 
 TEST (CatmullRomSubspline, getCollisionPointIn2D_edge)
 
 TEST (CatmullRomSubspline, getCollisionPointIn2D_base)
 
 TEST (CatmullRomSubspline, getCollisionPointIn2D_wrongPolygon)
 
int main (int argc, char **argv)
 

Variables

constexpr double EPS = 1e-6
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ makeLine()

std::shared_ptr<math::geometry::CatmullRomSpline> makeLine ( )

Helper function generating line: p(0,0)-> p(1,3) -> p(2,6)

◆ TEST() [1/7]

TEST ( CatmullRomSubspline  ,
getCollisionPointIn2D   
)

Collision at the beginning of the spline

Collision at the end of the spline

◆ TEST() [2/7]

TEST ( CatmullRomSubspline  ,
getCollisionPointIn2D_base   
)

◆ TEST() [3/7]

TEST ( CatmullRomSubspline  ,
getCollisionPointIn2D_edge   
)

◆ TEST() [4/7]

TEST ( CatmullRomSubspline  ,
getCollisionPointIn2D_shiftedBeginning   
)

Collision at the beginning of the spline

Collision at the end of the spline

◆ TEST() [5/7]

TEST ( CatmullRomSubspline  ,
getCollisionPointIn2D_wrongPolygon   
)

◆ TEST() [6/7]

TEST ( CatmullRomSubspline  ,
getLength   
)

◆ TEST() [7/7]

TEST ( CatmullRomSubspline  ,
getLength_zero   
)

Variable Documentation

◆ EPS

constexpr double EPS = 1e-6
constexpr