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

    一键安装ros和docker后无法打开rviz和gazebo

    已定时 已固定 已锁定 已移动
    一键安装
    一键安装 docker gazebo rviz
    5
    8
    1.5k
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 16849625401
      奇幻纬度
      最后由 编辑

      一键安装过程没问题,roscore和小乌龟可以启动

      但是在melodic1容器中运行rviz和gazebo报错
      rviz报错:

      root@729827749cc7:~# rviz
      QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
      [ INFO] [1672447394.432710379]: rviz version 1.13.24
      [ INFO] [1672447394.432828019]: compiled against Qt version 5.9.5
      [ INFO] [1672447394.432861646]: compiled against OGRE version 1.9.0 (Ghadamon)
      [ INFO] [1672447394.460293663]: Forcing OpenGl version 0.
      [ WARN] [1672447394.667782836]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      [ WARN] [1672447394.681091510]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      rviz::RenderSystem: error creating render window: OGRE 
      [ WARN] [1672447395.738194251]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      [ WARN] [1672447395.749484673]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      [ WARN] [1672447395.760776560]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
      [ERROR] [1672447395.760831795]: Unable to create the rendering window after 100 tries.
      [ INFO] [1672447395.760840821]: Stereo is NOT SUPPORTED
      terminate called after throwing an instance of 'std::logic_error'
        what():  basic_string::_M_construct null not valid
      Aborted (core dumped)
      root@729827749cc7:~# 
      
      

      gazebo报错:

      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast
      X Error of failed request:  GLXBadContext
        Major opcode of failed request:  152 (GLX)
        Minor opcode of failed request:  6 (X_GLXIsDirect)
        Serial number of failed request:  44
        Current serial number in output stream:  43
      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast
      X Error of failed request:  GLXBadContext
        Major opcode of failed request:  152 (GLX)
        Minor opcode of failed request:  6 (X_GLXIsDirect)
        Serial number of failed request:  44
        Current serial number in output stream:  43
      
      

      在容器内部运行以下命令:

      export LIBGL_ALWAYS_INDIRECT=1
      

      解决了第一个错误:
      libGL error: No matching fbConfigs or visuals found
      libGL error: failed to load driver: swrast

      接下来继续运行gazebo报第二个错误,不知道如何解决

      
      * 
      * X Error of failed request:  BadValue (integer parameter out of range for operation)
        Major opcode of failed request:  152 (GLX)
        Minor opcode of failed request:  3 (X_GLXCreateContext)
        Value in failed request:  0x0
        Serial number of failed request:  31
        Current serial number in output stream:  32
      X Error of failed request:  BadValue (integer parameter out of range for operation)
        Major opcode of failed request:  152 (GLX)
        Minor opcode of failed request:  3 (X_GLXCreateContext)
        Value in failed request:  0x0
        Serial number of failed request:  31
        Current serial number in output stream:  32
      
      
      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @1684962540
        最后由 编辑

        @1684962540 你的系统装了n卡驱动了吗

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

        少 1 条回复 最后回复 回复 引用 0
        • 少
          少年歌行 @小鱼
          最后由 编辑

          @小鱼 请问你解决了吗,我rviz也遇到这个问题了

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

            @少年歌行 试试在系统终端,输入xhost +

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

            wsc_972W 3 条回复 最后回复 回复 引用 0
            • wsc_972W
              wsc_972 @小鱼
              最后由 编辑

              @小鱼 还是不行阿

              1 条回复 最后回复 回复 引用 0
              • wsc_972W
                wsc_972 @小鱼
                最后由 编辑

                @小鱼
                rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                [ WARN] [1686902167.467492170]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                [ WARN] [1686902167.473610534]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                [ WARN] [1686902167.478795062]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                rviz::RenderSystem: error creating render window: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
                [ERROR] [1686902167.478841925]: Unable to create the rendering window after 100 tries.
                [ INFO] [1686902167.478854217]: Stereo is NOT SUPPORTED
                terminate called after throwing an instance of 'std::logic_error'
                what(): basic_string::_M_construct null not valid
                Aborted (core dumped)

                1 条回复 最后回复 回复 引用 0
                • wsc_972W
                  wsc_972 @小鱼
                  最后由 编辑

                  @小鱼 搜索到,在locate docker-compose.yml这个文件中添加关于NVIDIA 的信息可以,但是我没有找到这个文件

                  1 1 条回复 最后回复 回复 引用 0
                  • 1
                    PEC @wsc_972
                    最后由 编辑

                    @wsc_972 请问你解决这个问题了吗

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