14 #include <gtest/gtest.h> 33 for (
size_t i = 0; i <
demo9_N; i++)
47 for (
size_t i = 0; i <
demo9_N; i++)
50 pts.getPoint(i,
x,
y,
z);
65 EXPECT_EQ(pts2.size(), pts3.size());
66 for (
size_t i = 0; i <
demo9_N; i++)
70 pts2.getPoint(i, x2, y2,
z2);
71 pts3.getPoint(i, x3, y3,
z3);
88 pts.clipOutOfRangeInZ(-10, -1);
89 EXPECT_EQ(pts.size(), 0u);
95 pts.clipOutOfRangeInZ(-10, 10);
96 EXPECT_EQ(pts.size(), 9u);
102 pts.clipOutOfRangeInZ(0.5, 1.5);
103 EXPECT_EQ(pts.size(), 3u);
116 const float radius = 0.5;
119 pts.clipOutOfRange(pivot, radius);
120 EXPECT_EQ(pts.size(), 1u);
126 const float radius = 1;
129 pts.clipOutOfRange(pivot, radius);
130 EXPECT_EQ(pts.size(), 0u);
136 const float radius = 1.1f;
139 pts.clipOutOfRange(pivot, radius);
140 EXPECT_EQ(pts.size(), 3u);
144 TEST(CSimplePointsMapTests, insertPoints)
146 do_test_insertPoints<CSimplePointsMap>();
149 TEST(CWeightedPointsMapTests, insertPoints)
151 do_test_insertPoints<CWeightedPointsMap>();
154 TEST(CColouredPointsMapTests, insertPoints)
156 do_test_insertPoints<CColouredPointsMap>();
159 TEST(CSimplePointsMapTests, clipOutOfRangeInZ)
161 do_test_clipOutOfRangeInZ<CSimplePointsMap>();
164 TEST(CWeightedPointsMapTests, clipOutOfRangeInZ)
166 do_test_clipOutOfRangeInZ<CWeightedPointsMap>();
169 TEST(CColouredPointsMapTests, clipOutOfRangeInZ)
171 do_test_clipOutOfRangeInZ<CColouredPointsMap>();
174 TEST(CSimplePointsMapTests, clipOutOfRange)
176 do_test_clipOutOfRange<CSimplePointsMap>();
179 TEST(CWeightedPointsMapTests, clipOutOfRange)
181 do_test_clipOutOfRange<CWeightedPointsMap>();
184 TEST(CColouredPointsMapTests, clipOutOfRange)
186 do_test_clipOutOfRange<CColouredPointsMap>();
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
const float demo9_zs[demo9_N]
void do_test_clipOutOfRange()
void do_test_clipOutOfRangeInZ()
const float demo9_xs[demo9_N]
This base provides a set of functions for maths stuff.
This namespace contains representation of robot actions and observations.
const float demo9_ys[demo9_N]
A class used to store a 2D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void load_demo_9pts_map(MAP &pts)
void do_test_insertPoints()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
TEST(CSimplePointsMapTests, insertPoints)