MRPT  2.0.3
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 }
TEST
TEST(CPointsMapXYZI, loadFromKittiVelodyneFile)
Definition: CPointsMapXYZI_unittest.cpp:16
filesystem.h
mrpt::maps::CPointsMap::size
size_t size() const
Save the point cloud as a PCL PCD file, in either ASCII or binary format.
Definition: CPointsMap.h:459
EXPECT_TRUE
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
CPointsMapXYZI.h
mrpt::maps::CPointsMapXYZI::loadFromKittiVelodyneFile
bool loadFromKittiVelodyneFile(const std::string &filename)
Loads from a Kitti dataset Velodyne scan binary file.
Definition: CPointsMapXYZI.cpp:427
mrpt::system::fileExists
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
Definition: filesystem.cpp:128
mrpt::maps::CPointsMapXYZI
A map of 3D points with reflectance/intensity (float).
Definition: CPointsMapXYZI.h:26
EXPECT_EQ
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 29 13:06:46 UTC 2020