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

    Fishbot-humble源码编译错误

    已定时 已固定 已锁定 已移动
    FishBot二驱机器人
    fishbot ros2-humble 编译出错
    2
    10
    522
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 27616077292
      赤诚
      最后由 2761607729 编辑

      编译到cartographer_ros时报错
      8b53d31b-9501-473f-96da-d2b7cdce197f-image.png
      53f1a0b4-9a63-4fe3-a495-db77c19329dc-image.png

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

        @2761607729 注意版本,另外最好复制粘贴提问

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

        27616077292 1 条回复 最后回复 回复 引用 0
        • 27616077292
          赤诚 @小鱼
          最后由 编辑

          @小鱼 就fishbot的代码https://github.com/fishros/fishbot/tree/humble,humble版本的

          小鱼小 1 条回复 最后回复 回复 引用 0
          • 27616077292 2761607729 删除了该主题于
          • 27616077292 2761607729 恢复了该主题于
          • 小鱼小
            小鱼 技术大佬 @2761607729
            最后由 编辑

            @2761607729 在 Fishbot-humble源码编译错误 中说:

            https://github.com/fishros/fishbot/tree/humble

            请手动下载各个仓库源码,指定humble相关分支:

            [submodule "src/navigation"]
            path = src/navigation
            url = http://github.fishros.org/https://github.com/fishros/navigation2.git
            branch = main
            [submodule "src/cartographer_code/cartographer"]
            path = src/cartographer_code/cartographer
            url = http://github.fishros.org/https://github.com/ros2/cartographer.git
            [submodule "src/cartographer_code/cartographer_ros"]
            path = src/cartographer_code/cartographer_ros
            url = http://github.fishros.org/https://github.com/ros2/cartographer_ros.git

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

            27616077292 1 条回复 最后回复 回复 引用 0
            • 27616077292
              赤诚 @小鱼
              最后由 编辑

              @小鱼 我又重新安装了一遍,先是git clone --recursive https://github.com/fishros/fishbot.git -b humble
              然后按照你的提示将.gitmodules文件改成
              [submodule "src/navigation"]
              path = src/navigation
              url = http://github.fishros.org/https://github.com/fishros/navigation2.git
              branch = humble

              [submodule "src/cartographer_code/cartographer"]
              path = src/cartographer_code/cartographer
              url = http://github.fishros.org/https://github.com/ros2/cartographer.git
              branch = humble

              [submodule "src/cartographer_code/cartographer_ros"]
              path = src/cartographer_code/cartographer_ros
              url = http://github.fishros.org/https://github.com/ros2/cartographer_ros.git
              branch = humble
              接着在工作空间运行git summodule init 和 git submodule update --recursive更新子模块的内容,在conlcon build编译还是报错,还是同样的情况,但是在colcon build编译前我运行那个rosdep install --from-paths src -y
              也是报错报ERROR: the following packages/stacks could not have their rosdep keys resolved
              to system dependencies:
              fishbot_description: Cannot locate rosdep definition for [ament_python]
              我就直接跳过了,不知道有没有影响

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

                @2761607729 rosdep这步过不去还是有影响的,另外你要到对应的github仓库去看看有没有humble分支

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

                27616077292 1 条回复 最后回复 回复 引用 0
                • 27616077292
                  赤诚 @小鱼
                  最后由 编辑

                  @小鱼 我试了好多次都没解决,那个rosdep提示缺少ament_python的依赖项,我也给安装上了,但是还是报错。我根据这个报错的原因,将cartographer_ros包下面的ros_log_sink.cpp文件中的
                  const std::string message_string = ::google::LogSink::ToString(
                  severity, GetBasename(filename), line, tm_time, message, message_len);
                  中的tm_time改成*tm_time后编译通过了

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

                    @2761607729 ok,看样子还是源码bug,我以为是下错版本导致的,源码最好切换到一个release的版本

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

                    27616077292 1 条回复 最后回复 回复 引用 0
                    • 27616077292
                      赤诚 @小鱼
                      最后由 编辑

                      @小鱼 那意思是这个humble版本还是有问题的吗,我编译后运行第一个指令显示机器人模型ros2 launch fishbot_description display_rviz2.launch.py,看不见机器人,但是添加tf坐标系有显示。
                      541ec685-9ff4-44e3-96d8-849daf3a2b3a-image.png

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

                        @2761607729 你需要学一个动手学ROS2,从仿真建模开始或者从头开始都可以

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

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