WorldViz User Forum  

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-24-2008, 10:24 PM
Brandyn Brandyn is offline
Member
 
Join Date: Feb 2008
Posts: 4
LED "Enumeration"

I was interested in programming in WorldViz to "enumerate" available LED markers upon the script being ran. Enumeration, in this case, just means to find the maximum number of markers and to have filled a list with all the markers it added.

The only roadblock I see to this is that I'm wondering if there is a null check I can use to tell if the last marker added was "real" or not. It seems to add markers whether or not it has found additional ones-- Should a basic Null check work for this, or would I have to check the data object in each for a marker that had co-ordinates of (0,0,0)?
Reply With Quote
  #2  
Old 02-25-2008, 01:31 PM
Brandyn Brandyn is offline
Member
 
Join Date: Feb 2008
Posts: 4
Basic solution

I'm just replying to this so no one else has to. The viz.add call on the vizppt.dls will return a function call on (-1) when called inappropriately. You could probably parse this if you wanted to; I just did a comparison of the three co-ordinate input to zero values to determine if the sensor was real or phantom. I have yet to test this out, and there's an obvious loophole should anyone ever manage to have a sensor at absolute zero, but this is a statistical improbability.

The tracker will throw errors if you add too many LEDs, so I had a maximum check in there as well, though with the zero check I have yet to have it used.
Reply With Quote
  #3  
Old 02-25-2008, 02:38 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is currently no way to check how many markers the PPT is currently sending. As you mentioned, the position value will be zero for invalid lights. However, you will need to wait a few frames to perform this check to ensure that the plugin has received an update from PPT.
Reply With Quote
Reply


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


All times are GMT -7. The time now is 09:20 AM.


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