Skip to content
David Rebhuhn edited this page Jun 27, 2015 · 4 revisions

Setup Instructions:

  • Create or use an existing workspace to use the plugins with, such as ~/indigo_ws.

  • In a terminal, move to the above workspace's src folder and clone [OSU Robotics' branch of oculus_rviz_plugins] (https://github.com/OSURobotics/oculus_rviz_plugins) into it.

    cd ~/indigo_ws/src

    git clone https://github.com/OSUrobotics/oculus_rviz_plugins.git

  • Clone the package which it builds off of, ros_ovr_sdk, as well.

    git clone https://github.com/OSUrobotics/ros_ovr_sdk

Build Instructions:

  • Open 3 terminals

  • In two of the terminals, go to indigo_ws.

    cd ~/indigo_ws

  • Run catkin_make in the first, second, and third terminals

    catkin_make

Startup Instructions:

  • You will need to source 3 terminals with the workspace you've installed oculus_rviz_plugins and ros_ovr_sdk in.

    cd indigo_ws

    source devel/setup.bash

  • Run roscore in the first terminal

    roscore

  • Connect the Oculus DK2 and its camera to the computer.

  • Start ovrd in the background in the second terminal. ovrd is the driver for the Oculus Rift; for the Rift to be seen by rviz, you will need to run it. Fortunately, the driver itself is inside of a ROS package.

    rosrun ros_ovr_sdk ovrd

  • You should see it displaying an hmd count of 1.

    ...

    ...

    [TrackingManager] Broadcasting new HMD count = 1

  • Next, run rosrun rviz rviz -l in the second terminal. The -l flag enables logging. It's optional, but can reveal useful information for debugging.

    rosrun rviz rviz -l

  • From rviz, click Add and select the OculusDisplay plugin under oculus_rviz_plugins.

  • If the plugin fails to load, check the log. Otherwise, move to the next step.

  • Set the Oculus Rift down facing forward in view of the camera.

  • Check the option 'Render to Oculus'. This will create a new display in the viewing area of the Oculus Rift.