Thursday, August 15, 2013

Error while using Kdtree in pcl ros

Error:


[rosmake-3] Starting >>> sure_on_cloud [ make ]                                                                                                      
[ rosmake ] Last 40 linesre_on_cloud: 11.2 sec ]                                                                            [ 1 Active 36/37 Complete ]
{-------------------------------------------------------------------------------
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  [ 50%] Built target sure_on_cloud
  Scanning dependencies of target iss_on_cloud
  make[3]: Leaving directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/sure_on_cloud/build'
  [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]
  /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp: In function ‘void cloud_cb(const PointCloud2ConstPtr&)’:
  /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp:115:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp: In function ‘int main(int, char**)’:
  /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp:251:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  /home/sai/fuerte_workspace/sure_on_cloud/src/iss_on_cloud.cpp:253:45: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  Linking CXX executable ../bin/iss_on_cloud
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE[vtable for pcl::KdTreeFLANN >]+0x18): undefined reference to `pcl::KdTreeFLANN >::nearestKSearch(pcl::PointXYZ const&, int, std::vector >&, std::vector >&)'
  CMakeFiles/iss_on_cloud.dir/src/iss_on_cloud.o:(.rodata._ZTVN3pcl11KdTreeFLANNINS_8PointXYZEN5flann9L2_SimpleIfEEEE[vtable for pcl::KdTreeFLANN >]+0x24): undefined reference to `pcl::KdTreeFLANN >::radiusSearch(pcl::PointXYZ const&, 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'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package sure_on_cloud written to:
[ rosmake ]    /home/sai/.ros/rosmake/rosmake_output-20130816-021218/sure_on_cloud/build_output.log
[rosmake-3] Finished <<< sure_on_cloud [FAIL] [ 11.16 seconds ]                                                                                      
[ rosmake ] Halting due to failure in package sure_on_cloud.
[ rosmake ] Waiting for other threads to complete.                                      
[ rosmake ] Results:                                                                                                                                  
[ rosmake ] Built 37 packages with 1 failures.                                                                                                        
[ rosmake ] Summary output to directory                                                                                                              
[ rosmake ] /home/sai/.ros/rosmake/rosmake_output-20130816-021218                                                                                    
sai@sai-HP-EliteBook-8460w:~$



Solution :  Add these header files

Search for kdtree_flann.h  and kdtree_flann.hpp and add those as header files
#include < / home/sai/fuerte_workspace/perception_pcl/pcl/build/pcl_trunk/kdtree/include/pcl/kdtree/kdtree_flann.h>
#include < / home/sai/fuerte_workspace/perception_pcl/pcl/build/pcl_trunk/kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp>

No comments:

Post a Comment