ros-visualization/rviz — pull request #718 by acornacorn (2014-02-07 06:09:33+00:00)
Title: Rviz in stereo

This adds stereo rendering support to Rviz.

To see stereo Rviz must be built against a version of Ogre that was
built with the OGRE_STEREO_ENABLE config option enabled. This option
is currently only supported in the branch of Ogre found here
https://bitbucket.org/crefvik/ogre
or here
https://bitbucket.org/acornacorn/ogre

To see stereo you will need:
- a stereo monitor
(I am using an ASUS VG278H)
- a video card that supports quad-buffer stereo.
(I am using an NVIDIA Quadro K4000)

To build rviz with stereo support:
remove debian-installed ogre:
sudo apt-get remove libogre-1.7.4 libogre-dev
build the stereo-enabled ogre:
cd $HOME
mkdir my-ogre
cd my-ogre
hg clone https://bitbucket.org/crefvik/ogre
mkdir build
cd build
cmake -DOGRE_FULL_RPATH=ON -DOGRE_BUILD_STEREO_SUPPORT=ON ../ogre
sudo make install
then build rviz as usual using catkin_make
cd $HOME
mkdir -p my-workspace/src
cd my-workspace/src
git clone https://github.com/ros-visualization/rviz.git
cd ..
catkin_make
Run rviz
roscore & rosrun rviz
If your HW supports stereo you should see a double image (stereo when
wearing the glasses). Properties in the ViewController panel can be
used to set eye-separation, focal-distance, to swap the eyes, and to
disable stereo.

If stereo is supported on your hardware, rviz will automatically
render in stereo unless you either
- disable stereo by unchecking the "Enable Stereo Rendering" property in the view panel.
- use the --no-stereo commandline option (stereo properties will be hidden)

If stereo is not suppported on your hardware, rviz will not render in
stereo and the stereo-related properties will be hidden.