问题一:
在ROS工作空间执行catkin_make命令的时候遇到如下问题:
The specified base path "/home/hl/catkin_AGV" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace
解决方法记录如下:
unlink /home/hl/catkin_AGV/CMakeLists.txt
问题二:
Could not find a package configuration file provided by "OpenCV" with any
of the following names:
OpenCVConfig.cmake
opencv-config.cmake
Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
"OpenCV_DIR" to a directory containing one of the above files. If "OpenCV"
provides a separate development package or SDK, be sure it has been
installed.
解决方法:
在find_package(OpenCV) 之前加上OpenCVConfig.cmake或者opencv-config.cmake所在文件的路径:
set(OpenCV_DIR /usr/share/OpenCV/)
本文解决了在ROS环境中使用catkin_make命令时遇到的两个常见问题:一是执行目录错误,通过删除不当的CMakeLists.txt文件解决;二是找不到OpenCV配置文件,通过设置正确的OpenCV_DIR路径解决。
1万+

被折叠的 条评论
为什么被折叠?



