WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Polhemus Fastrak Vizard (https://forum.worldviz.com/showthread.php?t=6153)

harshad 06-15-2018 04:43 AM

Polhemus Fastrak Vizard
 
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 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.

Code:

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?


All times are GMT -7. The time now is 04:02 PM.

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