zoukankan      html  css  js  c++  java
  • rtabmap and rtabmap_ros make error(rtabmap编译错误)

    Build from source following README.nd in rtabmap_ros

    rtabmap make error

    Error 1

    make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpng.so', needed by '../bin/rtabmap-extractObject'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    
    make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpng.so', needed by '../bin/librtabmap_core.so.0.19.1'.  Stop.
    CMakeFiles/Makefile2:1586: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed
    make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    ^Ctools/ExtractObject/CMakeFiles/extractObject.dir/build.make:62: recipe for target 'tools/ExtractObject/CMakeFiles/extractObject.dir/main.cpp.o' failed
    make[2]: *** [tools/ExtractObject/CMakeFiles/extractObject.dir/main.cpp.o] Interrupt
    CMakeFiles/Makefile2:1970: recipe for target 'tools/ExtractObject/CMakeFiles/extractObject.dir/all' failed
    make[1]: *** [tools/ExtractObject/CMakeFiles/extractObject.dir/all] Interrupt
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Interrupt
    

    Solution 1

    locate libpng.so

    stat /usr/lib/x86_64-linux-gnu/libpng.so

    Of course the file exist.

    Output:

    File: 'libpng.so' -> 'libpng12.so'
    Size: 11        	Blocks: 0          IO Block: 4096   symbolic link
    Device: 816h/2070d	Inode: 6296757     Links: 1
    Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
    Access: 2019-04-04 10:09:50.543715873 +0800
    Modify: 2019-04-04 10:09:50.539715795 +0800
    Change: 2019-04-04 10:09:50.539715795 +0800
     Birth: -
    

    Copy another libpng.so file from my laptop. Problem fixed.


    Error 2

    make -j4
    [  4%] Built target rtabmap_utilite
    [  5%] Built target res_tool
    [  5%] Built target imagesJoiner
    [  6%] Built target extractObject
    [ 42%] Built target rtabmap_core
    [ 42%] Linking CXX executable ../../../bin/rtabmap-stereoEval
    [ 42%] Linking CXX executable ../../../bin/rtabmap-console
    [ 43%] Linking CXX executable ../../../bin/rtabmap-camera
    [ 82%] Built target rtabmap_gui
    [ 82%] Linking CXX executable ../../../bin/rtabmap-kitti_dataset
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_pinv'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_post'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_calloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_malloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_nfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_spfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_etree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_symperm'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_schol'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_cumsum'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_sfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_amd'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_free'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_counts'
    collect2: error: ld returned 1 exit status
    tools/ConsoleApp/CMakeFiles/consoleApp.dir/build.make:741: recipe for target '../bin/rtabmap-console' failed
    make[2]: *** [../bin/rtabmap-console] Error 1
    CMakeFiles/Makefile2:1860: recipe for target 'tools/ConsoleApp/CMakeFiles/consoleApp.dir/all' failed
    make[1]: *** [tools/ConsoleApp/CMakeFiles/consoleApp.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_pinv'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_calloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_etree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_symperm'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_schol'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_cumsum'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_amd'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_free'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_post'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_malloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_nfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_spfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_sfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_counts'
    collect2: error: ld returned 1 exit status
    tools/Camera/CMakeFiles/camera.dir/build.make:741: recipe for target '../bin/rtabmap-camera' failed
    make[2]: *** [../bin/rtabmap-camera] Error 1
    CMakeFiles/Makefile2:2026: recipe for target 'tools/Camera/CMakeFiles/camera.dir/all' failed
    make[1]: *** [tools/Camera/CMakeFiles/camera.dir/all] Error 2
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_pinv'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_post'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_calloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_malloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_nfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_spfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_etree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_symperm'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_schol'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_cumsum'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_sfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_amd'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_free'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_counts'
    collect2: error: ld returned 1 exit status
    tools/KittiDataset/CMakeFiles/kitti_dataset.dir/build.make:741: recipe for target '../bin/rtabmap-kitti_dataset' failed
    make[2]: *** [../bin/rtabmap-kitti_dataset] Error 1
    CMakeFiles/Makefile2:2138: recipe for target 'tools/KittiDataset/CMakeFiles/kitti_dataset.dir/all' failed
    make[1]: *** [tools/KittiDataset/CMakeFiles/kitti_dataset.dir/all] Error 2
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_pinv'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_calloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_etree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_symperm'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_schol'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::writeCs2Octave(char const*, cs_sparse const*, bool)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_cumsum'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_amd'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_chol_workspace(cs_sparse const*, cs_symbolic const*, int*, double*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_free'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_post'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_malloc'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_nfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_spfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `g2o::csparse_extension::cs_cholsolsymb(cs_sparse const*, double*, cs_symbolic const*, double*, int*)'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_sfree'
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `cs_counts'
    collect2: error: ld returned 1 exit status
    tools/StereoEval/CMakeFiles/stereoEval.dir/build.make:741: recipe for target '../bin/rtabmap-stereoEval' failed
    make[2]: *** [../bin/rtabmap-stereoEval] Error 1
    CMakeFiles/Makefile2:2082: recipe for target 'tools/StereoEval/CMakeFiles/stereoEval.dir/all' failed
    make[1]: *** [tools/StereoEval/CMakeFiles/stereoEval.dir/all] Error 2
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Solution 2

    Clear the cache

    $ cd rtabmap/build
    $ rm CMakeCache.txt
    $ cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel ..
    

    Then remove directory EXTERNAL in /usr/local/include

    $ sudo rm -rf /usr/local/include/EXTERNAL


    Error 3

    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    collect2: error: ld returned 1 exit status
    tools/ConsoleApp/CMakeFiles/consoleApp.dir/build.make:741: recipe for target '../bin/rtabmap-console' failed
    make[2]: *** [../bin/rtabmap-console] Error 1
    CMakeFiles/Makefile2:1910: recipe for target 'tools/ConsoleApp/CMakeFiles/consoleApp.dir/all' failed
    make[1]: *** [tools/ConsoleApp/CMakeFiles/consoleApp.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    collect2: error: ld returned 1 exit status
    tools/Camera/CMakeFiles/camera.dir/build.make:741: recipe for target '../bin/rtabmap-camera' failed
    make[2]: *** [../bin/rtabmap-camera] Error 1
    CMakeFiles/Makefile2:2096: recipe for target 'tools/Camera/CMakeFiles/camera.dir/all' failed
    make[1]: *** [tools/Camera/CMakeFiles/camera.dir/all] Error 2
    ../../../bin/librtabmap_core.so.0.19.1: undefined reference to `loam::MultiScanMapper::getRingForAngle(float const&)'
    collect2: error: ld returned 1 exit status
    tools/StereoEval/CMakeFiles/stereoEval.dir/build.make:741: recipe for target '../bin/rtabmap-stereoEval' failed
    make[2]: *** [../bin/rtabmap-stereoEval] Error 1
    CMakeFiles/Makefile2:2162: recipe for target 'tools/StereoEval/CMakeFiles/stereoEval.dir/all' failed
    make[1]: *** [tools/StereoEval/CMakeFiles/stereoEval.dir/all] Error 2
    [ 80%] Built target rtabmap_gui
    Makefile:149: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Solution 3

    ** reinstall the new version of loam_velodyne **

    $ cd ~/catkin_ws/src/
    $ git clone https://github.com/laboshinl/loam_velodyne.git
    $ cd ~/catkin_ws
    $ catkin_make -DCMAKE_BUILD_TYPE=Release 
    $ source ~/catkin_ws/devel/setup.bash
    
    • Referrence: (Installation problem for last version of RTAB-Map with loam_velodyne (not in ROS) in Ubuntu 16.04:loam::MultiScanMapper::getRingForAngle(float const&)Undefined references #321)[https://github.com/introlab/rtabmap/issues/321]

    catkin_make error

    Error 4

    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/MsgConversion.cpp: In function ‘void rtabmap_ros::nodeDataToROS(const rtabmap::Signature&, rtabmap_ros::NodeData&)’:
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/MsgConversion.cpp:939:71: error: ‘const class rtabmap::LaserScan’ has no member named ‘maxRange’
      msg.laserScanMaxRange = signature.sensorData().laserScanCompressed().maxRange();
                                                                           ^
    rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/build.make:486: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/MsgConversion.cpp.o' failed
    make[2]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/MsgConversion.cpp.o] Error 1
    CMakeFiles/Makefile2:7795: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Solution 4

    $ gedit /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/MsgConversion.cpp

    modifiy ** maxRange ** to ** rangeMax **.

    • Why I can solve this?*
    1. Look for “maxRange” in the directory “~/catkin_ws/devel/include/rtabmap-0.19/rtabmap/core”

    grep -rn * -ie maxRange

    LaserScan.h:61:			int maxRange = 0,
    LaserScan.h:66:			float maxRange,
    LaserScan.h:76:			float maxRange,
    LaserScan.h:82:			float maxRange,
    OctoMap.h:214:	void setMaxRange(float value) {rangeMax_ = value;}
    util3d_mapping.h:52:		float scanMaxRange = 0.0f), "Use interface with "viewpoint" parameter to make sure the ray tracing origin is from the sensor and not the base.");
    util3d_mapping.h:61:		float scanMaxRange = 0.0f), "Use interface with scanHit/scanNoHit parameters: scanNoHit set to null matrix has the same functionality than this method.");
    util3d_mapping.h:71:		float scanMaxRange = 0.0f); // would be set if unknownSpaceFilled=true
    util3d_mapping.h:90:		float scanMaxRange = 0.0f), "Use interface with "viewpoints" parameter to make sure the ray tracing origin is from the sensor and not the base.");
    util3d_mapping.h:100:		float scanMaxRange = 0.0f), "Use interface with cv::Mat scans.");
    util3d_mapping.h:110:		float scanMaxRange = 0.0f); // would be set if unknownSpaceFilled=true
    

    and in "~/catkin_ws/src/rtabmap_ros-kinetic-devel"

    msg/NodeData.msg:40:float32 laserScanMaxRange
    src/MsgConversion.cpp:880:							msg.laserScanMaxRange,
    src/MsgConversion.cpp:892:							msg.laserScanMaxRange,
    src/MsgConversion.cpp:939:	msg.laserScanMaxRange = signature.sensorData().laserScanCompressed().maxRange();
    

    Obviously, there is nothing related to maxRange. So We can see another same file MsgConversion.cpp in branch * "master" *. Search for * " signature.sensorData().laserScanCompressed() " *, and we can see it's rangeMax() but not maxRange()


    Error 5

    /home/william/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp: In member function ‘std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(const std::map<int, rtabmap::Transform>&, const rtabmap::Memory*, bool, bool, const std::map<int, rtabmap::Signature>&)’:
    /home/william/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:713:17: error: void value not ignored as it ought to be
        gridUpdated_ = occupancyGrid_->update(filteredPoses);
                     ^
    /home/william/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:721:20: error: void value not ignored as it ought to be
        octomapUpdated_ = octomap_->update(filteredPoses);
                        ^
    rtabmap_ros/CMakeFiles/rtabmap_ros.dir/build.make:86: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/MapsManager.cpp.o' failed
    make[2]: *** [rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/MapsManager.cpp.o] Error 1
    CMakeFiles/Makefile2:7883: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    Invoking "make -j1" failed
    
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp: In member function ‘void rtabmap_ros::CoreWrapper::publishStats(const ros::Time&)’:
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2604:10: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
        stats.getSignatures(),
              ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2630:36: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
       if(stats.poses().size() && stats.getSignatures().size())
                                        ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2639:60: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
        for(std::map<int, Signature>::const_iterator iter=stats.getSignatures().begin();
                                                                ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2640:17: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
         iter!=stats.getSignatures().end();
                     ^
    rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/build.make:558: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/CoreWrapper.cpp.o' failed
    make[2]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/CoreWrapper.cpp.o] Error 1
    CMakeFiles/Makefile2:7795: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp: In member function ‘void rtabmap_ros::CoreWrapper::publishStats(const ros::Time&)’:
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2604:10: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
        stats.getSignatures(),
              ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2630:36: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
       if(stats.poses().size() && stats.getSignatures().size())
                                        ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2639:60: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
        for(std::map<int, Signature>::const_iterator iter=stats.getSignatures().begin();
                                                                ^
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/CoreWrapper.cpp:2640:17: error: ‘const class rtabmap::Statistics’ has no member named ‘getSignatures’
         iter!=stats.getSignatures().end();
                     ^
    rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/build.make:558: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/CoreWrapper.cpp.o' failed
    make[2]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/CoreWrapper.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    ^CTraceback (most recent call last):
      File "/opt/ros/kinetic/bin/catkin_make", line 296, in <module>
        sys.exit(main())
      File "/opt/ros/kinetic/bin/catkin_make", line 240, in main
        run_command(cmd, make_path)
      File "/opt/ros/kinetic/lib/python2.7/dist-packages/catkin/builder.py", line 239, in run_command
    make[2]: *** wait: No child processes.  Stop.
    CMakeFiles/Makefile2:7795: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Interrupt
        proc.wait()
      File "/usr/lib/python2.7/subprocess.py", line 1392, in wait
        pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
      File "/usr/lib/python2.7/subprocess.py", line 476, in _eintr_retry_call
        return func(*args)
    

    Solution 5 * ( in a weird way ) *

    ** Replace the source file from another one which had been built completely successful.**


    Error 6

    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/rgbd_sync'.  Stop.
    CMakeFiles/Makefile2:6324: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_rgbd_sync.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_rgbd_sync.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/icp_odometry'.  Stop.
    CMakeFiles/Makefile2:6361: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_icp_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_icp_odometry.dir/all] Error 2
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/rgbdicp_odometry'.  Stop.
    CMakeFiles/Makefile2:6398: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_rgbdicp_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_rgbdicp_odometry.dir/all] Error 2
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/stereo_odometry'.  Stop.
    CMakeFiles/Makefile2:6435: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_stereo_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_stereo_odometry.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    Invoking "make VERBOS=1 -j4 -l4" failed
    
    Scanning dependencies of target rtabmap_rgbd_sync
    Scanning dependencies of target rtabmap_icp_odometry
    [ 15%] Built target _rtabmap_ros_generate_messages_check_deps_Link
    Scanning dependencies of target rtabmap_rgbdicp_odometry
    Scanning dependencies of target rtabmap_stereo_odometry
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/rgbd_sync'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    [ 15%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_rgbd_sync.dir/src/RGBDSyncNode.cpp.o
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/rgbdicp_odometry'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/icp_odometry'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    [ 16%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_icp_odometry.dir/src/ICPOdometryNode.cpp.o
    [ 17%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_rgbdicp_odometry.dir/src/RGBDICPOdometryNode.cpp.o
    make[2]: *** No rule to make target '/usr/local/lib/libpcl_kdtree.so', needed by '/home/william/catkin_ws/devel/lib/rtabmap_ros/stereo_odometry'.  Stop.
    make[2]: *** Waiting for unfinished jobs....
    [ 17%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_stereo_odometry.dir/src/StereoOdometryNode.cpp.o
    CMakeFiles/Makefile2:6324: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_rgbd_sync.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_rgbd_sync.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    CMakeFiles/Makefile2:6361: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_icp_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_icp_odometry.dir/all] Error 2
    CMakeFiles/Makefile2:6398: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_rgbdicp_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_rgbdicp_odometry.dir/all] Error 2
    CMakeFiles/Makefile2:6435: recipe for target 'rtabmap_ros/CMakeFiles/rtabmap_stereo_odometry.dir/all' failed
    make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_stereo_odometry.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Solution 6

    Copy the whole lib files in the directory of * pcl * to * /usr/local/lib * .


    Error 7

    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/OdometryROS.cpp:40:38: fatal error: rtabmap/core/OdometryF2M.h: No such file or directory
    compilation terminated.
    rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/build.make:462: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/OdometryROS.cpp.o' failed
    make[2]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/OdometryROS.cpp.o] Error 1
    CMakeFiles/Makefile2:7795: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    Invoking "make -j1" failed
    
    /home/william/catkin_ws/src/rtabmap_ros-kinetic-devel/src/OdometryROS.cpp:41:38: fatal error: rtabmap/core/OdometryF2F.h: No such file or directory
    compilation terminated.
    rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/build.make:462: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/OdometryROS.cpp.o' failed
    make[2]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/src/OdometryROS.cpp.o] Error 1
    CMakeFiles/Makefile2:7795: recipe for target 'rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all' failed
    make[1]: *** [rtabmap_ros-kinetic-devel/CMakeFiles/rtabmap_ros.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    Invoking "make -j1" failed
    

    Solution 7

    $ cd /home/william/catkin_ws/devel/include/rtabmap-0.19/rtabmap/core/
    $ sudo cp /home/william/Documents/program_files/rtabmap/corelib/include/rtabmap/core/odometry/OdometryF2M.h OdometryF2M.h
    $ sudo cp /home/william/Documents/program_files/rtabmap/corelib/include/rtabmap/core/odometry/OdometryF2F.h OdometryF2F.h
    

    Error 8

    [ 32%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/odometry/OdometryVINS.cpp.o
    /home/william/rtabmap/corelib/src/odometry/OdometryVINS.cpp:39:33: fatal error: estimator/estimator.h: No such file or directory
    compilation terminated.
    corelib/src/CMakeFiles/rtabmap_core.dir/build.make:1795: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/odometry/OdometryVINS.cpp.o' failed
    make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/odometry/OdometryVINS.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    CMakeFiles/Makefile2:2386: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed
    make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Solution 8

  • 相关阅读:
    2020.5.28.第十三周java上机练习
    2020.5.22第十二周java作业
    2020.5.21.第十二周java上机练习
    2020.5.15.java第十一周作业
    2020.5.14.第十一周上机练习
    leetcode02大数相加
    leetcode算法题01
    近期wxss总结
    近期Freecodecamp问题总结
    freecodecamp数字转化成罗马数字
  • 原文地址:https://www.cnblogs.com/linweilin/p/10653859.html
Copyright © 2011-2022 走看看