View Single Post
Old 06-09-2016, 11:20 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
You will need to account for any origin and heading offset between the PPT and Vive. It maybe easiest to calibrate the Vive trackers to PPT coordinates since the PPT origin and orientation is clearly defined. You can place a Vive controller at the PPT origin and get an idea of the position offset.

Here's some example code to perform the alignment. Orient the HMD and Vive controller so they're facing PPT north and apply the resets:

import viz
import vizact
import vizshape
import steamvr


# Offset when placing Vive tracker at PPT Origin
OFFSET = [0,0,0]

hmd = steamvr.HMD()
headTracker = hmd.getSensor()
viewLink =, viz.MainView)

viveHandControllerList = steamvr.getControllerList()
viveController = viveHandControllerList[0]

vrpn = viz.add('vrpn7.dle')

pptMarker = vrpn.addTracker('PPT0@localhost',1)

pptSphere = vizshape.addSphere(radius=0.02)
viveSphere = vizshape.addSphere(radius=0.02)

pptLink =, pptSphere)
viveLink =, viveSphere)

# Orient both HMD and controller to PPT North before calling reset function
def resetVive():

This can also be done with vizconnect. Get a handle to the tracker links and define the resetVive funtion within the postInit section of the config file. Attached is an example config.
Attached Files
File Type: zip (2.5 KB, 979 views)
Reply With Quote