10 #include <gtest/gtest.h> 19 #include <test_mrpt_common.h> 21 TEST(COccupancyGridMap3DTests, insert2DScan)
40 TEST(COccupancyGridMap3DTests, insertScan3D)
44 mrpt::UNITTEST_BASEDIR +
"/tests/test-3d-obs-ground.rawlog"s;
47 GTEST_FAIL() <<
"ERROR: test due to missing file: " << fil <<
"\n";
EXPECT_GT(out.final_iters, 10UL)
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
void example2DRangeScan(mrpt::obs::CObservation2DRangeScan &s, int i=0)
Example 2D lidar scans (form a venerable SICK LMS200).
A range or depth 3D scan measurement, as from a time-of-flight range camera or a structured-light dep...
T::Ptr getObservationByClass(size_t ith=0) const
Returns the i'th observation of a given class (or of a descendant class), or nullptr if there is no s...
TEST(COccupancyGridMap3DTests, insert2DScan)
float getFreenessByPos(float x, float y, float z) const
Read the real valued [0,1] contents of a voxel, given its coordinates.
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream.
#define ASSERT_(f)
Defines an assertion mechanism.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
A 3D occupancy grid map with a regular, even distribution of voxels.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
bool insertObservation(const mrpt::obs::CObservation &obs, const mrpt::poses::CPose3D *robotPose=nullptr)
Insert the observation information into this map.