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

    编译NAV2出现的错误 是怎么回事,ROS2 humble

    已定时 已固定 已锁定 已移动
    Nav2
    下载的有关nav2包编译出错 ros2 nav2
    2
    3
    603
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 1577630951
      /yiw
      最后由 编辑

      git clone https://ghproxy.com/https://github.com/ros-planning/navigation2.git -b foxy-devel 是不是下载的版本错了

      wu@wu-virtual-machine:~/nav/src$ colcon build --packages-up-to navigation2
      [1.162s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
      'nav2_common' is in: /opt/ros/humble
      'nav2_util' is in: /opt/ros/humble
      'nav2_map_server' is in: /opt/ros/humble
      'nav2_navfn_planner' is in: /opt/ros/humble
      'navigation2' is in: /opt/ros/humble
      'nav2_controller' is in: /opt/ros/humble
      'nav2_core' is in: /opt/ros/humble
      'nav_2d_utils' is in: /opt/ros/humble
      'nav2_amcl' is in: /opt/ros/humble
      'nav2_lifecycle_manager' is in: /opt/ros/humble
      'nav2_costmap_2d' is in: /opt/ros/humble
      'nav2_planner' is in: /opt/ros/humble
      'nav2_behavior_tree' is in: /opt/ros/humble
      'nav_2d_msgs' is in: /opt/ros/humble
      'nav2_regulated_pure_pursuit_controller' is in: /opt/ros/humble
      'nav2_msgs' is in: /opt/ros/humble
      If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
      If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

      If you understand the risks and want to override a package anyways, add the following to the command line:
      --allow-overriding nav2_amcl nav2_behavior_tree nav2_common nav2_controller nav2_core nav2_costmap_2d nav2_lifecycle_manager nav2_map_server nav2_msgs nav2_navfn_planner nav2_planner nav2_regulated_pure_pursuit_controller nav2_util nav_2d_msgs nav_2d_utils navigation2

      This may be promoted to an error in a future release of colcon-override-check.
      Starting >>> nav2_common
      Starting >>> nav_2d_msgs
      Finished <<< nav2_common [1.36s]
      Starting >>> nav2_msgs
      Finished <<< nav_2d_msgs [2.51s]
      Starting >>> nav2_voxel_grid
      Finished <<< nav2_voxel_grid [0.48s]
      Starting >>> dwb_msgs
      Finished <<< nav2_msgs [3.57s]
      Starting >>> nav2_util
      Finished <<< dwb_msgs [2.01s]
      --- stderr: nav2_util
      In file included from /home/wu/nav/src/navigation2/nav2_util/include/nav2_util/geometry_utils.hpp:24,
      from /home/wu/nav/src/navigation2/nav2_util/src/costmap.cpp:19:
      /opt/ros/humble/include/tf2_geometry_msgs/tf2_geometry_msgs/tf2_geometry_msgs.h:35:2: error: #warning This header is obsolete, please include tf2_geometry_msgs/tf2_geometry_msgs.hpp instead [-Werror=cpp]
      35 | #warning This header is obsolete, please include tf2_geometry_msgs/tf2_geometry_msgs.hpp instead
      | ^~~~~~~
      In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
      from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
      from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
      from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
      from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
      from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
      from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
      from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
      from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
      from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
      from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
      from /home/wu/nav/src/navigation2/nav2_util/include/nav2_util/costmap.hpp:21,
      from /home/wu/nav/src/navigation2/nav2_util/src/costmap.cpp:17:
      /home/wu/nav/src/navigation2/nav2_util/src/costmap.cpp: In constructor ‘nav2_util::Costmap::Costmap(rclcpp::Node*, bool, bool, int, int)’:
      /home/wu/nav/src/navigation2/nav2_util/src/costmap.cpp:42:28: error: format ‘%f’ expects argument of type ‘double’, but argument 5 has type ‘int’ [-Werror=format=]
      42 | node_->get_logger(), "Costmap: Lethal threshold set to %.2f, it should be within"
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      43 | " bounds 0-100. This could result in potential collisions!", lethal_threshold_);
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
      | |
      | int
      /home/wu/nav/src/navigation2/nav2_util/src/costmap.cpp:42:65: note: format string is defined here
      42 | node_->get_logger(), "Costmap: Lethal threshold set to %.2f, it should be within"
      | ~~~^
      | |
      | double
      | %.2d
      cc1plus: all warnings being treated as errors
      gmake[2]: *** [src/CMakeFiles/nav2_util_core.dir/build.make:76: src/CMakeFiles/nav2_util_core.dir/costmap.cpp.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:212: src/CMakeFiles/nav2_util_core.dir/all] Error 2
      gmake[1]: *** Waiting for unfinished jobs....
      gmake: *** [Makefile:146: all] Error 2

      Failed <<< nav2_util [15.9s, exited with code 2]

      Summary: 5 packages finished [21.5s]
      1 package failed: nav2_util
      1 package had stderr output: nav2_util
      22 packages not processed

      小鱼小 1577630951 2 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @157763095
        最后由 编辑

        @157763095 这个是foxy版本的,米系统Ros哪个版本

        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

        1 条回复 最后回复 回复 引用 0
        • 1577630951
          /yiw @157763095
          最后由 编辑

          @157763095 我装的是humble的有这个版本的代码吗

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