背景:
按照动手学ros2的教程,源码编译carto
问题描述:
我在按照步骤走到colcon build的时候,出现了报错
具体细节和上下文:
fishros@fishros-linux:/home/fishbot_ws$ sudo colcon build --packages-up-to cartographer_ros
Starting >>> cartographer
Starting >>> cartographer_ros_msgs
--- stderr: cartographer_ros_msgs
CMake Error at CMakeLists.txt:30 (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.
Failed <<< cartographer_ros_msgs [0.02s, exited with code 1]
Aborted <<< cartographer [35.5s]
Summary: 0 packages finished [35.6s]
1 package failed: cartographer_ros_msgs
1 package aborted: cartographer
1 package had stderr output: cartographer_ros_msgs
1 package not processed
尝试过的解决方法:
在工作空间中source了,还是这个错误