Table of Contents
If you are working with ROS and Gazebo in the VMWare Workstation Player 15, you may encounter graphics issues while working with the Gazebo simulator. Here are the details of this issue with a screenshot.
After installing ROS and Gazebo, and if you are starting your simulation launch file, you may get the following error in the terminal. The Gazebo simulation will fail to load the simulation.
The error you may get is the following
VMware: vmw_ioctl_command error Invalid argument.
Here are the possible debugging and workaround you can do to fix this issue.
Debugging and Workarounds
There are some discussions happening answers.gazebo.org regarding these issues, but there are no clear solutions for these issues, only a few workarounds. Here are the links from answers.gazebo.org thread regarding this issue.
You can install the glmark2 benchmark tool in Ubuntu to test the 3D performance on your Ubuntu guest first.
sudo apt install glmark2
After installing glmark2, run it on the terminal to get the OpenGL version and to get the 3D performance.
You can able to find the GL_VERSION as 3.3. GL_VENDOR: VMware Inc. This test also helps to benchmark the 3D performance of the current guest OS.
#1 Workaround: Disable Graphics Acceleration in VMWare
The first workaround is disabling the 3D Graphics acceleration in VMware. If you do this, 3D performance will be reduced but this issue will go.
I will not recommend this method, because it will reduce the 3D performance in Gazebo. The next method is more better than this
#2 Workaround: Downgrade the GL_Version
In this method, we are downgrading the GL_VERSION from 3.3 to GL_VERSION 2.1. This method will work better and the Gazebo performance will be also good.
You can use the following command to downgrade the GL_VERSION
echo "export SVGA_VGPU10=0" >> ~/.bashrc
This will permanently fix this issue. To test your settings, you can either test with Gazebo or use glmark2. Here is the screenshot of glmark2 after downgrading the GL_Version to 2.1.