首页 > 解决方案 > 在ROS的同一文件夹中编译多个包

问题描述

我有 4 个单独的包:

  1. https://github.com/catkin/catkin_simple
  2. https://github.com/ethz-asl/glog_catkin
  3. https://github.com/ethz-asl/asctec_m​​av_framework
  4. https://github.com/ethz-asl/ethzasl_msf

我将它们保存在主文件夹中并尝试使用 catkin_make 编译它们并得到以下 cmake 错误:CMake Error at devel/share/glog_catkin/cmake/glog_catkinConfig.cmake:148(消息):

  Project 'msf_core' tried to find library 'glog'.  The library is neither a
  target nor built/installed properly.  Did you compile project
  'glog_catkin'? Did you find_package() it before the subdirectory containing
  its code is included?
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  ethzasl_msf/msf_core/CMakeLists.txt:17 (find_package)


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

所以我尝试单独编译它们。在编译其中一个并尝试编译其他之后,我收到以下错误:

CMake Error: The source "/home/yukti/Desktop/MSF_PACKAGE/asctec_mav_framework-master/CMakeLists.txt" does not match the source "/home/yukti/Desktop/MSF_PACKAGE/catkin_simple-master/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.
Invoking "cmake" failed

我尝试的另一件事是创建多个文件夹,分别存储每个包并编译它们。我仍然未能使其工作。

我无法确定是否需要创建多个 catkin 工作区或尝试覆盖它们,或者是否有更简单的问题解决方案。

谢谢您的帮助!

标签: cmakecommand-line-interfaceubuntu-16.04roscatkin

解决方案


在一个工作空间内放置多个包是可能的,并且是 ROS 中的一种基本方法。

错误

项目“msf_core”试图找到库“glog”。

告诉 glog 库需要编译但缺少。查看如何安装和使用 GLog并安装 glog

sudo apt install libgoogle-glog-dev

安装库后编译应该是可能的。


推荐阅读