问题描述
安装ROS Kinetic包(Ubuntu 16.04),即humanoid_navigation,执行catkin_make时报错。没有这个包,catkin_make 运行不会出错。一切都按照说明完成@L_502_0@
[ 97%] Building CXX object humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o
/home/user/catkin_ws/src/humanoid_navigation/humanoid_localization/src/HumanoidLocalization.cpp:23:42: Fatal error: pcl/filters/uniform_sampling.h: No such file or directory
compilation terminated.
humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/build.make:62: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o' Failed
make[2]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o] Error 1
CMakeFiles/Makefile2:12108: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all' Failed
make[1]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 97%] Linking CXX executable /home/user/catkin_ws/devel/lib/footstep_planner/footstep_planner_node
[ 97%] Built target footstep_planner_node
Makefile:138: recipe for target 'all' Failed
make: *** [all] Error 2
Invoking "make -j2 -l2" Failed
出现这个错误后,在src中从github https://github.com/PointCloudLibrary/pcl安装了pcl,运行catkin make,报错
/home/user/catkin_ws/src/humanoid_navigation/humanoid_localization/src/HumanoidLocalization.cpp:23:42: Fatal error: pcl/filters/uniform_sampling.h: No such file or directory
compilation terminated.
humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/build.make:62: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o' Failed
make[2]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/src/HumanoidLocalization.cpp.o] Error 1
CMakeFiles/Makefile2:12108: recipe for target 'humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all' Failed
make[1]: *** [humanoid_navigation/humanoid_localization/CMakeFiles/humanoidlocalization.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
请帮忙!
解决方法
您最近是否终止/中断了任何构建?这可能是因为目标代码没有成功生成。一种方法是清除 build 和 devel 文件夹与包的关联内容,然后重新构建。
更新!!! 所以我复制了你的问题并按照我的步骤来解决它们。就我而言,我的 ros_control 包和 pcl 有问题。不是它的工作原理。干杯!!!
[100%] Linking CXX executable
/home/aadi/catkin_ws/devel/lib/robot_state_publisher/state_publisher
[100%] Built target joint_state_listener
[100%] Built target state_publisher
[100%] Built target robot_state_publisher
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed