Possible to use RViz with Vagrant?

asked 2016-01-24 15:28:35 -0500

seanarm gravatar image

I'm using Vagrant with OS X, using the ROS base box "shadowrobot/ros-indigo-desktop-trusty64". I have guest additions installed on the box and X11 forwarding set to true. When I try to run anything that launches rviz, rviz crashes, usually saying that my graphics driver does not support OpenGL 2.1. Is this because a graphics driver does not exist on the vagrant box? Or does vagrant need to be directed toward the host system's graphics driver?

Here's the error message I get:

vagrant@ros-indigo-desktop-trusty64:/vagrant$ rosrun rviz rviz
[ INFO] [1453670060.127452011]: rviz version 1.11.3
[ INFO] [1453670060.127544093]: compiled against OGRE version 1.8.1 (Byatis)
libGL error: failed to load driver: swrast
[ INFO] [1453670061.709943633]: Stereo is NOT SUPPORTED
[ INFO] [1453670061.714645808]: OpenGl version: 1.4 (GLSL 0).
terminate called after throwing an instance of 'std::runtime_error'
what():  Your graphics driver does not support OpenGL 2.1. Please enable software rendering before running RViz (e.g. type 'export LIBGL_ALWAYS_SOFTWARE=1').

Any thoughts?

edit retag flag offensive close merge delete

Comments

1

This usually means that your VM does not have sufficient OpenGL support to run rviz. Have you tried setting the LIBGL_ALWAYS_SOFTWARE environment variable, as the error message suggests?

ahendrix gravatar image ahendrix  ( 2016-01-24 17:16:50 -0500 )edit
1

Rviz does not work over X11 forwarding.

ahendrix gravatar image ahendrix  ( 2016-01-24 17:18:24 -0500 )edit

Yes, LIBGL_ALWAYS_SOFTWARE set to 1. Is there a source for your RViz comment? If so, can you reference it in an answer and I'll mark i as correct?

seanarm gravatar image seanarm  ( 2016-01-25 15:44:39 -0500 )edit