ros相关开发经验

在知乎上看到一篇文章,讲地图分割的,里面提到了一篇论文,这篇论文实现了几种地图分割的方法,所以我就打算clone下来跑一下:
GitHub - ipa320/ipa_coverage_planning: Algorithms for floor plan segmentation and systematic coverage driving patterns

创建工作空间等工作略过了。

开始编译:

catkin_make

 出错了:

-- Could NOT find libdlib (missing: libdlib_DIR)
-- Could not find the required component 'libdlib'. 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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "libdlib" with any
  of the following names:

    libdlibConfig.cmake
    libdlib-config.cmake

  Add the installation prefix of "libdlib" to CMAKE_PREFIX_PATH or set
  "libdlib_DIR" to a directory containing one of the above files.  If
  "libdlib" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  ipa_coverage_planning/ipa_room_segmentation/CMakeLists.txt:25 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

开第一行,找不到libdlib。直接安装libdlib试试:

$ sudo apt install libdlib
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
E: 无法定位软件包 libdlib

无法定位libdlib,有可能这个包根本不叫这个名字,试着找一下:

$ apt-cache search libdlib
libdlib-data - C++ toolkit for machine learning and computer vision - models
libdlib-dev - C++ toolkit for machine learning and computer vision - development
libdlib19 - C++ toolkit for machine learning and computer vision - library
ros-noetic-libdlib - This package wraps the external c++ library dlib (http://dlib.net/) in a ROS package, so other packages can use it.

找到了几个和libdlib相关的包,前三个是关于机器学习和视觉的C++库,最后一个是一个dlib的包,和ros有关,先安装最后一个并再次编译试试:

sudo apt install ros-noetic-libdlib
catkin_make

没在报同样的错误了。但是:

-- Could NOT find opengm (missing: opengm_DIR)
-- Could not find the required component 'opengm'. 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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "opengm" with any
  of the following names:

    opengmConfig.cmake
    opengm-config.cmake

  Add the installation prefix of "opengm" to CMAKE_PREFIX_PATH or set
  "opengm_DIR" to a directory containing one of the above files.  If "opengm"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  ipa_coverage_planning/ipa_room_segmentation/CMakeLists.txt:25 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

这回找不到opengm了,同样的解决方法:

$ apt-cache search opengm
ros-noetic-opengm - This package wraps the external c++ library opengm in a ROS package, so other packages can use it.

找到了,安装,编译,没出同样的错误。

后面还出现了几个catkin_make的错误,都是同样的套路,先找,再安装:

CMake Warning at /opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:166 (message):
  catkin_package() DEPENDS on 'OpenMP' but neither 'OpenMP_INCLUDE_DIRS' nor
  'OpenMP_LIBRARIES' is defined.
Call Stack (most recent call first):
  /opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  ipa_coverage_planning/ipa_room_segmentation/CMakeLists.txt:53 (catkin_package)


-- +++ processing catkin package: 'ipa_room_exploration'
-- ==> add_subdirectory(ipa_coverage_planning/ipa_room_exploration)
-- Could NOT find cob_map_accessibility_analysis (missing: cob_map_accessibility_analysis_DIR)
-- Could not find the required component 'cob_map_accessibility_analysis'. 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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "cob_map_accessibility_analysis" with any of the following names:

    cob_map_accessibility_analysisConfig.cmake
    cob_map_accessibility_analysis-config.cmake

  Add the installation prefix of "cob_map_accessibility_analysis" to
  CMAKE_PREFIX_PATH or set "cob_map_accessibility_analysis_DIR" to a
  directory containing one of the above files.  If
  "cob_map_accessibility_analysis" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  ipa_coverage_planning/ipa_room_exploration/CMakeLists.txt:33 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
-- Could NOT find move_base_msgs (missing: move_base_msgs_DIR)
-- Could not find the required component 'move_base_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/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:

    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

  Add the installation prefix of "move_base_msgs" to CMAKE_PREFIX_PATH or set
  "move_base_msgs_DIR" to a directory containing one of the above files.  If
  "move_base_msgs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  ipa_coverage_planning/ipa_room_exploration/CMakeLists.txt:33 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
-   No package 'coinutils' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
  ipa_coverage_planning/ipa_room_exploration/CMakeLists.txt:71 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/john/room_segmentation_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

这个我去找,发现有几个相似的包,分不清,全安上:

$ apt-cache search coinutils
coinor-libcoinutils-dev - Coin-or collection of utility classes (developer files)
coinor-libcoinutils-doc - Coin-or collection of utility classes (documentation)
coinor-libcoinutils3v5 - Coin-or collection of utility classes (binaries and libraries)
$ sudo apt install coinor*

所有的库都安上了。

且编译成功。

  • 8
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值