MRPT  2.0.1
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-2020, 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:440



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020