WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-18-2008, 04:59 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
Flock of Birds

I've got a problem with the flock of birds tracker (from ascension) and Vizard. As soon as I link the tracker (sensor = viz.add('flockofbirds.dls')) by means of the link function (linkviz = viz.link(sensor,viz.MainView)) the mainview point jumps to a different location and the whole image rolls over 90 degrees to the left. Also any movement from the HMD is mapped wrongly. For example head movement from left to right produces a Yaw motion and an Yaw motion from the head turns into an Roll. This is roughly the case because it's not exactly an 1 on 1 mapping.

My question is how do you get the flock of birds working correctly with Vizard because the default code from the examples and demo's all have the side-turned result.
Reply With Quote
  #2  
Old 12-18-2008, 08:13 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
It sound like you just need to swap position and orientation coordinates. Here are two methods available with the link object to do this and some sample code. There is also some more info on these in the command index in the docs. You will just need to pass in the proper values to both of these methods.

Code:
#Swap y,z coordinates
link.swapPos([1,3,2])

#Negate yaw value
link.swapEuler([-1,2,3])
Reply With Quote
  #3  
Old 12-18-2008, 09:24 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The coordinate frame of the sensor is relative to the orientation of the transmitter. If you place the transmitter flat on a table in front of you, with the wire coming towards you, then +Z is forward, +X is right, and +Y is up. Are you sure your transmitter is oriented correctly?
Reply With Quote
  #4  
Old 12-19-2008, 12:55 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
I'm gone try the swapping as soon as possible it sounds very promising.

About the transmitter it's not bolted down to anything so I can't assume it will be in a fixed place every time so I will need to take care of that in the code. Is there any automated way to calibrate that with Vizard?
Reply With Quote
  #5  
Old 12-19-2008, 03:10 AM
sleiN13 sleiN13 is offline
Member
 
Join Date: Dec 2008
Posts: 83
I tried the swapping function with all possible swaps for the Euler but none had the right effect. It looks very much like the axis of the tracker and vizard isn’t aligned with each other.

I tried to figure out over what axis the data in vizard moved when I moved the HMD over an imaginary axis in the real world. With the tracker pointing directly to the front of the HMD and with the tracker cord behind it a straight movement to the left changed both the X and Z position value in Vizard significantly. And with the Roll and Pitch values it was even worse with the Roll value in Vizard changing the most for Pitch and Roll movement of the HMD
Reply With Quote
  #6  
Old 12-19-2008, 11:37 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If the transmitter and receiver are correctly aligned and you are still getting invalid values, then there might be some magnetic interference in your room. Large metal objects near the tracker can cause large errors in the tracking. Also, keep in mind that the range of the Flock-of-Birds is not very far.
Reply With Quote
  #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
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flock of Birds recognized, but no data sent sjroorda Vizard 9 03-01-2016 08:48 PM
wxPython and Flock of Birds Atul Thakur Vizard 3 01-16-2008 11:58 AM
Flock of Birds question (again) Elittdogg Vizard 24 12-04-2007 09:37 AM
Using vrpn_server with Flock of birds sylvain Precision Position Tracker (PPT) 3 11-30-2007 09:45 AM
Flock of Birds Elittdogg Vizard 9 10-02-2007 01:53 PM


All times are GMT -7. The time now is 03:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC