User Tools

Site Tools


using_htc_vive_to_control_dynamixel_servo

This is an old revision of the document!


Using HTC Vive to Control Dynamixel Servo

Author: Keitaro Nishimura Email: nishik1@unlv.nevada.edu
Date: Last modified on 05/02/17
Keywords: OpenVR SDK, HTC Vive, Dynamixel, tutorial


The photo above depicts using the Vive position tracking to move a Dynamixel servo around. This tutorial shows you how to setup a Visual Studio Project to use the OpenVR SDK, how to get the position data of the Vive controllers, and how to use that position data to move around a Dynamixel servo.

Motivation and Audience

This tutorial's motivation is to teach the reader how to use the position tracking of the HTC Vive controllers to move a Dynamixel servo. This tutorial is not meant to be a comprehensive tutorial on openVR and Dynamixel SDK. Rather a starting point for the reader to then follow further to learn more about the respective APIs.
Readers of this tutorial are assumed to have the following background and interests:

* Know how to follow directions
* Have experience with/or interest in c++
* Be interested in some form of HMI
* Have completed the previous 2 tutorials

The rest of this tutorial will follow as presented:

  • Parts Lists and Source
  • Setting up Visual Studio Environment for OpenVR
  • Getting the position Data of the Vive Controller
  • Integrating the Dynamixel SDK to move the servo
  • Final Words

Parts Lists and Sources


To complete this tutorial, you'll need the following items listed bellow.

Part Name/Description Vendor Vendor URL Qty Notes
HTC Vive Kit Vive or Fry's https://www.vive.com/us/product/ or http://www.frys.com/product/8987273 1The kit will come with all the necessary hardware. 1 Vive HMD (head mounted display), 2 lighthouse base stations, 2 controllers, and the cables and power sources needed.
A computer with at least a GTX 1060 or equivalent Amazon https://www.amazon.com/1Please reference the recommended computer specs for any computer the reader plans to use. The lab however already has a computer specifically for research with the vive.
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 2×4 wood to create your own mount for them.
Dynamixel Servo (RX-28) Robotis http://www.robotis.us/dynamixel-rx-28-hn07-n101/ 1 You do not need to use this specific servo, lease please not that some parts of this tutorial may be different depending
USB to Dynamixel Robotis http://www.robotis.us/usb2dynamixel_int/ 1 This is needed to communicate between the dynamixel and computer
SMPS2Dynamixel Robotis http://www.robotis.us/smps2dynamixel/ 1 This is needed to power the dynamixel
12V~5A power adapter Robotis http://www.robotis.us/smps-12v-5a-ps-10-us-110v/ 1 This should be together with the SMPS2Dynamixel
Robot Cable-X4P Robotis http://www.robotis.us/cables/ 2 The actual length does not matter, but the pin type (4pin) does
Male to Female USB Extension Cable Amazon https://www.amazon.com/AmazonBasics-Extension-Cable-Male-Female/dp/B00NH11R3I/ref=sr_1_2?ie=UTF8&qid=1494974321&sr=8-2&keywords=usb+extender+male+to+female 1 This is not necessary for this tutorial but will make your life a lot easier in the last section (we should have a box full of these in the cabinets)


All of the items mentioned above should already be available to your in the lab. Please check with the lab manager or your lab mates for the whereabouts of the various parts.

Setting up Visual Studio Environment for OpenVR


In this section, we will go over how to setup the visual studio environment to be able to develop with the OpenVR SDK. Although it is possible to do with QT as well this tutorial will focus exclusively on Visual Studio. If you need to use QT please refer to the other sample code within the OpenVR folder that is written with QT.

using_htc_vive_to_control_dynamixel_servo.1494976732.txt.gz · Last modified: by keitaronishimura