您当前的位置: 首页 >  ui
  • 0浏览

    0关注

    483博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

ROS2 + colcon build 常见的一些报错

高精度计算机视觉 发布时间:2022-03-23 22:40:11 ,浏览量:0

(1)colcon build ERROR: Unknown CMake command "rosidl_get_typesupport_target"

demos: GitHub - ros2/demos 

ROS2在demos执行colcon build的时候报错,

> colcon build

--- stderr: logging_demo CMake Error at CMakeLists.txt:34 (rosidl_get_typesupport_target):   Unknown CMake command "rosidl_get_typesupport_target".

原因,

忘记添加版本信息,版本错误。

解决办法,

重新下载,

git clone -b galactic-devel https://github.com/ros2/demos.git

git checkout galactic-devel

--------------------------------------------

(2)colcon build ERROR: Could not find a package configuration file provided by "ament_cmake" with any ...

--- stderr: rclpy CMake Error at CMakeLists.txt:26 (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.

原因,

忘记导入启动信息

解决办法,

call C:\opt\ros\galactic\x64\setup.bat

--------------------------------------------

关注
打赏
1661664439
查看更多评论
立即登录/注册

微信扫码登录

0.0389s