pcl
pcl copied to clipboard
[filters] Fix error due to multiple declarations of template member function specializations in pyramid
3rd split from #3841, should be last unless some other need to be split
Partial fix for #3839
Reproducing error, just in case CI removes logs:
[ 31%] Building CXX object filters/CMakeFiles/pcl_filters.dir/src/pyramid.cpp.o
/__w/1/s/filters/src/pyramid.cpp: In member function 'void pcl::filters::Pyramid<PointT>::compute(std::vector<typename pcl::PointCloud<PointT>::Ptr>&) [with PointT = pcl::PointXYZRGB; typename pcl::PointCloud<PointT>::Ptr = boost::shared_ptr<pcl::PointCloud<pcl::PointXYZRGB> >]':
/__w/1/s/filters/src/pyramid.cpp:135:19: error: 'squaredEuclideanDistance' is not a member of 'pcl'
if (pcl::squaredEuclideanDistance(previous.at(2 * j, 2 * i),
/__w/1/s/filters/src/pyramid.cpp: In member function 'void pcl::filters::Pyramid<PointT>::compute(std::vector<typename pcl::PointCloud<PointT>::Ptr>&) [with PointT = pcl::RGB; typename pcl::PointCloud<PointT>::Ptr = boost::shared_ptr<pcl::PointCloud<pcl::RGB> >]':
/__w/1/s/filters/src/pyramid.cpp:377:19: error: 'squaredEuclideanDistance' is not a member of 'pcl'
if (pcl::squaredEuclideanDistance(previous.at(2 * j, 2 * i),
^
In file included from /__w/1/s/filters/src/pyramid.cpp:38:0:
/__w/1/s/filters/include/pcl/filters/pyramid.h: In instantiation of 'void pcl::filters::Pyramid<PointT>::nullify(PointT&) const [with PointT = pcl::RGB]':
/__w/1/s/filters/src/pyramid.cpp:387:13: required from here
/__w/1/s/filters/include/pcl/filters/pyramid.h:146:15: error: 'struct pcl::RGB' has no member named 'x'
p.x = p.y = p.z = std::numeric_limits<float>::quiet_NaN ();
^
/__w/1/s/filters/include/pcl/filters/pyramid.h:146:21: error: 'struct pcl::RGB' has no member named 'y'
p.x = p.y = p.z = std::numeric_limits<float>::quiet_NaN ();
^
/__w/1/s/filters/include/pcl/filters/pyramid.h:146:27: error: 'struct pcl::RGB' has no member named 'z'
p.x = p.y = p.z = std::numeric_limits<float>::quiet_NaN ();
^
Any idea what we should be doing instead of Euclidean Distance for RGB?