写在前面
笔者的测试环境:
Ubuntu20.04, ROS-noteic
一、问题描述
运行rviz时出现报错:
[ WARN] [1681566849.279762478]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/ogre-1.9-kiU5_5/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-kiU5_5/ogre-1.9-1.9.0+dfsg1/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
出现这个问题的一般是因为显卡驱动出现了问题。
此时运行nvidia-smi
,如果出现如下报错:
Failed to initialize NVML: Driver/library version mismatch
那就说明就是因为nvidia显卡驱动出问题导致的。
二、参考解决方法
解决方法很简单,
重启电脑就可以解决上述问题。
参考链接
[1] Demon_zzj. rviz启动报错:OGRE EXCEPTION(3:RenderingAPIException): Invalid parentWindowHandle (wrong server or screen [EB/OL]. https://blog.csdn.net/qq_37497304/article/details/129708129, 2023-03-22/2023-04-17.
[2] (看这篇文章的评论) nvidia-smi指令报错:Failed to initialize NVML: Driver解决 [EB/OL]. https://zhuanlan.zhihu.com/p/94378201, 2019-11-29/2023-04-17.