WorldViz User Forum  

Go Back   WorldViz User Forum > Plug-in development

 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-14-2008, 12:32 PM
dudey12 dudey12 is offline
Member
 
Join Date: Feb 2008
Posts: 5
Send a message via MSN to dudey12
Here is the code that I'm using:

from datetime import datetime
import viz
viz.go()

#Add a grounds
#viz.add('tut_ground.wrl')

#PORT_VICON = '130.15.96.174'

#Specify the IP address of the Vicon server. Default port is 800.
#If you wanted to specify port 803, you would do the following:
#PORT_VICON = '128.2.4.78:803'

PORT_VICON = '130.15.96.174:800'
viz.move(0,-2,-4)

#The number of markers to connect to
VICON_MARKERS = 3

#Move the viewpoint back 8 meters

m1 = viz.add('vicon.dls')
b1 = viz.add('white_ball.wrl')
viz.link(m1,b1)

#print m1.getData()

m2 = viz.add('vicon.dls')
b2 = viz.add('white_ball.wrl')
viz.link(m2,b2)



#m3 = viz.add('vicon.dls')
#b3 = viz.add('white_ball.wrl')
#viz.link(m3,b3)

ANIMATE = 1
ANIMATE_RATE=0.1

def mytimer(num):
print datetime.now()
print m1.getPosition()
print m2.getPosition()
#print m3.getPosition()


viz.callback(viz.TIMER_EVENT, mytimer)
viz.starttimer(ANIMATE,ANIMATE_RATE,viz.FOREVER)

As mentioned previously, this code performs perfectly for two markers but complains when a third or fourth is added.
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
Vicon Plugin Micheal Plug-in development 2 08-29-2007 03:03 AM


All times are GMT -7. The time now is 12:52 AM.


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