14 #include <gtest/gtest.h> 19 TEST(CubicInterpolation, FlatWorld)
21 const int seed = rand();
29 if (::testing::Test::HasFailure()) {
30 std::cout <<
"\n Test CubicInterpolation, FlatWorld failed with seed: " << seed << std::endl;
34 TEST(CubicInterpolation, RationalFunctionWorld)
36 const int seed = rand();
44 if (::testing::Test::HasFailure()) {
45 std::cout <<
"\n Test CubicInterpolation, RationalFunctionWorld failed with seed: " << seed
50 TEST(CubicInterpolation, SaddleWorld)
52 const int seed = rand();
60 if (::testing::Test::HasFailure()) {
61 std::cout <<
"\n Test CubicInterpolation, SaddleWorld failed with seed: " << seed << std::endl;
65 TEST(CubicInterpolation, SecondOrderPolyWorld)
67 const int seed = rand();
75 if (::testing::Test::HasFailure()) {
76 std::cout <<
"\n Test CubicInterpolation, SecondOrderPolyWorld failed with seed: " << seed
81 TEST(CubicInterpolation, SineWorld)
83 const int seed = rand();
91 if (::testing::Test::HasFailure()) {
92 std::cout <<
"\n Test CubicInterpolation, SineWorld failed with seed: " << seed << std::endl;
96 TEST(CubicInterpolation, TanhWorld)
98 const int seed = rand();
106 if (::testing::Test::HasFailure()) {
107 std::cout <<
"\n Test CubicInterpolation, TanhWorld failed with seed: " << seed << std::endl;
111 TEST(CubicInterpolation, GaussianWorld)
113 const int seed = rand();
121 if (::testing::Test::HasFailure()) {
122 std::cout <<
"\n Test CubicInterpolation, GaussianWorld failed with seed: " << seed
std::mt19937 rndGenerator
AnalyticalFunctions createSaddleWorld(grid_map::GridMap *map)
AnalyticalFunctions createTanhWorld(grid_map::GridMap *map)
AnalyticalFunctions createRationalFunctionWorld(grid_map::GridMap *map)
std::vector< Point2D > uniformlyDitributedPointsWithinMap(const grid_map::GridMap &map, unsigned int numPoints)
AnalyticalFunctions createSineWorld(grid_map::GridMap *map)
grid_map::GridMap createMap(const grid_map::Length &length, double resolution, const grid_map::Position &pos)
AnalyticalFunctions createGaussianWorld(grid_map::GridMap *map)
AnalyticalFunctions createSecondOrderPolyWorld(grid_map::GridMap *map)
TEST(CubicInterpolation, FlatWorld)
void verifyValuesAtQueryPointsAreClose(const grid_map::GridMap &map, const AnalyticalFunctions &trueValues, const std::vector< Point2D > &queryPoints, grid_map::InterpolationMethods interpolationMethod)
AnalyticalFunctions createFlatWorld(grid_map::GridMap *map)