WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   LED "Enumeration" (https://forum.worldviz.com/showthread.php?t=1361)

Brandyn 02-24-2008 09:24 PM

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)?

Brandyn 02-25-2008 12:31 PM

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.

farshizzo 02-25-2008 01:38 PM

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.


All times are GMT -7. The time now is 07:29 AM.

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