PDA

View Full Version : HeadTracking Rotation does not match


ChrisMa
11-21-2013, 08:27 AM
Hello everybody,

I really tried hard. But I don't get the Rotation of my Head right. The positional tracking works as I wanted it. Is swapQuat the right command for it? For example, if i roll the Headtarget the view pitches upwards. I don't understand the positions in the swapQuat. 1,2,3 means Rotation around the x,y,z achses from my tracking Device, right? My Tracking Target has the z-axis in viewing direction, y to the sky and x to the left.

The Position in the matrix coresponds to the axis of my mainview. This is Z in the direction of my view and x to the right and y in the sky, right?

head.swapPos([-1,3,-2])
head.swapQuat([-1,3,-2,4])
HeadLink=viz.link(head, viz.MainView)
HeadLink.preEuler([0,0,270])


I just dont get it what to do. Can you help?

Thanks a lot for a quick reply!

Jeff
11-21-2013, 04:34 PM
What tracking system are you using? The following code will do a right-to-left conversion:
#Negate Z value of position
headTracker.swapPos([1,2,-3])

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

ChrisMa
11-22-2013, 01:36 AM
Hi Jeff,

Vicon Tracker.

ChrisMa
11-22-2013, 04:25 AM
I really don't understand it. After two ours of trying I found this as a working solution.
#Negate Z value of position
head.swapPos([-1,3,-2])

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

The Z Value of the Head Target is pointing to the sky, the y-axis in viewwing direction and the x Axis to the right side of the user.


I would really appreciate if you could give me some Input on the swapQuat funkction.

Thanks!