Thread: Flock of Birds
View Single Post
  #7  
Old 02-17-2009, 07:12 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
Thanks for your reply. We tried it in another setup without iron and 100% working equipment (it's regularly being used for experiments) and the problem persisted.

The exact problem we are having is that when we make a pitch movement, we are not looking from the floor to the roof in a straight line but in a bend curve in other words; If you try to follow a line on a wall with your eyes, your view gets shifted away from it. I hope this is clear, we will upload a video later. (http://www.youtube.com/watch?v=WN5Xv8AQlNc)

The movie was made by turning it (pitch) 60 degrees up and down and then turning it slightly over Yaw and do the 60 degrees pitch again. We did this because the problem seems to increase when the yaw angle increases but that could also be a optical illusion. In all movements we kept the HMD with sensor as steady as possible but mind the tracker equipment jitters like crazy. But the error occurs also on correct working equipment.

We don't use the link() method but link the sensor and MainView point with a timer function. We're doing this because in this way we can catch a bit of the jitter and stabilize the image. As you can see in the movie it's not optimal but on the other equipment the image is steady and only the curving problem exists.

Code:
def onTimer(num):
	global prevEuler,prevPos
	
	if prevEuler == None:
		prevEuler = sensor.getEuler()
		prevPos = sensor.getPosition()
			
	newEuler = sensor.getEuler()
	y = round(newEuler[0] - prevEuler[0],1) 
	p = round(newEuler[1] - prevEuler[1],1)
	r = round(newEuler[2] - prevEuler[2],1)
	
	newPos = sensor.getPosition()
	px = round(newPos[0] - prevPos[0],3)
	py = round(newPos[1] - prevPos[1],3)
	pz = round(newPos[2] - prevPos[2],3)
		
	prevEuler = newEuler
	prevPos = newPos
	
	eul = viz.MainView.getEuler()
	pos = viz.MainView.getPosition()
	
	viz.MainView.setEuler(eul[0]+p,eul[1]+r,eul[2]+y)
	
	viz.MainView.setPosition(pos[0]+px,pos[1]+py,pos[2]+pz)

Last edited by sleiN13; 02-17-2009 at 07:18 AM.
Reply With Quote