zoukankan      html  css  js  c++  java
  • 瓜大无人船踩坑记3

    内容提要:瓜大无人船包编译指南。

    1. 新建工作空间与源文件夹

      mkdir -p [WORKSPACE]/src 
      
    2. 尝试编译

      cd [WORKSPACE]/
      catkin_make
      
    3. 报错

      -- Checking for module 'bullet'
      --   No package 'bullet' found
      CMake Error at mypackage/geometry2/tf2_bullet/CMakeLists.txt:11 (find_package):
        By not providing "Findbullet.cmake" in CMAKE_MODULE_PATH this project has
        asked CMake to find a package configuration file provided by "bullet", but
        CMake did not find one.
      
        Could not find a package configuration file provided by "bullet" with any
        of the following names:
      
          bulletConfig.cmake
          bullet-config.cmake
      
        Add the installation prefix of "bullet" to CMAKE_PREFIX_PATH or set
        "bullet_DIR" to a directory containing one of the above files.  If "bullet"
        provides a separate development package or SDK, be sure it has been
        installed.
      
      
      -- Configuring incomplete, errors occurred!
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeOutput.log".
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeError.log".
      Invoking "cmake" failed
      
    4. 解决

      sudo apt-get install libbullet-dev
      
    5. 继续编译,报错

      -- Checking for one of the modules 'libusb'
      CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:578 (message):
        None of the required 'libusb' found
      Call Stack (most recent call first):
        mypackage/joystick_drivers/ps3joy/CMakeLists.txt:6 (pkg_search_module)
      
      
      CMake Error at mypackage/joystick_drivers/ps3joy/CMakeLists.txt:11 (message):
        Failed to find libusb
      
      
      -- Configuring incomplete, errors occurred!
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeOutput.log".
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeError.log".
      Invoking "cmake" failed
      
    6. 解决

      sudo apt-get install libusb-dev
      
    7. 继续编译,报错

      -- Checking for module 'libgps'
      --   No package 'libgps' found
      CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
        A required package was not found
      Call Stack (most recent call first):
        /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
        mypackage/gps_umd/gpsd_client/CMakeLists.txt:15 (pkg_check_modules)
      
      
      -- Configuring incomplete, errors occurred!
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeOutput.log".
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeError.log".
      Invoking "cmake" failed
      
    8. 解决

      sudo apt-get install libgps-dev
      
    9. 继续编译,报错

      -- +++ processing catkin package: 'robot_localization'
      -- ==> add_subdirectory(mypackage/robot_localization)
      robot_localization: You did not request a specific build type: selecting 'RelWithDebInfo'.
      CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
        Could not find a package configuration file provided by "geographic_msgs"
        with any of the following names:
      
          geographic_msgsConfig.cmake
          geographic_msgs-config.cmake
      
        Add the installation prefix of "geographic_msgs" to CMAKE_PREFIX_PATH or
        set "geographic_msgs_DIR" to a directory containing one of the above files.
        If "geographic_msgs" provides a separate development package or SDK, be
        sure it has been installed.
      Call Stack (most recent call first):
        mypackage/robot_localization/CMakeLists.txt:9 (find_package)
      
      
      -- Could not find the required component 'geographic_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
      CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
        Could not find a package configuration file provided by "geographic_msgs"
        with any of the following names:
      
          geographic_msgsConfig.cmake
          geographic_msgs-config.cmake
      
        Add the installation prefix of "geographic_msgs" to CMAKE_PREFIX_PATH or
        set "geographic_msgs_DIR" to a directory containing one of the above files.
        If "geographic_msgs" provides a separate development package or SDK, be
        sure it has been installed.
      Call Stack (most recent call first):
        mypackage/robot_localization/CMakeLists.txt:9 (find_package)
      
      
      -- Configuring incomplete, errors occurred!
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeOutput.log".
      See also "/home/hans/catkin_boat/build/CMakeFiles/CMakeError.log".
      Invoking "cmake" failed
      
    10. 解决

      sudo apt-get install ros-kinetic-geographic-msgs
      
    11. 继续编译,报错

      [  7%] Building CXX object mypackage/joystick_drivers/joy/CMakeFiles/joy_node.dir/src/joy_node.cpp.o
      cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
      /home/hans/catkin_boat/src/mypackage/joystick_drivers/spacenav_node/src/spacenav_node.cpp:38:19: fatal error: spnav.h: 没有那个文件或目录
      compilation terminated.
      mypackage/joystick_drivers/spacenav_node/CMakeFiles/spacenav_node.dir/build.make:62: recipe for target 'mypackage/joystick_drivers/spacenav_node/CMakeFiles/spacenav_node.dir/src/spacenav_node.cpp.o' failed
      make[2]: *** [mypackage/joystick_drivers/spacenav_node/CMakeFiles/spacenav_node.dir/src/spacenav_node.cpp.o] Error 1
      CMakeFiles/Makefile2:15321: recipe for target 'mypackage/joystick_drivers/spacenav_node/CMakeFiles/spacenav_node.dir/all' failed
      make[1]: *** [mypackage/joystick_drivers/spacenav_node/CMakeFiles/spacenav_node.dir/all] Error 2
      make[1]: *** 正在等待未完成的任务....
      
    12. 解决

      sudo apt-get install libspnav-dev
      
    13. 继续编译,报错

      In file included from /home/hans/catkin_boat/src/mypackage/joystick_drivers/wiimote/src/wiimote_controller.cpp:45:0:
      /home/hans/catkin_boat/src/mypackage/joystick_drivers/wiimote/include/wiimote/wiimote_controller.h:49:53: fatal error: bluetooth/bluetooth.h: 没有那个文件或目录
      compilation terminated.
      mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/build.make:62: recipe for target 'mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/src/wiimote_controller.cpp.o' failed
      make[2]: *** [mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/src/wiimote_controller.cpp.o] Error 1
      CMakeFiles/Makefile2:23860: recipe for target 'mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/all' failed
      make[1]: *** [mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/all] Error 2
      make[1]: *** 正在等待未完成的任务....
      
    14. 解决

      sudo apt-get install libbluetooth-dev
      
    15. 继续编译,报错

      [ 94%] Building CXX object mypackage/geometry2/tf2_ros/CMakeFiles/tf2_ros_buffer_server.dir/src/buffer_server_main.cpp.o
      In file included from /home/hans/catkin_boat/src/mypackage/joystick_drivers/wiimote/src/wiimote_controller.cpp:45:0:
      /home/hans/catkin_boat/src/mypackage/joystick_drivers/wiimote/include/wiimote/wiimote_controller.h:52:35: fatal error: cwiid.h: 没有那个文件或目录
      compilation terminated.
      [ 94%] Linking CXX executable /home/hans/catkin_boat/devel/lib/joy/joy_node
      mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/build.make:62: recipe for target 'mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/src/wiimote_controller.cpp.o' failed
      make[2]: *** [mypackage/joystick_drivers/wiimote/CMakeFiles/wiimote_node.dir/src/wiimote_controller.cpp.o] Error 1
      make[2]: *** 正在等待未完成的任务....
      
    16. 解决

      sudo apt-get install libcwiid-dev
      
    17. 编译完成。

    注意:如果报错

    /home/jcy/catkin_boat/src/mypackage/my_serial_node/src/gps_serial.cpp:7:38: fatal error: my_serial_node/serialmsg.h: 没有那个文件或目录
    /home/jcy/catkin_boat/src/mypackage/my_serial_node/src/talker_ship2.cpp:7:47: fatal error: my_serial_node/PropellerParameter.h: 没有那个文件或目录
    /home/jcy/catkin_boat/src/mypackage/my_serial_node/src/serial3.cpp:7:38: fatal error: my_serial_node/serialmsg.h: 没有那个文件或目录
    compilation terminated.
    compilation terminated.
    compilation terminated.
    /home/jcy/catkin_boat/src/mypackage/my_serial_node/src/talker_ship2u2.cpp:7:47: fatal error: my_serial_node/PropellerParameter.h: 没有那个文件或目录
    compilation terminated.
    mypackage/my_serial_node/CMakeFiles/talker_ship2.dir/build.make:62: recipe for target 'mypackage/my_serial_node/CMakeFiles/talker_ship2.dir/src/talker_ship2.cpp.o' failed
    make[2]: *** [mypackage/my_serial_node/CMakeFiles/talker_ship2.dir/src/talker_ship2.cpp.o] Error 1
    CMakeFiles/Makefile2:10939: recipe for target 'mypackage/my_serial_node/CMakeFiles/talker_ship2.dir/all' failed
    make[1]: *** [mypackage/my_serial_node/CMakeFiles/talker_ship2.dir/all] Error 2
    make[1]: *** 正在等待未完成的任务....
    mypackage/my_serial_node/CMakeFiles/gps_serial.dir/build.make:62: recipe for target 'mypackage/my_serial_node/CMakeFiles/gps_serial.dir/src/gps_serial.cpp.o' failed
    make[2]: *** [mypackage/my_serial_node/CMakeFiles/gps_serial.dir/src/gps_serial.cpp.o] Error 1
    CMakeFiles/Makefile2:10976: recipe for target 'mypackage/my_serial_node/CMakeFiles/gps_serial.dir/all' failed
    make[1]: *** [mypackage/my_serial_node/CMakeFiles/gps_serial.dir/all] Error 2
    mypackage/my_serial_node/CMakeFiles/talker_ship2u2.dir/build.make:62: recipe for target 'mypackage/my_serial_node/CMakeFiles/talker_ship2u2.dir/src/talker_ship2u2.cpp.o' failed
    make[2]: *** [mypackage/my_serial_node/CMakeFiles/talker_ship2u2.dir/src/talker_ship2u2.cpp.o] Error 1
    CMakeFiles/Makefile2:10902: recipe for target 'mypackage/my_serial_node/CMakeFiles/talker_ship2u2.dir/all' failed
    make[1]: *** [mypackage/my_serial_node/CMakeFiles/talker_ship2u2.dir/all] Error 2
    mypackage/my_serial_node/CMakeFiles/serial3.dir/build.make:62: recipe for target 'mypackage/my_serial_node/CMakeFiles/serial3.dir/src/serial3.cpp.o' failed
    make[2]: *** [mypackage/my_serial_node/CMakeFiles/serial3.dir/src/serial3.cpp.o] Error 1
    CMakeFiles/Makefile2:11013: recipe for target 'mypackage/my_serial_node/CMakeFiles/serial3.dir/all' failed
    make[1]: *** [mypackage/my_serial_node/CMakeFiles/serial3.dir/all] Error 2
    Makefile:138: recipe for target 'all' failed
    make: *** [all] Error 2
    Invoking "make -j4 -l4" failed
    

    需要复制并替换include包至[WORKSPACE]/devel中。

  • 相关阅读:
    tigerVNC远程桌面,跨内网
    Nutch 二次开发之parse正文内容
    在一个字符串中找到第一个仅仅出现一次的字符。
    图像处理之霍夫变换(直线检測算法)
    EJB3.0开发环境的搭建
    uestc 250 数位dp(水)
    Matlab画图-非常具体,非常全面
    高性能I/O设计模式Reactor和Proactor
    leetcode第一刷_Path Sum II
    PreTranslateMessage作用和用法
  • 原文地址:https://www.cnblogs.com/letisl/p/14108909.html
Copyright © 2011-2022 走看看