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

    在gazebo中无法加载模型

    已定时 已固定 已锁定 已移动
    ROS 2相关问题
    gazebo ros2 hamble
    7
    15
    2.8k
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 8925307318
      梦阁一456
      最后由 编辑

      试试安装
      sudo apt install qtwayland5

      29180954962 2 条回复 最后回复 回复 引用 0
      • 29180954962
        天问 @892530731
        最后由 编辑

        @892530731 你好,谢谢,我安装了,原来那个报错还是存在的,依然无法加载模型出来。现在又增加了新的问题,gazebo闪退,提示如下:
        [spawn_entity.py-2] Traceback (most recent call last):
        [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 370, in <module>
        [spawn_entity.py-2] main()
        [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 365, in main
        [spawn_entity.py-2] exit_code = spawn_entity_node.run()
        [spawn_entity.py-2] File "/opt/ros/humble/lib/gazebo_ros/spawn_entity.py", line 143, in run
        [spawn_entity.py-2] self.get_logger().error('Error: specified file %s does not exist', self.args.file)
        [spawn_entity.py-2] TypeError: RcutilsLogger.error() takes 2 positional arguments but 3 were given
        [ERROR] [spawn_entity.py-2]: process has died [pid 6701, exit code 1, cmd '/opt/ros/humble/lib/gazebo_ros/spawn_entity.py -entity fishbot -file /home/wl/Documents/fishbot_ws/install/fishbot_description/share/fishbot_description/urdf/fishbot_gazebo.urdf --ros-args'].
        [gazebo-1] [Msg] Waiting for master.
        [gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
        [gazebo-1] [Msg] Publicized address: 192.168.0.130
        [gazebo-1] [Wrn] [GuiIface.cc:120] QSocketNotifier: Can only be used with threads started with QThread
        [gazebo-1] [Wrn] [Event.cc:61] Warning: Deleting a connection right after creation. Make sure to save the ConnectionPtr from a Connect call
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:132] Unable to create the rendering window
        [gazebo-1] [Err] [WindowManager.cc:139] EXCEPTION: Unable to create the rendering window
        [gazebo-1]
        [gazebo-1]
        [gazebo-1] terminate called after throwing an instance of 'gazebo::common::Exception'
        [gazebo-1] [Msg] Waiting for master.
        [gazebo-1] [Msg] Connected to gazebo master @ http://127.0.0.1:11345
        [gazebo-1] [Msg] Publicized address: 192.168.0.130
        [gazebo-1] [Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world]
        [ERROR] [gazebo-1]: process has died [pid 6699, exit code 255, cmd 'gazebo --verbose -s libgazebo_ros_init.so -s libgazebo_ros_factory.so'].
        [gazebo-1]

        1 条回复 最后回复 回复 引用 0
        • 29180954962
          天问 @892530731
          最后由 编辑

          @892530731 我又把这个包卸载了,我的gazebo不闪退了,但是还是无法加载出模型,可能这个方法不太适合我出现的这个问题,再次感谢。

          1 条回复 最后回复 回复 引用 0
          • 29180954962
            天问 @2918095496
            最后由 编辑

            @2918095496 补充一下,使用小鱼的rqt call的方法可以在gazebo中加载出模型,但是加载出来的模型不完整,没有左右轮子。求帮助!

            1 条回复 最后回复 回复 引用 1
            • 7593230617
              759323061
              最后由 编辑

              我和你一样的报错,你先把conda退出来
              “conda deactivate”
              试试

              29180954962 1 条回复 最后回复 回复 引用 0
              • 29180954962
                天问 @759323061
                最后由 编辑

                @759323061我不太明白你说的操作,能具体一点吗,感谢!

                7593230617 1 条回复 最后回复 回复 引用 0
                • 7593230617
                  759323061 @2918095496
                  最后由 编辑

                  @2918095496 就是比平时多一步,再每个要用到的终端里输入conda deactivate,就行或者直接把miniconda卸载就行

                  29180954962 2 条回复 最后回复 回复 引用 3
                  • 29180954962
                    天问 @759323061
                    最后由 编辑

                    @759323061 我的运行没有这个命令,应该是我没有装这个。

                    1 条回复 最后回复 回复 引用 0
                    • 29180954962
                      天问 @759323061
                      最后由 编辑

                      @759323061 是我的加载路径被我给搞错了,所以一直没有模型。谢谢你的帮助

                      13712468281 1 条回复 最后回复 回复 引用 0
                      • 13712468281
                        男孩与狗 @2918095496
                        最后由 编辑

                        您好,请问最后这个问题怎么解决的呢,我跟您这个问题一模一样

                        9973981929 1 条回复 最后回复 回复 引用 0
                        • 9973981929
                          别 @1371246828
                          最后由 编辑

                          @1371246828 urdf_model_path = '/home/ws_test/rviz_test/src/fishbot_description/urdf/fishbot_gazebo.urdf'直接变成自己的加载路径试一下

                          1 条回复 最后回复 回复 引用 0
                          • R
                            Rolling
                            最后由 编辑

                            找到launch.py将urdf_model_path后的路径换成urdf文件的绝对路径

                            1 条回复 最后回复 回复 引用 0
                            • H
                              haile.huang
                              最后由 编辑

                              @892530731 在 在gazebo中无法加载模型 中说:

                              sudo apt install qtwayland5

                              如果安装了这个qtwayland5包的,把它卸载,把gazebo所有的相关联的包都卸载,重装一次就没问题了,亲测有效

                              H 1 条回复 最后回复 回复 引用 0
                              • H
                                haile.huang @haile.huang
                                最后由 编辑

                                @haile-huang 重装gazebo哦,qtwayland5这个就不用装了,好像和gazebo有冲突的

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