15 #include <mrpt/core/exceptions.h>
16 #include <mrpt/maps/CPointsMapXYZI.h>
17 #include <mrpt/maps/CPointsMapXYZIRT.h>
20 const mrpt::maps::CPointsMap& pc,
bool printWarnings)
23 const size_t n = pc.size();
25 if (
auto* pcIRT =
dynamic_cast<const mrpt::maps::CPointsMapXYZIRT*
>(&pc);
28 if (pcIRT->hasIntensityField() &&
29 pcIRT->getPointsBufferRef_intensity()->size() != n)
33 std::cerr <<
"[mp2p_icp] XYZIRT WARNING: Intensity channel has "
35 << pcIRT->getPointsBufferRef_intensity()->size()
36 <<
" expected=" << n << std::endl;
38 if (pcIRT->hasRingField() &&
39 pcIRT->getPointsBufferRef_ring()->size() != n)
43 std::cerr <<
"[mp2p_icp] XYZIRT WARNING: Ring channel has "
45 << pcIRT->getPointsBufferRef_ring()->size()
46 <<
" expected=" << n << std::endl;
48 if (pcIRT->hasTimeField() &&
49 pcIRT->getPointsBufferRef_timestamp()->size() != n)
53 std::cerr <<
"[mp2p_icp] XYZIRT WARNING: Timestamp channel has "
55 << pcIRT->getPointsBufferRef_timestamp()->size()
56 <<
" expected=" << n << std::endl;
59 else if (
auto* pcI =
dynamic_cast<const mrpt::maps::CPointsMapXYZI*
>(&pc);
62 if (pcI->getPointsBufferRef_intensity() &&
63 pcI->getPointsBufferRef_intensity()->size() != n)
67 std::cerr <<
"[mp2p_icp] XYZI WARNING: Intensity channel has "
69 << pcI->getPointsBufferRef_intensity()->size()
70 <<
" expected=" << n << std::endl;