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

    4.2.1自定义服务接口构建功能包出错

    已定时 已固定 已锁定 已移动
    ROS2机器人开发:从入门到实践
    求助 qt
    1
    1
    42
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 因
      因却斯丁
      最后由 编辑

      0b69fcd4-5d42-4264-963d-b7e5cac81090-图片.png ```
      code_text

      sensor_msgs/Image image 
      ---
      int16 number
      float32 use_time
      int32[] top
      int32[] right
      int32[] bottom
      int32[] left
      
      cmake_minimum_required(VERSION 3.8)
      project(chapt4_interfaces)
      
      if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        add_compile_options(-Wall -Wextra -Wpedantic)
      endif()
      
      # find dependencies
      find_package(ament_cmake REQUIRED)
      find_package(sensor_msgs REQUIRED)
      find_package(rosidl_default_generators REQUIRED)
      
      rosidl_generate_interfaces(${PROJECT_NAME}
          "srv/FaceDetector.srv"
          DEPENDENCIES sensor_msgs
      )
      
      if(BUILD_TESTING)
        find_package(ament_lint_auto REQUIRED)
        # the following line skips the linter which checks for copyrights
        # comment the line when a copyright and license is added to all source files
        set(ament_cmake_copyright_FOUND TRUE)
        # the following line skips cpplint (only works in a git repo)
        # comment the line when this package is in a git repo and when
        # a copyright and license is added to all source files
        set(ament_cmake_cpplint_FOUND TRUE)
        ament_lint_auto_find_test_dependencies()
      endif()
      
      ament_package()
      
      
      <?xml version="1.0"?>
      <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
      <package format="3">
        <name>chapt4_interfaces</name>
        <version>0.0.0</version>
        <description>TODO: Package description</description>
        <maintainer email="redfish@foxmail.com">yhy</maintainer>
        <license>Apache-2.0</license>
      
        <buildtool_depend>ament_cmake</buildtool_depend>
        <member_of_group>rosidl_interface_packages</member_of_group>
        <depend>sensor_msgs</depend>
        <depend>rosidl_default_generators</depend>
      
        <test_depend>ament_lint_auto</test_depend>
        <test_depend>ament_lint_common</test_depend>
      
        <export>
          <build_type>ament_cmake</build_type>
        </export>
      </package>
      
      

      求解,一步步跟着教程来的,为什么会出现构建失败的情况

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