WorldViz User Forum  

Go Back   WorldViz User Forum > Precision Position Tracker (PPT)

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-02-2008, 10:36 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The script sending the data out should look something like this:
Code:
import viz
viz.go()

#Connect to tracker
tracker = ...

#Create network object for sending tracking data
network = viz.addNetwork('ComputerName')

#Setup timer to output send data every frame
def SendTrackingData():
	pos = tracker.getPosition()
	quat = tracker.getQuat()
	network.send(pos=pos,quat=quat)
vizact.ontimer(0,SendTrackingData)
Your simulation script should contain the following code for retrieving the data over the network:
Code:
import viz
viz.go()

#Create empty node that will contain remote tracker data
remoteTracker = viz.addGroup()

#Setup callback to handle network event
def onNetwork(e):
	remoteTracker.setQuat(e.quat)
	remoteTracker.setPosition(e.pos)
viz.callback(viz.NETWORK_EVENT,onNetwork)

#Now use remoteTracker object like any other tracker
viz.link(remoteTracker,viz.MainView)
Reply With Quote
 


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
Problem with tracker after reboot eugcc Precision Position Tracker (PPT) 4 08-03-2009 11:26 PM
Crashing when I select Tracker option GoldenSun Vizard 4 07-01-2008 11:06 AM
tracker commands frequency over the JimB Vizard 3 03-07-2008 09:33 AM
Interface with Tobii Eye Tracker Uttama_vizard Precision Position Tracker (PPT) 1 12-12-2007 11:31 AM
Can Vizard interact with the Arrington eye tracker? Deltcho Vizard 1 09-18-2007 02:38 PM


All times are GMT -7. The time now is 08:23 PM.


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