title: How to resolve the problems when using the KinfuLS package in PCL?
body: <p>I am trying to PCL, especially its GPU implementation of matching cubes algorithm. I use PCL 1.9.1 under Ubuntu 18.04. </p>
  
  <p>However, I encounter some problems as listed below when I try to use its GPU package called kinfuLS for generating mesh from a TSDF volume.</p>
  
  <p>The codes having problems are:</p>
  
  <pre><code>void RestoreCloudFromTSDF(float* tsdf)
  {
      // create the cloud first
      pcl::PointCloud&lt;pcl::PointXYZRGBA &gt; tsdfCloud ;
      float* pTSDF = tsdf;
  
      for (int x = 0; x &lt; m_iBoxWidth; x++)
      {
          for (int y = 0; y &lt; m_iBoxHight; y++)
          {
              for (int z = 0; z &lt; 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&lt;pcl::PointXYZRGBA &gt; mc(m_iBoxWidth, m_iBoxHight, m_iBoxDepth, m_fVoxelSize);
      pcl::gpu::kinfuLS::StandaloneMarchingCubes&lt;pcl::PointXYZRGBA&gt;::MeshPtr modelMesh=mc.getMeshFromTSDFCloud(tsdfCloud);
  
  }
  </code></pre>
  
  <p>The errors with the last two lines:</p>
  
  <pre><code> 1. warning: instantiation of function 
  'pcl::gpu::kinfuLS::StandaloneMarchingCubes&lt;pcl::PointXYZRGBA&gt;::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&lt;pcl::PointXYZRGBA&gt;::StandaloneMarchingCubes' is explicitly instantiated in another translation unit
  
  2. warning: instantiation of function 'pcl::gpu::kinfuLS::StandaloneMarchingCubes&lt;pcl::PointXYZRGBA&gt;::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&lt;pcl::PointXYZRGBA&gt;::getMeshFromTSDFCloud' is explicitly instantiated in another translation unit
  
  3. error: undefined reference to `pcl::gpu::kinfuLS::StandaloneMarchingCubes&lt;pcl::PointXYZRGBA&gt;::StandaloneMarchingCubes(int, int, int, float)'
  
  4. error: undefined reference to `pcl::gpu::kinfuLS::StandaloneMarchingCubes&lt;pcl::PointXYZRGBA&gt;::getMeshFromTSDFCloud(pcl::PointCloud&lt;pcl::PointXYZRGBA&gt; const&amp;)'
  </code></pre>