catkin_make时遇到的Cmake错误:mavlinkConfig.cmake
第一次安装成功后运行catkin_make提示错误:
错误提示1:
CMake Error at aerostack_stack/stack/hardware_interface/drivers_platforms/driver_pixhawk/mavros/libmavconn/cmake/Modules/MavrosMavlink.cmake:4 (find_package):
By not providing “Findmavlink.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “mavlink”, but
CMake did not find one.
Could not find a package configuration file provided by “mavlink” with any
of the following names:
mavlinkConfig.cmake
mavlink-config.cmake
从提示看应该是mavlink的依赖无法找到。
解决方法:
sudo apt-get install ros-$ROS_DISTRO-mavlink
解决了这个方法又遇到一个:
错误提示2:
Could not find a package configuration file provided by “opencv_apps” with
any of the following names:
opencv_appsConfig.cmake
opencv_apps-config.cmake
Add the installation prefix of “opencv_apps” to CMAKE_PREFIX_PATH or set
“opencv_apps_DIR” to a directory containing one of the above files. If
“opencv_apps” provides a separate development package or SDK, be sure it
has been installed.
原因还应该是依赖的问题:
解决方法:
sudo apt-get install ros-$ROS_DISTRO-*
安装所有的依赖包,不过比较大要12G的空间,不知道能不能成功,正在下载包中。。。。。。
或者自动寻找需要的依赖包:
rosdep install --from-paths src --ignore-src -r -y
参考链接:https://github.com/Vision4UAV/Aerostack/issues/63