Robotics StackExchange | Archived questions

How to solve 'no matching function for call to ‘pcl::PCDReader::readHeader'?

I follow the src of Cluster Recognition and 6DOF Pose Estimation using VFH descriptors.

I run:

  roscreate-pkg sam_pcl_vfh_matching pcl roscpp

When I rosmake:

  sam@sam:~/code/ros/recognition/sam_pcl_vfh_matching$ rosmake
  [ rosmake ] rosmake starting...                                                                                                                
  [ rosmake ] No package specified.  Building ['sam_pcl_vfh_matching']                                                                           
  [ rosmake ] Packages requested are: ['sam_pcl_vfh_matching']                                                                                   
  [ rosmake ] Logging to directory /home/sam/.ros/rosmake/rosmake_output-20121006-204321                                                         
  [ rosmake ] Expanded args ['sam_pcl_vfh_matching'] to:
  ['sam_pcl_vfh_matching']                                                                
  [rosmake-0] Starting >>> std_msgs [ make ]                                                                                                     
  [rosmake-1] Starting >>> geometry_msgs [ make ]                                                                                                
  [rosmake-2] Starting >>> roslang [ make ]                                                                                                      
  [rosmake-1] Finished <<< geometry_msgs  No Makefile in package geometry_msgs                                                                   
  [rosmake-1] Starting >>> sensor_msgs [ make ]                                                                                                  
  [rosmake-0] Finished <<< std_msgs  No Makefile in package std_msgs                                                                             
  [rosmake-1] Finished <<< sensor_msgs  No Makefile in package sensor_msgs                                                                       
  [rosmake-1] Starting >>> pcl [ make ]                                                                                                          
  [rosmake-2] Finished <<< roslang  No Makefile in package roslang                                                                               
  [rosmake-2] Starting >>> roscpp [ make ]                                                                                                       
  [rosmake-1] Finished <<< pcl  No Makefile in package pcl                                                                                       
  [rosmake-2] Finished <<< roscpp  No Makefile in package roscpp                                                                                 
  [rosmake-2] Starting >>> sam_pcl_vfh_matching [ make ]                                                                                         
  [ rosmake ] Last 40 linesm_pcl_vfh_matching: 4.0 sec ]                                                                [ 1 Active 6/7 Complete ]
  {-------------------------------------------------------------------------------
    -- Detecting CXX compiler ABI info - done
    -- Found PythonInterp: /usr/bin/python (found version "2.7.3")
    [rosbuild] Building package sam_pcl_vfh_matching
    [rosbuild] Cached build flags older than manifests; calling rospack to get flags
    [rosbuild] Including /opt/ros/fuerte/share/rospy/rosbuild/rospy.cmake
    [rosbuild] Including /opt/ros/fuerte/share/roscpp/rosbuild/roscpp.cmake
    [rosbuild] Including /opt/ros/fuerte/share/roslisp/rosbuild/roslisp.cmake
    [rosbuild] Including /opt/ros/fuerte/stacks/client_rosjava_jni/rosjava_jni/cmake/rosjava.cmake
    -- Found Java: /usr/lib/jvm/default-java/bin/java (found version "1.6.0.24")
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/sam/code/ros/recognition/sam_pcl_vfh_matching/build
    cd build && make -l4
    make[1]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    make[2]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    make[3]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    Scanning dependencies of target rospack_genmsg_libexe
    make[3]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    [  0%] Built target rospack_genmsg_libexe
    make[3]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    Scanning dependencies of target rosbuild_precompile
    make[3]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    [  0%] Built target rosbuild_precompile
    make[3]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    Scanning dependencies of target vfh_matching
    make[3]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    make[3]: Entering directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    [100%] Building CXX object CMakeFiles/vfh_matching.dir/src/vfh_matching.o
    /home/sam/code/ros/recognition/sam_pcl_vfh_matching/src/vfh_matching.cpp: In function ‘bool loadHist(const boost::filesystem3::path&, vfh_model&)’:
    /home/sam/code/ros/recognition/sam_pcl_vfh_matching/src/vfh_matching.cpp:30:81: error: no matching function for call to ‘pcl::PCDReader::readHeader(const string&, sensor_msgs::PointCloud2&, Eigen::Vector4f&, Eigen::Quaternionf&, int&, int&, unsigned int&)’
    /home/sam/code/ros/recognition/sam_pcl_vfh_matching/src/vfh_matching.cpp:30:81: note: candidate is:
    /opt/ros/fuerte/include/pcl-1.5/pcl/io/pcd_io.h:107:7: note: virtual int pcl::PCDReader::readHeader(const string&, sensor_msgs::PointCloud2&, Eigen::Vector4f&, Eigen::Quaternionf&, int&, int&, int&)
    /opt/ros/fuerte/include/pcl-1.5/pcl/io/pcd_io.h:107:7: note:   no known conversion for argument 7 from ‘unsigned int’ to ‘int&’
    make[3]: *** [CMakeFiles/vfh_matching.dir/src/vfh_matching.o] Error 1
    make[3]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    make[2]: *** [CMakeFiles/vfh_matching.dir/all] Error 2
    make[2]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/sam/code/ros/recognition/sam_pcl_vfh_matching/build'
  -------------------------------------------------------------------------------}
  [ rosmake ] Output from build of package sam_pcl_vfh_matching written to:
  [ rosmake ]    /home/sam/.ros/rosmake/rosmake_output-20121006-204321/sam_pcl_vfh_matching/build_output.log
  [rosmake-2] Finished <<< sam_pcl_vfh_matching [FAIL] [ 4.06 seconds ]                                                                          
  [ rosmake ] Halting due to failure in package sam_pcl_vfh_matching. 
  [ rosmake ] Waiting for other threads to complete.                        
  [ rosmake ] Results:                                                                                                                           
  [ rosmake ] Built 7 packages with 1 failures.                                                                                                  
  [ rosmake ] Summary output to directory                                                                                                        
  [ rosmake ] /home/sam/.ros/rosmake/rosmake_output-20121006-204321                                                                              
  sam@sam:~/code/ros/recognition/sam_pcl_vfh_matching$                                                                                                        

How to solve it?

Thank you~

Asked by sam on 2012-10-06 02:47:15 UTC

Comments

Answers

Hi,

this looks like an error in your code. Could you post the relevant code snippet? /opt/ros/fuerte/include/pcl-1.5/pcl/io/pcd_io.h:107:7: note: no known conversion for argument 7 from ‘unsigned int’ to ‘int&’ /home/sam/code/ros/recognition/sam_pcl_vfh_matching/src/vfh_matching.cpp:30

  • Julius

Asked by jkammerl on 2012-10-06 19:51:08 UTC

Comments

I use the code on the website I post at first line. I'm not quite understand which code should I post.

Asked by sam on 2012-10-07 16:55:23 UTC