|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Need help for "Position/Motion Tracking", using "InterSense I-900"
Hi there,
I try to build up a VR system, using hardware: NVIS & InterSense I-900. I write some little program based on Vizard help document, and the "Orientation" worked: if I turn around, the MainView on the screen will rotate. However, I don't know how to perform the "Position tracking": if I walk forward or turn back, the view will also move? Is there any example for solving this problem? Thanks |
#2
|
|||
|
|||
Can you post the code you are testing with? The IS-900 supports position data so if you link the tracker to the view you should see the position change as well.
|
#3
|
|||
|
|||
thank you for your reply, I copy the file to here.
import viz viz.go() viz.add('tut_ground.wrl') viz.clearcolor(viz.GRAY) view = viz.MainView PORT_INTERSENSE = 1 sensor = viz.add('intersense.dls') viz.tracker() link = viz.link( sensor, view )#this link the Sensor's Orientation with View #vrpn = viz.add('vrpn7.dle') #tracker1 = vrpn.addTracker('Tracker0@localhost') #tracker2 = vrpn.addTracker('Tracker0@localhost',1) def onTimer(num):# try to control the MainView's position, by getPosition #from sensor, however, it doesn't work pos = sensor.getPosition() euler = sensor.getEuler() print pos print euler view.setPosition(pos) view.setEuler(euler) viz.callback(viz.TIMER_EVENT,mytimer) viz.starttimer(0,0.01,viz.FOREVER) |
#4
|
|||
|
|||
Hi, Jeff,
If you have time, please give me some idea. thanks |
#5
|
|||
|
|||
Try using the newer intersense.dle plug-in. For more information on using that take a look in the Vizard docs. Does the following script work for you?
Code:
import viz viz.go() isense = viz.add('intersense.dle') tracker = isense.addTracker() viz.link(tracker,viz.MainView) gallery = viz.add('gallery.ive') |
#6
|
|||
|
|||
I used the program you provided, and there is error.
** Load Time: 0.13 seconds ** ERROR: Failed to load plug-in: 'intersense.dle' Traceback (most recent call last): File "<string>", line 11, in ? File "Vizard2.py", line 23, in ? tracker = isense.addTracker() AttributeError: 'VizExtension' object has no attribute 'addTracker' |
#7
|
|||
|
|||
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') |
#8
|
|||
|
|||
# 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) |
#9
|
|||
|
|||
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. |
#10
|
|||
|
|||
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 ? |
#11
|
|||
|
|||
Sorry, I'm not sure where you are getting stuck. Have you successfully connected to 4 sensors at the same time and created 4 working links? You should be doing this with the intersense.dle plug-in as the intersense.dls plug-in is deprecated.
|
#12
|
|||
|
|||
Thanks.
yes, I connected 4 sensor at the same time. but their position and orientation are not precisely, and are difficult to control, some time I can find the hand(5DT_DataGlove), some time I can't. I'm still working on this. BTY, Is the PPT can be controlled precisely? Can we send data of position and orientation to the sensor of PPT? |
#13
|
|||
|
|||
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) |
#14
|
|||
|
|||
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) |
#15
|
|||
|
|||
Hi,
When i activate the intersense, my scene rotates. why? I did not initialise any euler for the view please reply Blesson |
#16
|
|||
|
|||
Scene rotation
Hi,
When i activate the intersense, my scene rotates. why? I did not initialise any euler for the view please reply Blesson |
Thread Tools | |
Display Modes | Rate This Thread |
|
|