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
Originally posted by aa755 on ROS Answers with karma: 61 on 2011-03-16
Post score: 0