12 #include <gtest/gtest.h> 21 dem.setSize(-4.0,4.0, 0.0, 4.0, 1.0);
23 EXPECT_TRUE( dem.insertIndividualPoint(2.0, 3.0, 56.0, pt_params ) );
24 EXPECT_TRUE( dem.insertIndividualPoint(-3.0, 0.4, 56.0, pt_params ) );
25 EXPECT_TRUE( dem.insertIndividualPoint( 3.0, 3.8, 56.0, pt_params ) );
27 EXPECT_FALSE(dem.insertIndividualPoint( -11.0, 2.0, 56.0, pt_params ) );
28 EXPECT_FALSE(dem.insertIndividualPoint( 11.0, 2.0, 56.0, pt_params ) );
29 EXPECT_FALSE(dem.insertIndividualPoint( 2.0, -1.0, 56.0, pt_params ) );
30 EXPECT_FALSE(dem.insertIndividualPoint( 2.0, 6.0, 56.0, pt_params ) );
32 TEST(CHeightGridMap2Ds, insertCheckMapBounds)
34 do_test_insertCheckMapBounds<mrpt::maps::CHeightGridMap2D>();
35 do_test_insertCheckMapBounds<mrpt::maps::CHeightGridMap2D_MRF>();
42 dem.setSize(0.0,5.0, 0.0, 5.0, 0.5);
44 const double x = 2.1,
y=3.1, z_write = 56.0;
45 dem.insertIndividualPoint(
x,
y,z_write );
47 bool res = dem.dem_get_z(
x,
y, z_read);
49 EXPECT_NEAR(z_read,z_write, 1e-6);
51 TEST(CHeightGridMap2Ds, insertPointsAndRead)
53 do_test_insertPointsAndRead<mrpt::maps::CHeightGridMap2D>();
54 do_test_insertPointsAndRead<mrpt::maps::CHeightGridMap2D_MRF>();
Extra params for insertIndividualPoint()
bool update_map_after_insertion
(default: true) run any required operation to ensure the map reflects the changes caused by this poin...
void do_test_insertPointsAndRead()
TEST(CHeightGridMap2Ds, insertCheckMapBounds)
void do_test_insertCheckMapBounds()