c++ - Catkin构建中的错误找不到软件包 “numpy_eigen”

标签 c++ numpy build eigen catkin

最初的评论引导我通过,直到出现以下错误
运行sudo apt install libeigen3-dev后出现新错误

    CMake Error at rpg_emvs/mapper_emvs/CMakeLists.txt:16 (find_package):
  By not providing "FindEigen.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Eigen", but
  CMake did not find one.

  Could not find a package configuration file provided by "Eigen" with any of
  the following names:

EigenConfig.cmake
eigen-config.cmake

  Add the installation prefix of "Eigen" to CMAKE_PREFIX_PATH or set
  "Eigen_DIR" to a directory containing one of the above files.  If "Eigen"
  provides a separate development package or SDK, be sure it has been
  installed.
这是Cmakelists.txt文件
project(mapper_emvs)
cmake_minimum_required(VERSION 2.8.3)

find_package(catkin_simple REQUIRED)
catkin_simple(ALL_DEPS_REQUIRED)

find_package(Eigen REQUIRED)
find_package(Boost REQUIRED system filesystem date_time thread)
#Setting include, lib directories and definitions 
include_directories(${${Boost_INCLUDE_DIR} ${EIGEN_INCLUDE_DIRS}})
我应该尝试评论本征添加包部分吗?
更新CMAKE文件后出现新错误
/home/ubuntu/emvs_ws/src/numpy_eigen/include/numpy_eigen/boost_python_headers.hpp:23:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.
仅构建numpy_eigen后发生错误
-- verifying file...
       file='/home/ubuntu/emvs_ws/build/eigen_catkin/eigen_src-prefix/src/3.3.4.tar.bz2'
-- MD5 hash of
    /home/ubuntu/emvs_ws/build/eigen_catkin/eigen_src-prefix/src/3.3.4.tar.bz2
  does not match expected value
    expected: 'a7aab9f758249b86c93221ad417fbe18'
      actual: 'd41d8cd98f00b204e9800998ecf8427e'
-- File already exists but hash mismatch. Removing...
-- Downloading...
   dst='/home/ubuntu/emvs_ws/build/eigen_catkin/eigen_src-prefix/src/3.3.4.tar.bz2'
   timeout='none'
-- Using src='http://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2'
[ 13%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_float.cpp.o
[ 13%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/numpy_eigen_test_module.cpp.o
[ 18%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_double.cpp.o
[ 22%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_uchar.cpp.o
[ 27%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_int.cpp.o
[ 31%] Building CXX object numpy_eigen/CMakeFiles/numpy_eigen_test.dir/src/autogen_test_module/test_long.cpp.o
/home/ubuntu/emvs_ws/src/numpy_eigen/src/autogen_test_module/test_uchar.cpp:1:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.
/home/ubuntu/emvs_ws/src/numpy_eigen/src/autogen_test_module/test_float.cpp:1:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.

最佳答案

您可以下载并保存在/home/ubuntu/emvs_ws/src(假设这是您的ros工作区)文件夹中,并与需要numpy_eigen的其他软件包一起编译。

cd /home/ubuntu/emvs_ws/src
git clone https://github.com/ethz-asl/numpy_eigen.git
cd ../
catkin_make 
我猜最好用catkin_make代替catkin build,因为那些软件包在catkin build中会出现奇怪的错误。另外,如果此程序包依赖于catkin_simple,则如果您没有catkin_simple,则将该存储库克隆到src中,然后尝试执行catkin_make。

关于c++ - Catkin构建中的错误找不到软件包 “numpy_eigen”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63283151/

相关文章:

ios - Xcode 构建问题

c# - 什么决定了 C++ 中的字符编码

python - 基于索引的python列表中的优雅切片

python - 如何找到 pandas 时间序列的最后一个局部最大值?

python - Matplotlib 中函数区域下数据的散点图着色

javascript - 配置vscode任务在parcel watch后复制文件

java - Gradle 覆盖默认检查任务

c++ - 其他类型的 "const"?

c++ - 错误 C2338: !boost::is_integral<T>::value with boost

c++ - 在 clang 插件中,如何查看编译翻译单元是否出错?