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

    nav2源码下载编译报错

    已定时 已固定 已锁定 已移动
    机器人学
    ros2-humble nav2源码安装有错误提示
    3
    4
    678
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 22867492982
      ℘放纵ོꦿ࿐
      最后由 编辑

      企业微信截图_17162860054250.png 企业微信截图_17162859844764.png

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

        @2286749298 https://fishros.org.cn/forum/topic/151/提问前必看-不符合要求的问题拒绝回答

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

        22867492982 1 条回复 最后回复 回复 引用 0
        • 22867492982
          ℘放纵ོꦿ࿐ @小鱼
          最后由 编辑

          @小鱼 你好我从动手学ros2中按照流程将nav2的源码下载到本地记性编译。在编译的过程中出现终端报错的问题。我的系统是ubuntu22.04,ros2humble。
          (base) xiaoche@xiaoche:~/catkin_ws$ colcon build
          Starting >>> nav2_common
          Starting >>> nav_2d_msgs
          Starting >>> cartographer
          Starting >>> cartographer_ros_msgs
          Finished <<< nav2_common [1.40s]
          Starting >>> nav2_msgs
          Finished <<< nav_2d_msgs [3.23s]
          Starting >>> nav2_voxel_grid
          Finished <<< nav2_voxel_grid [0.42s]
          Starting >>> dwb_msgs
          Finished <<< cartographer_ros_msgs [4.96s]
          Starting >>> ascend_slam
          Finished <<< ascend_slam [0.31s]
          Starting >>> ls01b_v2
          Finished <<< ls01b_v2 [0.33s]
          Starting >>> xiaoguo
          Finished <<< dwb_msgs [2.29s]
          Starting >>> xiaoguo_cartographer
          Finished <<< xiaoguo_cartographer [0.23s]
          Starting >>> ydlidar
          Finished <<< nav2_msgs [5.08s]
          Starting >>> nav2_util
          Finished <<< ydlidar [0.53s]
          Starting >>> nav2_simple_commander
          Finished <<< cartographer [7.11s]
          Starting >>> cartographer_ros
          Finished <<< nav2_util [0.85s]
          Starting >>> nav_2d_utils
          Finished <<< xiaoguo [2.39s]
          Starting >>> nav2_behavior_tree
          Finished <<< nav_2d_utils [0.74s]
          Starting >>> nav2_lifecycle_manager
          Finished <<< cartographer_ros [1.57s]
          Starting >>> nav2_map_server
          Finished <<< nav2_lifecycle_manager [0.86s]
          Starting >>> nav2_amcl
          Finished <<< nav2_simple_commander [2.72s]
          Starting >>> nav2_velocity_smoother
          Finished <<< nav2_amcl [1.91s]
          Starting >>> nav2_rviz_plugins
          Finished <<< nav2_velocity_smoother [1.42s]
          Starting >>> cartographer_rviz
          Finished <<< nav2_rviz_plugins [0.56s]
          Finished <<< cartographer_rviz [0.66s]
          --- stderr: nav2_behavior_tree
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to curs_set@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wgetch@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_off@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_on@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wrefresh@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to noecho@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to endwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to initscr@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to werase@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to mvwprintw@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to delwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to newwin@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to cbreak@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to keypad@NCURSES6_TINFO_5.0.19991023'
          collect2: error: ld returned 1 exit status
          gmake[2]: *** [test/CMakeFiles/test_bt_conversions.dir/build.make:337:test/test_bt_conversions] 错误 1
          gmake[1]: *** [CMakeFiles/Makefile2:1735:test/CMakeFiles/test_bt_conversions.dir/all] 错误 2
          gmake[1]: *** 正在等待未完成的任务....
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to curs_set@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wgetch@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_off@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_on@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wrefresh@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to noecho@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to endwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to initscr@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to werase@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to mvwprintw@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to delwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to newwin@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to cbreak@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to keypad@NCURSES6_TINFO_5.0.19991023'
          collect2: error: ld returned 1 exit status
          gmake[2]: *** [test/plugins/condition/CMakeFiles/test_condition_distance_traveled.dir/build.make:338:test/plugins/condition/test_condition_distance_traveled] 错误 1
          gmake[1]: *** [CMakeFiles/Makefile2:1815:test/plugins/condition/CMakeFiles/test_condition_distance_traveled.dir/all] 错误 2
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to curs_set@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wgetch@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_off@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_on@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wrefresh@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to noecho@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to endwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to initscr@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to werase@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to mvwprintw@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to delwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to newwin@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to cbreak@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so/usr/bin/ld: : undefined reference to keypad@NCURSES6_TINFO_5.0.19991023'
          /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to curs_set@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wgetch@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_off@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wattr_on@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to wrefresh@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to noecho@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to endwin@NCURSES6_5.0.19991023' collect2: error: ld returned 1 exit status /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to initscr@NCURSES6_5.0.19991023'
          gmake[2]: *** [test/plugins/condition/CMakeFiles/test_condition_time_expired.dir/build.make:430:test/plugins/condition/test_condition_time_expired] 错误 1
          gmake[1]: *** [CMakeFiles/Makefile2:1843:test/plugins/condition/CMakeFiles/test_condition_time_expired.dir/all] 错误 2
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to werase@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to mvwprintw@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to delwin@NCURSES6_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to newwin@NCURSES6_5.0.19991023'
          /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to cbreak@NCURSES6_TINFO_5.0.19991023' /usr/bin/ld: /opt/ros/humble/lib/libbehaviortree_cpp_v3.so: undefined reference to keypad@NCURSES6_TINFO_5.0.19991023'
          collect2: error: ld returned 1 exit status
          gmake[2]: *** [test/plugins/condition/CMakeFiles/test_condition_path_expiring_timer.dir/build.make:337:test/plugins/condition/test_condition_path_expiring_timer] 错误 1
          gmake[1]: *** [CMakeFiles/Makefile2:1871:test/plugins/condition/CMakeFiles/test_condition_path_expiring_timer.dir/all] 错误 2
          gmake: *** [Makefile:146:all] 错误 2

          Failed <<< nav2_behavior_tree [3.58s, exited with code 2]
          Aborted <<< nav2_map_server [7.75s]

          Summary: 21 packages finished [16.7s]
          1 package failed: nav2_behavior_tree
          1 package aborted: nav2_map_server
          2 packages had stderr output: nav2_behavior_tree nav2_map_server
          25 packages not processed

          1 条回复 最后回复 回复 引用 0
          • E
            e22750706642022
            最后由 编辑

            1. 退出conda环境;
            2. 删除工作空间内的build,install,log文件夹,然后重新编译
            1 条回复 最后回复 回复 引用 0
            • 第一个帖子
              最后一个帖子
            皖ICP备16016415号-7
            Powered by NodeBB | 鱼香ROS