跟着ROS2入门篇教程做ROS2构建工具之Colcon时报错
-
在colcon build那一步报错,但是ament_cmake明明就在opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake下面,这该怎么办呢?错误信息如下:
CMake Error at CMakeLists.txt:13 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.Could not find a package configuration file provided by "ament_cmake" with
any of the following names:ament_cmakeConfig.cmake ament_cmake-config.cmake
Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
"ament_cmake_DIR" to a directory containing one of the above files. If
"ament_cmake" provides a separate development package or SDK, be sure it
has been installed. -
-