NRP on VirtualBox [Solved -> use VMware]


#1

I was trying to set up the NRP on a VirtualBox guest running Ubuntu 16.04 on an OSX host. I followed all the steps but gzserver keeps crashing (Segmentation fault). Examining the core file points towards that some openGL error. Googling around for “Gazebo” and “VirtualBox” brings up quite a few posts saying that Gazebo cannot possibly run in a VirtualBox Ubuntu guest due to limitations of the graphics driver provided. I have raised a related issue on bitbucket: https://bitbucket.org/hbpneurorobotics/neurorobotics-platform/issues/12/add-a-warning-to-the-installation-notes

Has anyone had a similar problem?


Running NRP in a no-GPU Virtual Machine
#2

Try using VMWare Player, it’s typically much better suited for anything OpenGL & Virtual.


#3

Hi @mschmuker,
the current virtual box has issues sharing the hardware graphic interface to the ubuntu guest.
I tried different setups, and I couldn’t get the NRP to run with VirtualBox.
I have OSX too and I use VM Ware fusion and it works alright.


#4

Thanks @rhostett and @camilo for the info, good to know that it works with VMware. I’ll try that, then.


Upgrade gazebo to 7.4?
#5

Update: I got a copy of VMware Fusion for Mac and indeed it works. However, it requires one small tweak in the gazebo source, see the git diff below. Tested today on a fresh virtual install of Ubuntu 16.04.3 LTS.

Maybe this is worth a mention on the bitbucket site, now that it talks about VirtualBox? @vonarnim @rhostett @camilo

diff --git a/gazebo/rendering/Camera.cc b/gazebo/rendering/Camera.cc
index f6d54d3..19c7235 100644
--- a/gazebo/rendering/Camera.cc
+++ b/gazebo/rendering/Camera.cc
@@ -2247,6 +2247,7 @@ void Camera::SetFSAA(int _value)
 {
   if (_value >= 0)
   {
+    _value = 0; //shameless hacking to make it work on VMware Fusion
     this->dataPtr->fsaa = _value;
     gzdbg << "Camera " << this->GetName() << ": Set FSAA = " << this->dataPtr->fsaa << std::endl;
     // Not strictly necessary now, but if additional render_settings are exposed in the future, this flag might be important for indicating pre-render modifications