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 }
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
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)
A map of 3D points with reflectance/intensity (float).
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
size_t size() const
Save the point cloud as a PCL PCD file, in either ASCII or binary format.
Definition: CPointsMap.h:441



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7e629e01a Sat Dec 14 00:05:55 2019 +0100 at sáb dic 14 00:15:10 CET 2019