MRPT  1.9.9
CPointsMapXYZI_unittest.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include <gtest/gtest.h>
12 #include <mrpt/system/filesystem.h>
13 #include <test_mrpt_common.h>
14 #include <iostream>
15 
16 TEST(CPointsMapXYZI, loadFromKittiVelodyneFile)
17 {
18  using namespace std;
19  const string kitti_fil =
20  mrpt::UNITTEST_BASEDIR + string("/tests/kitti_00_000000.bin.gz");
21  if (!mrpt::system::fileExists(kitti_fil))
22  {
23  cerr << "WARNING: Skipping test due to missing file: " << kitti_fil
24  << "\n";
25  return;
26  }
27 
29  const bool read_ok = m.loadFromKittiVelodyneFile(kitti_fil);
30  EXPECT_TRUE(read_ok);
31  EXPECT_EQ(124668U, m.size());
32 }
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
Definition: filesystem.cpp:128
STL namespace.
bool loadFromKittiVelodyneFile(const std::string &filename)
Loads from a Kitti dataset Velodyne scan binary file.
TEST(CPointsMapXYZI, loadFromKittiVelodyneFile)
GLsizei const GLchar ** string
Definition: glext.h:4116
A map of 3D points with reflectance/intensity (float).
size_t size() const
Returns the number of stored points in the map.
Definition: CPointsMap.h:422



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: a429c6f2f Mon Aug 19 15:45:44 2019 +0200 at lun ago 19 15:50:16 CEST 2019