This tutorial describes how to setup a machine and Gazebo for use with stereo glasses, such as those provided by Nvidia 3D Vision.
This tutorial assumes that you will be using Ubuntu.
Performance Note: Stencil shadows, as opposed to the default shadow maps, are used when stereo rendering is enabled. Stencil shadows utilize the CPU, which could affect your performance. Reducing the number of light sources in your world will help minimize the impact of the stencil shadows.
A 3D ready monitor. This monitor should have a 120Hz refresh rate.
An Nvida Quadro K4000 or better.
Warning: Many Nvidia cards say they support 3D stereo. Such a statement may only be true when using Windows drivers. Make sure there is a 3pin VESA connector on the card, otherwise the card will not work in Linux.
You can check your current graphics card with:
lspci | grep VGA
A complete Nvidia 3D Vision kit: glasses, emitter, sync cable, and usb cable.
Make sure you are using either a display port or dual-dvi cable. This is needed to support the high refresh rates.
Make sure the IR emitter is connected via both the USB and 3-pin VESA cables.
Make sure the glasses are charged.
Ubuntu 14.04 (Trusty).
sudo apt-get install nvidia-current
sudo apt-get install libogre3d-1.9-dev
Install nvidia settings.
sudo apt-get install nvidia-settings
Gazebo compiled from source. You may use the Gazebo6 debians when they are made available on July 27, 2015.
If you are using the Unity desktop environment, stereo probably won't work. Install Gnome Classic:
sudo apt-get install gnome-session-fallback
Logout and click on the icon next to your username. Select "GNOME Classic (Metacity)" and log in.
Set the refresh rate to 120Hz. Do not use
Set the resolution to be a fixed value. Do not use
Save to X Configuration File and follow instructions to save to
Add stereo option to
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original cd /tmp nvidia-xconfig -c xorg.conf -o xorg.conf --stereo=10 sudo cp xorg.conf /etc/X11/xorg.conf
--stereo=10 is for NVIDIA 3D VISION. Use 11 for NVIDIA 3D VISION PRO. For other settings see
At this point your
xorg.conf file should look similar to:
Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Ancor Communications Inc VG248" HorizSync 30.0 - 160.0 VertRefresh 50.0 - 150.0 Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "Quadro K4000" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "metamodes" "nvidia-auto-select +0+0; 1920x1080_100 +0+0" Option "SLI" "Off" Option "MultiGPU" "Off" Option "BaseMosaic" "off" Option "Stereo" "10" SubSection "Display" Depth 24 EndSubSection EndSection
Restart X by logging out and logging back in.
The Nvidia logo on the emitter should glow green. If red, then go back through the previous steps to make sure everything was done correctly.
X Screen 0.
Stereo Mode setting should say
NVIDIA 3D Vision Stereo.
sudo apt-get install mesa-utils
glxgears in stereo.
You should see blurry gears that look 3D when you put on the glasses.
Add the following lines, if not already present.
Note: You can disable stereo by using
stereo=0, or removing the