深圳做網(wǎng)站設(shè)計公司營銷策略包括哪些內(nèi)容
文章目錄
- 寫在前面
- 一、問題描述
- 二、解決方法
- 參考鏈接
寫在前面
自己的測試環(huán)境:
Ubuntu20.04
ROS-Noetic
一、問題描述
編譯程序時出現(xiàn)如下報錯:
-- Could NOT find roscpp (missing: roscpp_DIR)
-- Could not find the required component 'roscpp'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):Could not find a package configuration file provided by "roscpp" with anyof the following names:roscppConfig.cmakeroscpp-config.cmakeAdd the installation prefix of "roscpp" to CMAKE_PREFIX_PATH or set"roscpp_DIR" to a directory containing one of the above files. If "roscpp"provides a separate development package or SDK, be sure it has beeninstalled.
二、解決方法
首先,確保自己已經(jīng)安裝了 ros-noetic-roscpp
sudo apt-get install ros-noetic-roscpp
然后再次編譯,看看是否能夠解決問題。
如果還是出現(xiàn)同樣的報錯,可以在 CMakeLists.txt
中添加如下語句:
set(roscpp_DIR "/opt/ros/noetic/share/roscpp/cmake/")
然后再次編譯,再次編譯,應(yīng)該能夠解決問題。
參考鏈接
[1] kimi.