2016年两学一做教育网站,wordpress加速优化,域名查询地址,wordpress悬浮客户文章目录 写在前面一、问题描述二、解决方法参考链接 写在前面
自己的测试环境#xff1a; Ubuntu20.04 ROS-Noetic
一、问题描述
编译程序时出现如下报错#xff1a;
-- Could NOT find roscpp (missing: roscpp_DIR)
-- Could not find the required component roscpp.… 文章目录 写在前面一、问题描述二、解决方法参考链接 写在前面
自己的测试环境 Ubuntu20.04 ROS-Noetic
一、问题描述
编译程序时出现如下报错
-- 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 setroscpp_DIR to a directory containing one of the above files. If roscppprovides a separate development package or SDK, be sure it has beeninstalled.二、解决方法
首先确保自己已经安装了 ros-noetic-roscpp
sudo apt-get install ros-noetic-roscpp然后再次编译看看是否能够解决问题。 如果还是出现同样的报错可以在 CMakeLists.txt 中添加如下语句
set(roscpp_DIR /opt/ros/noetic/share/roscpp/cmake/)然后再次编译再次编译应该能够解决问题。
参考链接
[1] kimi.