Tuesday, November 19, 2013

Good Morning Ppl,

I was trying the Normal Estimation tutorial. The code and errors are given below. I am using the input cloud captured from kinect.

Code

pcl::PointCloud::Ptr cloud1(new pcl::PointCloud);
 if (pcl::io::loadPCDFile ("test1.pcd", *cloud1) == -1) //* load the file
  {
    PCL_ERROR ("Couldn't read file test_pcd.pcd \n");
    return (-1);
  }
  std::cout << "Loaded "
            << cloud1->width * cloud1->height
            << " data points from test_pcd.pcd with the following fields: "
            << std::endl;
     pcl::PointCloud::Ptr normals (new pcl::PointCloud);

             pcl::IntegralImageNormalEstimation ne;
             ne.setNormalEstimationMethod (ne.AVERAGE_3D_GRADIENT);
             ne.setMaxDepthChangeFactor(0.02f);
             ne.setNormalSmoothingSize(10.0f);
             ne.setInputCloud(cloud1);
             ne.compute(*normals);


Error:

 [100%] Building CXX object CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o
  In file included from /usr/include/c++/4.6/backward/strstream:52:0,
                   from /usr/include/vtk-5.8/vtkIOStream.h:112,
                   from /usr/include/vtk-5.8/vtkSystemIncludes.h:40,
                   from /usr/include/vtk-5.8/vtkIndent.h:24,
                   from /usr/include/vtk-5.8/vtkObjectBase.h:43,
                   from /usr/include/vtk-5.8/vtkCommand.h:205,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/common/common.h:39,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/pcl_visualizer.h:49,
                   from /home/sai/fuerte_workspace/perception_pcl/pcl/include/pcl-1.4/pcl/visualization/cloud_viewer.h:39,
                   from /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp:10:
  /usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
  Linking CXX executable ../bin/iss_on_cloud
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o: In function `pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)':
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)]+0x88): undefined reference to `pcl::search::OrganizedNeighbor::estimateFocalLengthFromInputCloud(pcl::PointCloud const&)'
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&)]+0xa2): undefined reference to `pcl::search::OrganizedNeighbor::generateRadiusLookupTable(unsigned int, unsigned int)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o: In function `pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)':
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)]+0xd8): undefined reference to `pcl::search::OrganizedNeighbor::estimateFocalLengthFromInputCloud(pcl::PointCloud const&)'
  iss_on_cloud.cpp:(.text._ZN3pcl6search17OrganizedNeighborINS_8PointXYZEE13setInputCloudERKN5boost10shared_ptrIKNS_10PointCloudIS2_EEEERKNS5_IKSt6vectorIiSaIiEEEE[pcl::search::OrganizedNeighbor::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)]+0xf2): undefined reference to `pcl::search::OrganizedNeighbor::generateRadiusLookupTable(unsigned int, unsigned int)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x24): undefined reference to `pcl::search::OrganizedNeighbor::nearestKSearch(pcl::PointCloud const&, int, int, std::vector >&, std::vector >&)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x28): undefined reference to `pcl::search::OrganizedNeighbor::nearestKSearch(int, int, std::vector >&, std::vector >&)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x30): undefined reference to `pcl::search::OrganizedNeighbor::radiusSearch(pcl::PointXYZ const&, double, std::vector >&, std::vector >&, int) const'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl6search17OrganizedNeighborINS_8PointXYZEEE[vtable for pcl::search::OrganizedNeighbor]+0x38): undefined reference to `pcl::search::OrganizedNeighbor::radiusSearch(int, double, std::vector >&, std::vector >&, int) const'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/iss_on_cloud] Error 1
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[2]: *** [CMakeFiles/iss_on_cloud.dir/all] Error 2
  make[2]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
-------------------------------------------------------------------------------}


Solution

If any one gets a solution please let me know

saimanoj18@gmail.com



No comments:

Post a Comment