Thursday, December 5, 2013

pcl17 in ROS . Error " undefined referenced to "

Error 

Built target ROSBUILD_gensrv_lisp
  Built target ROSBUILD_gensrv_cpp
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  [ 88%] Built target rospack_gensrv
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  [ 88%] [ 88%] Built target rosbuild_precompile
  Built target rospack_gensrv_all
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[3]: Entering directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  Linking CXX executable ../bin/depth_odometry_node
  /usr/bin/ld: skipping incompatible /usr/lib/Lib/libOpenNI.so when searching for -lOpenNI
  /usr/bin/ld: skipping incompatible /usr/lib/Lib/libOpenNI.so when searching for -lOpenNI
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::resetLockingPermissions(std::basic_string, std::allocator > const&, boost::interprocess::file_lock&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::nearestKSearch(pcl17::PointXYZ const&, int, std::vector >&, std::vector >&) const'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PassThrough::applyFilterIndices(std::vector >&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::radiusSearch(pcl17::PointXYZ const&, double, std::vector >&, std::vector >&, unsigned int) const'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::setInputCloud(boost::shared_ptr const> const&, boost::shared_ptr > const> const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::KdTreeFLANN(bool)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::search::KdTree::KdTree(bool)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::writeASCII(std::basic_string, std::allocator > const&, sensor_msgs::PointCloud2_ > const&, Eigen::Matrix const&, Eigen::Quaternion const&, int)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::writeBinary(std::basic_string, std::allocator > const&, sensor_msgs::PointCloud2_ > const&, Eigen::Matrix const&, Eigen::Quaternion const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::search::KdTree::setPointRepresentation(boost::shared_ptr const> const&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::VoxelGrid::applyFilter(pcl17::PointCloud&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PassThrough::applyFilter(pcl17::PointCloud&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::PCDWriter::setLockingPermissions(std::basic_string, std::allocator > const&, boost::interprocess::file_lock&)'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::cleanup()'
  /home/sai/fuerte_workspace/depth_odometry_tools/lib_depthtools/lib/librgbdtools.so: undefined reference to `pcl17::KdTreeFLANN >::setEpsilon(float)'
  collect2: ld returned 1 exit status
  make[3]: *** [../bin/depth_odometry_node] Error 1
  make[3]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[2]: *** [CMakeFiles/depth_odometry_node.dir/all] Error 2
  make[2]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/sai/fuerte_workspace/depth_odometry_tools/depth_odometry/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package depth_odometry written to:
[ rosmake ]    /home/sai/.ros/rosmake/rosmake_output-20131205-164150/depth_odometry/build_output.log
[rosmake-2] Finished <<< depth_odometry [FAIL] [ 3.10 seconds ]                                                                                      
[ rosmake ] Halting due to failure in package depth_odometry.
[ rosmake ] Waiting for other threads to complete.                                    
[ rosmake ] Results:                                                                                                                                
[ rosmake ] Built 36 packages with 1 failures.                                                                                                      
[ rosmake ] Summary output to directory                                                                                                              
[ rosmake ] /home/sai/.ros/rosmake/rosmake_output-20131205-164150                                                                                    
sai@sai-HP-EliteBook-8460w:~/fuerte_workspace$ rosmake depth_odometry


Solution

Add the lines given below in the CMakeLists.txt

include_directories(/home/sai/fuerte_workspace/pcl17/include/pcl-1.7/)
include_directories(/home/sai/fuerte_workspace/pcl17/lib/)
link_libraries(pcl17_2d ; pcl17_surface ; pcl_io_ply  ;   pcl_people  ; pcl_stereo ;pcl17_common ; pcl17_tracking.so ; pcl_io ;        pcl_people  ;  pcl_stereo; pcl17_features;pcl17_visualization.so  ;pcl_io;pcl_recognition   ;        pcl_stereo ;pcl17_filters    ;       pcl_2d    ;           pcl_io   ;      pcl_recognition;        pcl_surface;pcl17_io_ply    ;       pcl_2d      ;     pcl_kdtree;     pcl_recognition   ;    pcl_surface ;pcl17_io    ;            pcl_2d    ;     pcl_kdtree ;     pcl_registration ;           pcl_surface ;pcl17_kdtree  ;         pcl_common   ;       pcl_kdtree  ;   pcl_registration ;      pcl_tracking ;pcl17_keypoints ;       pcl_common   ;   pcl_keypoints  ;     pcl_registration   ;  pcl_tracking;pcl17_ml    ;    pcl_common;     pcl_keypoints ;   pcl_sample_consensus  ;     pcl_tracking; pcl17_octree  ;         pcl_features ;     pcl_keypoints ; pcl_sample_consensus ;  pcl_visualization; pcl17_people   ;         pcl_features;  pcl_ml  ;           pcl_sample_consensus ; pcl_visualization ;pcl17_recognition   ;   pcl_features  ; pcl_ml   ;     pcl_search  ;               pcl_visualization ;pcl17_registration  ;   pcl_filters   ;     pcl_ml;       pcl_search   ;    pcl17_sample_consensus;  pcl_filters;     pcl_octree   ;        pcl_search; pcl17_search      ;   pcl_filters ;   pcl_octree ;     pcl_segmentation ;pcl17_segmentation;     pcl_io_ply ;        pcl_octree ;    pcl_segmentation; pcl17_stereo;          pcl_io_ply;      pcl_people ;         pcl_segmentation ) 

No comments:

Post a Comment