WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   marker id plug-in (https://forum.worldviz.com/showthread.php?t=2284)

Vkathrynr 09-24-2009 04:01 PM

marker id plug-in
 
We are trying to track 2 lights, one on the head and one on the hand. The head light should move the view. And the hand light should not be linked to anything, we just get data from it. We have code working without the markerID plug-in, where we just use one light on the head (and when we add it we don't specify ID).

For example:

Code:

headMarker = vrpn.addTracker('PPT0@' + PPT_HOSTNAME)
Then we tried specifying an id for the head marker. We used light 6. So we changed our code to:

Code:

headMarker = vrpn.addTracker('PPT0@' + PPT_HOSTNAME, 5)
We loaded the marker ID plug-in and set marker 6 as active (mapped to virtual ID 6), and the world did not track. We then tried specifying the idea as 6 in our code, just in case. But it still did not track. Data was being printed out on the console though.

How can we get the tracker to update the view when specifying an marker ID?

Working code:
Code:


       
Code:

       
PPT_HOSTNAME = '171.64.32.54'
#
#        # Add the VRPN7 module to Vizard
        vrpn = viz.add('vrpn7.dle')

       
        # We need to create a VRPN connection for each marker in PPT
        trackers = []

                # Make the request for the particular id via VRPN from the hostname
        headMarker = vrpn.addTracker('PPT0@' + PPT_HOSTNAME)
       
        filter = viz.add("filter.dle")
        headMarker = filter.average(headMarker, samples = 5)
        trackers.append (headMarker)
               
        view = viz.MainView
        link = viz.link(headMarker, view)
        link.reset(viz.RESET_X|viz.RESET_Y|viz.RESET_Z)



Broken code:

Code:


       
Code:

       
PPT_HOSTNAME = '171.64.32.54'
#
#        # Add the VRPN7 module to Vizard
        vrpn = viz.add('vrpn7.dle')

       
        # We need to create a VRPN connection for each marker in PPT
        trackers = []

                # Make the request for the particular id via VRPN from the hostname
        headMarker = vrpn.addTracker('PPT0@' + PPT_HOSTNAME, 5)
       
        filter = viz.add("filter.dle")
        headMarker = filter.average(headMarker, samples = 5)
        trackers.append (headMarker)
               
        view = viz.MainView
        link = viz.link(headMarker, view)
        link.reset(viz.RESET_X|viz.RESET_Y|viz.RESET_Z)




Vkathrynr 09-25-2009 03:31 PM

we fixed it
 
The previous inquiry has been solved.


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

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