WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Precision Position Tracker (PPT) (https://forum.worldviz.com/forumdisplay.php?f=9)
-   -   sensors confused (https://forum.worldviz.com/showthread.php?t=2615)

hahaho 03-14-2010 07:26 PM

sensors confused
 
I want to use the sensor of the three.
these sensors want to fixed number[A,B,C], (no value[x,y,z])

for example)

sensorA(fixed number) = (10,10,10) <-x,y,z (receive(change) value)
sensorB(fixed number) = (20,20,20) <-x,y,z (receive(change) value)
sensorC(fixed number) = (30,30,30) <-x,y,z (receive(change) value)


so, i am used this code.






Code:

vrpn = viz.add('vrpn7.dle')
sensorA = vrpn.addTracker('PPT0@166.104.29.228',0)
sensorB = vrpn.addTracker('PPT0@166.104.29.228',1)
sensorC = vrpn.addTracker('PPT0@166.104.29.228',2)

def update():
      position1 = sensorA.getPosition()
      position2 = sensorB.getPosition()
      position3 = sensorC.getPosition()
   
      a =  position1[0]
      a1 = position1[1]
      a2 = position1[2]
   
      b = position2[0]
      b1 = position2[1]
      b2 = position2[2] 

      c = position3[0]
      c1 = position3[1]
      c2 = position3[2]
     
      A = [a,0,a2]
      B = [b,0,b2]
      C = [c,0,c2]
     
      # vector
      v1 = vizmat.VectorToPoint(A,B)
      v2 = vizmat.VectorToPoint(A,C)
      v = vizmat.AngleBetweenVector(v1,v2)
      Forearm.setEuler([0,0,-v])
      UpperArm.setEuler([0, -30, -80])

      print v
 
vizact.ontimer(0,update)

but , the sensor's number is frequently change.

for example)

sensorB = (10,10,10)
sensorA = (20,20,20)
sensorC = (30,30,30)
.
.
.
sensorC = (10,10,10)
sensorA = (20,20,20)
sensorB = (30,30,30)
.
.

How do i receive the fixed sensor's number?

mspusch 03-15-2010 07:42 AM

If you are using marker-ID markers, you should contact support@worldviz.com about this, if there is marker swapping.

if you use non-marker-ID markers, then you should have a look here for algorithsm that help to distinguish which marker is which for a 2-hands / head setup:

http://forum.worldviz.com/showthread.php?t=175

Jeff 03-15-2010 04:17 PM

If you are using non-marker ID markers another way of ditinguishing head and hands is to use the Mocap post-process plug-in within PPT Studio.


All times are GMT -7. The time now is 05:57 PM.

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