cmake - 在ROS的同一文件夹中编译多个包
问题描述
我有 4 个单独的包:
- https://github.com/catkin/catkin_simple
- https://github.com/ethz-asl/glog_catkin
- https://github.com/ethz-asl/asctec_mav_framework
- 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 工作区或尝试覆盖它们,或者是否有更简单的问题解决方案。
谢谢您的帮助!
解决方案
在一个工作空间内放置多个包是可能的,并且是 ROS 中的一种基本方法。
错误
项目“msf_core”试图找到库“glog”。
告诉 glog 库需要编译但缺少。查看如何安装和使用 GLog并安装 glog
sudo apt install libgoogle-glog-dev
安装库后编译应该是可能的。
推荐阅读
- java - 无法传输工件 org.springframework.boot
- android - 尝试使用 adb 推送/安装 .apk 时出错
- c# - 在 ComboBoxItem 问题的单击事件后,WPF 将 ComboBox 设置为 -1 索引
- amazon-web-services - AWS EMR 立即处理日志在 S3 中的登陆
- pandas - Pandas groupby 内存不足
- android - 在相同布局中使用一个图像视图而不是具有相同宽度和高度的其他图像视图
- r - 为什么更新数据表后数据表中的 R/Shiny 输入无法正常工作?
- delphi - 从 propInfo 获取 TList 类型
- php - 关联数组循环
- javascript - 如何在 chrome/safari 上显示多个谷歌地图信息窗口?