PDA

View Full Version : Polhemus Fastrak Vizard


harshad
06-15-2018, 04:43 AM
import viz
polhemus = viz.add('polhemus.dle')
sensor = polhemus.addFastrak()
data = sensor.getData()
print(data)

--------------------------------------

getData() function returns empty list.


I wish to interact with a virtual environment made in Vizard. I am using polhemus fastrak. Please provide step by step guide to interface sensor with vizard.

Jeff
06-17-2018, 04:08 PM
See the notes on the Polhemus (http://docs.worldviz.com/vizard/#Polhemus.htm) page regarding the fastrak connection. In order for Vizard to connect to the sensors, PiMgr should not be running. The following code will print out the data each frame once a connection is made.

import viz
import vizact
viz.go()

polhemus = viz.add('polhemus.dle')
sensor = polhemus.addFastrak()

def printData():
pos = sensor.getPosition()
ori = sensor.getEuler()
print 'pos',pos
print 'ori',ori

vizact.onupdate(0,printData)

Also, take a look at vizconnect for setting up up a configuration file that connects to the sensor.

harshad
06-19-2018, 02:11 AM
thank you!

I am facing one more issue. Vizard movements are not the same as my movement along x,y,z in physical world. Is there some calibration required. How do I do it?