View Single Post
  #1  
Old 01-09-2012, 04:43 AM
karinp karinp is offline
Member
 
Join Date: Jan 2012
Posts: 6
room tilting when moving head up and down with HMD Nvis SX111

Hi there,

I'm a new bee here and hope you can help me on a matter. I wrote a script that presents randomised rooms with a duck that when shot with a ball falls behind a panel positioned at the corner of the room, then participants are disoriented by spinning and fading the room, and need to find the corner where the duck dissapeared after the room fade in again.

Everything is going quite well except I cannot understand why when looking up with the HMD the room tilts down on the left and when looking down it tilts up on the left. When rotating on the horizontal plan there is not such a problem and everything happens as it should.

I tried with scripts in the tutorial to check whether I was doing something wrong in my script, but the problem is always there no matter which script I run. So I guess I'm forgetting something or doing something wrong when integrating the Vicon Bonita system through Vizard to the HMD Nvis SX111. The initial part of code where I set the tracker and all of that is below...hope someone can help, thank you very much in advance!!

###initial part of the code where setting tracker etc...
import viz
import random
import vizact
import viztask
import glob
import viztracker
import nvis

viz.setMultiSample(4)
viz.fov(60)
viz.setDisplayMode(2560, 1024)
viz.go(viz.QUAD_BUFFER| viz.FULLSCREEN)

nvis.nvisorSX111()

vrpn = viz.add('vrpn7.dle')
headTrkr = vrpn.addTracker("head2@10.0.0.1")

##Negate Z value of position
headTrkr.swapPos([-1,3,-2])

##Negate X,Y value of quaternion
headTrkr.swapQuat([1,-3,2,4])

viz.link(headTrkr,viz.MainView)
print headTrkr.getEuler()
print viz.MainView.getEuler()
print viz.MainView.getAxisAngle()
print headTrkr.getAxisAngle()
Reply With Quote