WorldViz User Forum sensors confused
 Register FAQ Search Today's Posts Mark Forums Read

#1
03-14-2010, 07:26 PM
 hahaho Member Join Date: Mar 2010 Posts: 6
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')

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?

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements Vizard Precision Position Tracker (PPT) Plug-in development

 Similar Threads Thread Thread Starter Forum Replies Last Post atamasan Vizard 0 08-18-2009 10:33 PM durf Precision Position Tracker (PPT) 1 04-23-2009 12:41 PM durf Vizard 1 03-10-2009 12:52 PM Enlil Vizard 2 08-28-2008 11:28 AM tavaksai Precision Position Tracker (PPT) 9 05-19-2007 04:52 PM

All times are GMT -7. The time now is 01:22 PM.