![]() |
|
![]() |
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
In Vizard, go to Help -- > Check for Updates. Is your version up to date? If not, download and install the most recent version. Do you still get an error when you run the following?
Code:
import viz viz.go() isense = viz.add('intersense.dle') |
#2
|
|||
|
|||
# I just tried and get this work well: orientation & position for one of those 4 # sensers. (try to link View with just one Sensor, each try works.)
# Now I'm trying to use sensor 1 to control orientation& position # and using sensor 2 to replace mouse # sensor 3 & 4 replace left hand and right hand # for sensor 2,3,4, could you give me any idea ? thanks import viz import viztracker viz.go() viz.clearcolor(viz.BLUE) gallery = viz.add('gallery.ive') view = viz.get(viz.MAIN_VIEWPOINT) #tracker = sensor.addTracker()###error #viz.tracker() PORT_INTERSENSE = 1 sensor1 = viz.add('intersense.dls') PORT_INTERSENSE = 2 sensor2 = viz.add('intersense.dls') PORT_INTERSENSE = 3 sensor3 = viz.add('intersense.dls') PORT_INTERSENSE = 4 sensor4 = viz.add('intersense.dls') # link which sensor, which sensor will # control the view orientation and walk position S = sensor1 link = viz.link( S, view )#link the senser to view: perform orientation and #position with head tracker def ontimer(num): #the original pos and euler are [0.0, 0.0, 0.0] pos = S.getPosition() euler = S.getEuler() print pos print euler viz.MainView.setPosition(pos[0]*10,pos[1]+1.82,pos[2]*10) viz.MainView.setEuler(euler[0],euler[1],euler[2]) viz.callback(viz.TIMER_EVENT, ontimer) viz.starttimer(0, 0.01, viz.FOREVER) |
#3
|
|||
|
|||
Please post code using the code tags to preserve indentaton.
Are you saying that if you replace the line Code:
S = sensor1 I'm not sure what you mean by using sensor 2 to replace the mouse. Besides tracking the hands to you also have glove data for them? Either way you can add left and right hand models that are linked to the tracking data. |
#4
|
|||
|
|||
Actually, I need to use four viz.link,
(1) link(Intersense HeadTracker, ViewPoint) (2) link(Intersense Wand, mouse) (3) link(Intersense HandTracker, Data Glove) (4) link(Intersense HandTracker, Another Data Glove) also, the Data Glove is plug in by viz.add('5dt.dls') I want to gain the performance as the following picture I draw. ![]() \ / \ Glove / \ / \ / \ view / the glove locates before our view, and if view move and hand move, the glove will also move. after linking, the position of data glove is far away from viewpoint, even I put the headTracker & Handtracker together. I think it's the problem of controlling positions of device. Is that right ? |
#5
|
|||
|
|||
Hi,
Can u help me with this? I tried to connect Head tracker and Wand at the same time But my wand does not work. My script is wrong link=viz.link( T,mouse). Can u tell me the correct script? import viz import viz import viztracker viz.go(viz.QUAD_BUFFER) viz.clearcolor(viz.BLUE) gallery = viz.add('gallery.ive') view = viz.get(viz.MAIN_VIEWPOINT) PORT_INTERSENSE = 1 sensor1 = viz.add('intersense.dls') PORT_INTERSENSE = 2 sensor2 = viz.add('intersense.dls') S = sensor1 T = sensor2 link=viz.link( S,view) link=viz.link( T,mouse) viz.collision(viz.ON) |
#6
|
|||
|
|||
Two Intersenses
Hi,
Can u help me with this? I tried to connect Head tracker and Wand at the same time But my wand does not work. My script is wrong link=viz.link( T,mouse). Can u tell me the correct script? import viz import viz import viztracker viz.go(viz.QUAD_BUFFER) viz.clearcolor(viz.BLUE) gallery = viz.add('gallery.ive') view = viz.get(viz.MAIN_VIEWPOINT) PORT_INTERSENSE = 1 sensor1 = viz.add('intersense.dls') PORT_INTERSENSE = 2 sensor2 = viz.add('intersense.dls') S = sensor1 T = sensor2 link=viz.link( S,view) link=viz.link( T,mouse) viz.collision(viz.ON) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|