User Tools

Site Tools


setting_up_openvr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
setting_up_openvr [2017/05/02 12:04] keitaronishimurasetting_up_openvr [2017/05/05 12:33] (current) keitaronishimura
Line 1: Line 1:
 ===== Setting Up OpenVR ===== ===== Setting Up OpenVR =====
-**Date:** Last modified on 05/02/17+ 
 +**Author:** Keitaro Nishimura Email: [email protected] 
 +\\ 
 +**Date:** Last modified on 05/05/17
 \\ \\
 **Keywords:** OpenVR, Tutorial, Setup **Keywords:** OpenVR, Tutorial, Setup
 \\ \\
 +{{ vive_tut:running_hello_world.png?400 |}}
 \\ \\
 The photo above depicts the what the reader would see when running the "Hello World" demo for OpenVR. This tutorial shows you how to download and run the "Hello World' example for OpenVR.   The photo above depicts the what the reader would see when running the "Hello World" demo for OpenVR. This tutorial shows you how to download and run the "Hello World' example for OpenVR.  
Line 14: Line 17:
 <fc blue> <fc blue>
    *Basic knowledge and experience with c++    *Basic knowledge and experience with c++
 +\\
 +   *Interests in using the HTC Vive for research
  
 </fc> </fc>
Line 22: Line 27:
    *Downloading OpenVR    *Downloading OpenVR
    *Running the "Hello World" code    *Running the "Hello World" code
- +   *Final Words 
-==== Parts Lists and Soucres ====+==== Parts Lists and Sources ====
 -You will need all of the parts used in the tutorial before this and nothing more.  -You will need all of the parts used in the tutorial before this and nothing more. 
  
Line 31: Line 36:
 |Tripod mounts for lighthouse base stations| Amazon or build in-house | https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=tripod+for+camera | 2| Since the base stations have a standard camera mounting hole on the bottom any standard camera tripod should work. You can also use scrap pieces of 2x4 wood to create your own mount for them.| |Tripod mounts for lighthouse base stations| Amazon or build in-house | https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=tripod+for+camera | 2| Since the base stations have a standard camera mounting hole on the bottom any standard camera tripod should work. You can also use scrap pieces of 2x4 wood to create your own mount for them.|
  
 +====Downloading OpenVR====
 +OpenVR is a [[https://github.com/ValveSoftware/openvr|github repository]] that is open for use on all platforms (Windows, OSX, Linux). For this tutorial, we will be doing everything within Windows 10. However, this does not mean that it isn't possible to use OpenVR with a different OS. 
 +\\
 +If you are using the lab HTC Vive dedicated computer shown in the last tutorial you can skip this section.
 +\\
 +{{vive_tut:openvr_web.png?300}}
 +\\
 +
 +1. Once on the OpenVR Github page, click on the clone or download button on the right-hand side of the page and download the Zip file to your computer. While you are on the page locate the Issues and Wiki tab. These tabs hold all of the information you will need to use the SDK. The wiki tab has all of the documentation for the API while, the Issues tab is where people can ask developers or other users of the SDK solutions to issues that they run into.
 +\\
 +{{vive_tut:download_sdk_li.jpg?300}}{{vive_tut:issues_tab.png?300}}{{vive_tut:wiki_tab.png?300}}{{vive_tut:api_doc.png?300}}
 +\\
 +
 +2. Once you have downloaded the zip file extract it to a directory that is easy for your to access. You will be pointing to this folder when developing code later on so putting it in the "C:" or similar directory will make your life easier later on. 
 +\\
 +{{vive_tut:extracting_openvrtoc.png?300}}
 +\\
 +
 +3. If you already have Microsoft Visual studios on your computer you can skip this step (the lab computer is setup already), unless you are using a 30-day trial. Follow this [[https://www.visualstudio.com/downloads/|link]] and download Visual Studio Community. This may take a while. Once done, follow the installation instructions and before finalizing the installation do not ignore initializing your copy. All you need to do is use the Microsoft email (or create a throwaway one) and you will have that copy of visual studios for life. 
 +\\
 +{{vive_tut:trial_bs_li.jpg?300}}{{vive_tut:signin_visualstudio.png?300}}
 +\\
 +
 +====Running the "Hello World" code====
 +
 +Now that you have visual studios and OpenVR on your computer you can finally run the hello world example. 
 +
 +1. Open the OpenVR folder and find the samples folder. This is the folder that has all of the example code. 
 +\\
 +{{vive_tut:samples.png?300}}
 +\\
 +
 +2. Once in go into the hellovr_opengl folder. This is the hello world example of how to use OpenVR. 
 +\\
 +{{vive_tut:openvr_folder)li.jpg?300}}
 +\\
 +
 +3. Now find the hellovr_opengl file (the file without extensions) and open it with visual studio.
 +\\
 +{{vive_tut:openvr_proj.png?300}}{{vive_tut:use_visstu.png?300}}
 +\\
 +
 +4. If you aren't shown the main cpp code you can find it by expanding the project tree inside the solution explorer. If you haven't plugged in the HTC Vive into the computer yet please do so now. At the top of the IDE you will see a green play button labeled Local Windows Debugger, by clicking that button you will be able to run the hellovr project code. After clicking it you may be prompted to build the code first before running, build the code.  
 +\\
 +{{vive_tut:visstu1.png?300}}{{vive_tut:visstu2.png?300}}{{vive_tut:visstu1_li.jpg?300}}{{vive_tut:visstu3.png?300}}
 +\\
 +
 +5. You will now see a matrix of cubes with the same picture on all 6 sides that you are able to walk through using the Vive. 
 +\\
 +{{ vive_tut:running_hello_world.png?300 |}}
 +\\
 +====Final words====
 +
 +This tutorial's objective was to teach the reader how to download and run the hello world example for the OpenVR
 +SDK. 
 +\\
  
 +The reader can now move on to the next tutorial which will teach the reader how to set up a visual studio environment for development using the OpenVR SDK and how to use the Vive controllers to move a Dynamixel servo. 
setting_up_openvr.1493751859.txt.gz · Last modified: 2017/05/02 12:04 by keitaronishimura