![]() |
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() |
Is the tracker positioned in a angle on the HMD? if so you need to compensate for that.
|
Hi sleiN13,
thank you very much for replying, but could you better explain what you mean with "Is the tracker positioned in a angle on the HMD?" I'm not sure I understand what you mean, sorry. |
If the tracker isn't perfectly level on all axis and you don't compensate for that in your code you get the behaviour you described earlier.
|
Hi sleiN13,
thank you for clarifying, hope I understand what you mean now. However, with Vicon Bonita you have a set of markers (we put 5) on the HMD and after initially calibrating the tracker and building the volume with its x,y and z axes, one builds the object to track based on the position of the markers and this object (in the script I posted is called head2) then is used by Vizard to update the subject position etc...so it is at level since is built on the HMD, maybe you were thinking to a different kind of tracker? or maybe I didn't get you yet? thanks again |
That is indeed a different kind of tracker.
|
OK, any idea what can be wrong then? Any help would be really appreciated...Has maybe something to do with the yaw, pitch, roll?
|
OK I solved it, now works perfectly...here is how for anyone else might need it in future...
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]) link = viz.link(headTrkr,viz.MainView) link.preEuler([-45, 0, 0]) print headTrkr.getEuler() print viz.MainView.getEuler() print viz.MainView.getAxisAngle() print headTrkr.getAxisAngle() |
All times are GMT -7. The time now is 05:29 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC