鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    4.2.1自定义服务接口,执行colcon build报错

    已定时 已固定 已锁定 已移动
    ROS 2相关问题
    ros2 自定义服务接口
    1
    1
    320
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • H
      hunter
      最后由 hunter 编辑

      报错内容如下:
      ~/chapt4/chapt4_ws$ colcon build
      Starting >>> chapt4_interfaces
      --- stderr: chapt4_interfaces
      CMake Error at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:20 (find_package):
      By not providing "FindPythonInterp.cmake" in CMAKE_MODULE_PATH this project
      has asked CMake to find a package configuration file provided by
      "PythonInterp", but CMake did not find one.

      Could not find a package configuration file provided by "PythonInterp"
      (requested version 3.6) with any of the following names:

      PythonInterpConfig.cmake
      pythoninterp-config.cmake
      

      Add the installation prefix of "PythonInterp" to CMAKE_PREFIX_PATH or set
      "PythonInterp_DIR" to a directory containing one of the above files. If
      "PythonInterp" provides a separate development package or SDK, be sure it
      has been installed.
      Call Stack (most recent call first):
      /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
      /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
      CMakeLists.txt:13 (rosidl_generate_interfaces)

      gmake: *** [Makefile:747:cmake_check_build_system] 错误 1

      Failed <<< chapt4_interfaces [1.72s, exited with code 2]

      Summary: 0 packages finished [1.81s]
      1 package failed: chapt4_interfaces
      1 package had stderr output: chapt4_interfaces

      开始提示Cmake版本<3.10怎么怎么的,于是我就改了CmakeList文件中第一行为:
      cmake_minimum_required(VERSION 4.0)
      就有了上面的报错,请问怎么处理?

      1 条回复 最后回复 回复 引用 0
      • 第一个帖子
        最后一个帖子
      皖ICP备16016415号-7
      Powered by NodeBB | 鱼香ROS