关于使用colcon build构建失败的问题:
---
Failed <<< learning_pkg_c [1.37s, exited with code 1]
--- stderr: learning_parameter_cpp
CMake Error at CMakeLists.txt:9 (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.
检查了环境变量
akang-211@aichijiaozideakang:~/dev_ws$ env | grep -E 'AMENT|ROS|CMAKE|PYTHON'
ROS_VERSION=2
ROS_PYTHON_VERSION=3
AMENT_PREFIX_PATH=/opt/ros/humble
CMAKE_PREFIX_PATH=/opt/ros/humble:
PYTHONPATH=/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages::/mnt/e/python/Lib/site-packages/moltemplate
CONDA_PYTHON_EXE=/home/akang-211/anaconda3/bin/python
ROS_LOCALHOST_ONLY=0
ROS_DISTRO=humble
也source了, source /opt/ros/humble/setup.bash,但一直解决不了。