问题:
在GitHub上面找了Hybrid A* Path Planner的代码想试试,但是不管谁家的代码,catkin_make都会有报错如下:
[ 44%] Built target tf_broadcaster
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
再次检测库都装好了,从报错往前看到了这个问题出现多次:
/opt/ros/melodic/include/ompl-1.4/ompl/base/ProjectionEvaluator.h:49:10: fatal error: Eigen/Core: 没有那个文件或目录
#include <Eigen/Core>
^~~~~~~~~~~~
compilation terminated.
解决:
猜测 CMakeLists.txt 文件中无法找到 Eigen 库。在src文件夹下找到可改的CMakeLists.txt(不是只读!),在最后加入两行:
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
然后再次catkin_make,就成功了~