Error running rviz: Xlib: extension "NV-GLX" missing on display ":0.0"
I cannot get rviz to start. I did
rosdep install rviz
rosmake rviz
They both run fine; when I run
rosrun rviz rviz
I get the following error (it tries 100x and gives me the same error that many times):
rviz::RenderSystem: error creating render window: std::exception
Xlib: extension "NV-GLX" missing on display ":0.0".
[ WARN] [1359884146.909768203]: OGRE EXCEPTION(3:RenderingAPIException): Unable to create a suitable GLXContext in GLXContext::GLXContext at /build/buildd/ogre-1.7.4/RenderSystems/GL/src/GLX/OgreGLXContext.cpp (line 61)
rviz::RenderSystem: error creating render window: std::exception
[ERROR] [1359884146.909883164]: Unable to create the rendering window after 100 tries.
rviz: /tmp/buildd/ros-groovy-rviz-1.9.20-0quantal-20130126-0146/src/rviz/ogre_helpers/render_system.cpp:272: Ogre::RenderWindow* rviz::RenderSystem::makeRenderWindow(intptr_t, unsigned int, unsigned int): Assertion `false' failed.
Aborted (core dumped)
My system: Ubuntu 12.10 32b, GeForce GT 630M, ROS Groovy.
I am going to update this post with other info as described in http://www.ros.org/wiki/rviz/Troubleshooting#How_to_make_a_usable_bug_report, unless someone recognizes this problem right away.
EDIT: Following the instructions in this answer http://answers.ros.org/question/10588/rviz-does-not-start-prints-glxunsupportedprivaterequest/?answer=15671#post-id-15671 got rid of the previous errors, now the rviz window opens up for a second and then crashes. I am getting:
[ INFO] [1359888641.886868366]: rviz version 1.9.20
[ INFO] [1359888641.887071444]: compiled against OGRE version 1.7.4 (Cthugha)
[ WARN] [1359888644.497027605]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/pass_pos_color.vert Cannot compile GLSL high-level shader : rviz/pass_pos_color.vert 0:1(15): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE
in GLSLProgram::compile at /build/buildd/ogre-1.7.4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
Segmentation fault (core dumped)
EDIT 2: Same as before, tried it a couple more times, now rviz window appears. No idea why.
In my laptop I've got an nvidia optimus grahics card and I'm only able to run rviz using bumblebee by running "optirun rosrun rviz rviz".