все! Я пытаюсь PCL, особенно его реализация алгоритма соответствия кубов GPU. Я использую PCL 1.9.1 под Ubuntu 18.04.
Однако, я сталкиваюсь с некоторыми проблемами, перечисленными ниже, когда пытаюсь использовать пакет GPU, называемый kinfuLS, для генерации сетки из тома TSDF. Не могли бы вы помочь мне? Большое спасибо!
Коды, имеющие проблемы:
void RestoreCloudFromTSDF(float* tsdf)
{
// create the cloud first
pcl::PointCloud<pcl::PointXYZRGBA > tsdfCloud ;
float* pTSDF = tsdf;
for (int x = 0; x < m_iBoxWidth; x++)
{
for (int y = 0; y < m_iBoxHight; y++)
{
for (int z = 0; z < m_iBoxDepth; z++)
{
PointT point;
point.x = *pTSDF;
point.y = *(pTSDF+1);
point.z = *(pTSDF+2);
point.rgb = * (pTSDF+3);
pTSDF += 4;
tsdfCloud.push_back(point);
}
}
}
// running matching cubes
pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA > mc(m_iBoxWidth, m_iBoxHight, m_iBoxDepth, m_fVoxelSize);
pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::MeshPtr modelMesh=mc.getMeshFromTSDFCloud(tsdfCloud);
}
Ошибки с двумя последними строками:
1.
warning: instantiation of function
'pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::StandaloneMarchingCubes' required here, but no definition is available
standalone_marching_cubes.h:86:7: note: forward declaration of template entity is here
cloudregister.cpp:205:68: note: add an explicit instantiation declaration to suppress this warning if 'pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::StandaloneMarchingCubes' is explicitly instantiated in another translation unit
2. warning: instantiation of function 'pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::getMeshFromTSDFCloud' required here, but no definition is available
standalone_marching_cubes.h:97:7: note: forward declaration of template entity is here
cloudregister.cpp:206:89: note: add an explicit instantiation declaration to suppress this warning if 'pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::getMeshFromTSDFCloud' is explicitly instantiated in another translation unit
3. error: undefined reference to `pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::StandaloneMarchingCubes(int, int, int, float)'
4. error: undefined reference to `pcl::gpu::kinfuLS::StandaloneMarchingCubes<pcl::PointXYZRGBA>::getMeshFromTSDFCloud(pcl::PointCloud<pcl::PointXYZRGBA> const&)'
Еще раз спасибо!