一、問題描述
自己編譯 Autoware 的時候遇到如下問題:
CMake Error at CMakeLists.txt:4 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "catkin", but
CMake did not find one.
Could not find a package configuration file provided by "catkin" with any
of the following names:
catkinConfig.cmake
catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
"catkin_DIR" to a directory containing one of the above files. If "catkin"
provides a separate development package or SDK, be sure it has been
installed.
二、參考解決方法
(這裡隻給出參考解決方法,主要原因是自己不是很确定就是通過這種方法來解決的這個問題。)
系統缺少 catkin 這個包,直接安裝就可以。
sudo apt-get install ros-melodic-catkin
注意,還是沒有作用,不建議執行
sudo apt-get remove ros-melodic-catkin
,因為這條指令會把你電腦的 ROS 解除安裝掉。别問我是怎麼知道的…