关于前端:ORBslam2安装中的问题和报错

33次阅读

共计 1344 个字符,预计需要花费 4 分钟才能阅读完成。

装置中呈现的报错问题以及解决方案

无奈找到 lib

  • 报错信息

    make[1]: *** Waiting for unfinished jobs....
    collect2: error: ld returned 1 exit status
    CMakeFiles/Stereo.dir/build.make:203: recipe for target '../Stereo' failed
    make[2]: *** [../Stereo] Error 1
    CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/Stereo.dir/all' failed
    make[1]: *** [CMakeFiles/Stereo.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
  • 解决方案

Examples/ROS/ORB_SLAM2/CMakeLists.txt 文件中增加编译信息 -lboost_systema

    set(LIBS 
      ${OpenCV_LIBS} 
      ${EIGEN3_LIBS}
      ${Pangolin_LIBRARIES}
      ${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
      ${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
      ${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
      -lboost_systema ## 增加这一项
  )

无奈找到 ros package 或者 ros

  • 测试形式

        echo $ROS_ROOT
          /opt/ros/melodic/share/ros
        echo $ROS_PACKAGE_PATH
          /opt/ros/melodic/share:/home/test/slam/ORB_SLAM2-master/Examples/ROS/ORB_SLAM2
  • 解决方案

    用户目录的.bashrc 中增加

    # 有程序要求 增加 ros_root path
    source /opt/ros/melodic/setup.bash  
    # 增加 ros_package_path
    export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/test/slam/ORB_SLAM2-master/Examples/ROS/ORB_SLAM2

    利用增加的环境变量
    source ~/.bashrc

编译 pongoline 出错

https://github.com/raulmur/OR…

  • 解决方案

      git clone https://github.com/stevenlovegrove/Pangolin.git
      cd Pangolin
      mkdir build
      cd build
      cmake -DCPP11_NO_BOOST=1 ..
      make -j1
      Then,
      cd ORB_SLAM2
      chmod +x build.sh
      ./build.sh

Resource not found: rgbd_launch

  • 解决方案

      sudo apt-get install ros-melodic-rgbd-launch

正文完
 0