PDA

View Full Version : Head orientation data


bbb
10-26-2016, 06:59 AM
Hi Jeff,
How does Vizard translate the head direction from the Oculus DK2 to shifts in the view? I need to know the head orientation of participant in the experiment as I already asked you about (http://forum.worldviz.com/showthread.php?t=5834) and i thought that maybe i can get it the way Vizard does.

Thanks.

Jeff
10-26-2016, 05:05 PM
Are you using a vizconnect configuration file to connect to the Oculus? If so, viewpoint updates are based on parent nodes in the scenegraph. For example if there is both a tracker and a transport in the scenegraph, the final viewpoint orientation in global coordinates is equal to the transport orientation plus the tracker orientation.

To get a handle to the oculus tracker in a vizconnect based application, use the getTracker command with the tracker name defined in the vizconnect GUI:


oculusTracker = vizconnect.getTracker('head_tracker')


You can get a handle to the viewpoint orientation using the following:

view = viz.MainView


Use vizact.onupdate to register a function and get the tracker or viewpoint data each frame:

def printData():

print 'tracker orientation', oculusTracker.getEuler()
print 'view orientation',view.getEuler()

vizact.onupdate(0,printData)