template instantiation problems with new point types
Hi, I added a new point type to maintain extra information with each point type. I can use the new point type with all the inline methods of existing templated classes of pcl(eg pcl::PCDWriter.write). But I cant use them with the methods of these templated classes which are defined outside header files in respective cpp files(eg pcl::ExtractFilter.applyFilter). The linker complains of undefined reference:
CMakeFiles/combineNearestCam.dir/src/NearestCamMerge.o:(.rodata._ZTVN3pcl14ExtractIndicesIN16scene_processing14PointXYGRGBCamEEE[vtable for pcl::ExtractIndices<scene_processing::pointxygrgbcam>]+0x18): undefined reference to `pcl::ExtractIndices<scene_processing::pointxygrgbcam>::applyFilter(pcl::PointCloud<scene_processing::pointxygrgbcam>&)'
Is there a way to easily add explicit template instantiations of all classes of pcl for the newly defined point type?
code for new point type:
namespace scene_processing
{
struct PointXYGRGBCam
{
float x;
float y;
float z;
float rgb;
uint32_t cameraIndex;
};
}
POINT_CLOUD_REGISTER_POINT_STRUCT(
scene_processing::PointXYGRGBCam,
(float, x, x)
(float, y, y)
(float, z, z)
(float, rgb, rgb)
(uint32_t, cameraIndex, cameraIndex)
);
Regards Abhishek