在 ROS 中的同一文件夹中编译多个包
Compiling multiple packages in same folder in 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 错误:
devel/share/glog_catkin/cmake/glog_catkinConfig.cmake:148(消息)处的 CMake 错误:
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 中的基本方法。
错误
Project 'msf_core' tried to find library 'glog'.
表示需要 glog 库进行编译但缺少。查看 How to install and use GLog 并像
安装 glog
sudo apt install libgoogle-glog-dev
安装库编译后应该可以了
我有 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 错误: devel/share/glog_catkin/cmake/glog_catkinConfig.cmake:148(消息)处的 CMake 错误:
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 中的基本方法。
错误
Project 'msf_core' tried to find library 'glog'.
表示需要 glog 库进行编译但缺少。查看 How to install and use GLog 并像
安装 glogsudo apt install libgoogle-glog-dev
安装库编译后应该可以了