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

    源码安装 Nav2,在如下截图的方式下编译运行生成包并且能查看到,但是在执行

    已定时 已固定 已锁定 已移动
    Nav2
    cartographer nav2源码安装有错误提示 编译故障
    2
    2
    611
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • vico1999V
      vico1999
      最后由 编辑

       源码编译
      

      Error(s) in package '/home/vico/fishbot_ws/src/fishbot_navigation2/package.xml':
      Error(s):

      • The generic dependency on 'nav2_bringup' is redundant with: exec_depend
        vico@wp:~/fishbot_ws$ colcon build --packages-up-to navigation2
        [0.424s] WARNING:colcon.colcon_core.package_identification:Failed to parse ROS package manifest in 'src/fishbot_navigation2': Error(s) in package 'src/fishbot_navigation2/package.xml':
        Error(s):
      • The generic dependency on 'nav2_bringup' is redundant with: exec_depend
        [0.641s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
        'nav2_map_server' 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_map_server

      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 [0.83s]
      Starting >>> nav2_msgs
      Starting >>> nav2_voxel_grid
      Finished <<< nav2_voxel_grid [0.81s]
      Finished <<< nav_2d_msgs [1.81s]
      Starting >>> dwb_msgs
      Aborted <<< dwb_msgs [0.47s] ..
      Aborted <<< nav2_msgs [2.16s]

      Summary: 3 packages finished [3.38s]
      2 packages aborted: dwb_msgs nav2_msgs

      编译后的包查看
      vico@wp:~/fishbot_ws$ ros2 pkg list | grep navigation2
      navigation2

      为fishbot 编译导航包
      vico@wp:~/fishbot_ws/src$ colcon build --packages-up-to fishbot_navigation2
      [0.654s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
      'nav2_map_server' is in: /home/vico/fishbot_ws/install/nav2_map_server, /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_map_server

      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 [0.91s]
      Starting >>> nav2_msgs
      Starting >>> nav2_voxel_grid
      Finished <<< nav2_voxel_grid [0.49s]
      Finished <<< nav_2d_msgs [2.01s]
      Starting >>> dwb_msgs
      Aborted <<< dwb_msgs [0.54s]
      Aborted <<< nav2_msgs [1.66s]

      Summary: 3 packages finished [2.96s]
      2 packages aborted: dwb_msgs nav2_msgs
      2 packages had stderr output: dwb_msgs nav2_msgs
      32 packages not processed
      vico@wp:~/fishbot_ws/src$ colcon build --packages-up-to fishbot_navigation2
      [0.638s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
      'nav2_map_server' is in: /home/vico/fishbot_ws/install/nav2_map_server, /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_map_server

      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 [0.92s]
      Starting >>> nav2_msgs
      Starting >>> nav2_voxel_grid
      Finished <<< nav2_voxel_grid [0.46s]
      Finished <<< nav_2d_msgs [1.98s]
      Starting >>> dwb_msgs
      --- stderr: nav2_msgs
      CMake Warning at /opt/ros/humble/share/nav_msgs/cmake/ament_cmake_export_include_directories-extras.cmake:11 (message):
      Package 'nav_msgs' exports the include directory
      '/opt/ros/humble/share/nav_msgs/cmake/../../../include/nav_msgs' which
      doesn't exist
      Call Stack (most recent call first):
      /opt/ros/humble/share/nav_msgs/cmake/nav_msgsConfig.cmake:41 (include)
      CMakeLists.txt:7 (find_package)

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_generator_c" includes
      non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_fastrtps_c"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_fastrtps_cpp"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_introspection_c"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_introspection_cpp"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_generator_cpp" includes
      non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_fastrtps_c"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      CMake Error in CMakeLists.txt:
      Imported target "nav_msgs::nav_msgs__rosidl_typesupport_fastrtps_c"
      includes non-existent path

      "/opt/ros/humble/include/nav_msgs"
      

      in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

      • The path was deleted, renamed, or moved to another location.

      • An install or uninstall procedure did not complete successfully.

      • The installation package was faulty and references files it does not
        provide.

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @vico1999
        最后由 编辑

        @vico1999 在 源码安装 Nav2,在如下截图的方式下编译运行生成包并且能查看到,但是在执行 中说:

        "/opt/ros/humble/include/nav_msgs"

        重装下系统中的ROS试试

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

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