WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-05-2007, 02:14 PM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
boresite?

Hi all,
One more quick question - does Vizard have built-in boresite function? In other words, is there a way to compensate for the distance between the tracker mounting point and the eyepieces of an HMD? I thought of using the translate function, but that's absolute coordinates, not relative to the head. Thanks!
Reply With Quote
  #2  
Old 10-05-2007, 02:26 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Can you describe the hardware setup you are using?
Reply With Quote
  #3  
Old 10-05-2007, 05:05 PM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
Sure - we have a Kaiser SR80A with the tracker mounted to the top. It's roughly 13cm aft and 15cm above the eyepieces. So when I link the main window to the tracker, it's actually showing a point that far away from the person's viewpoint. Thanks!
Reply With Quote
  #4  
Old 10-08-2007, 09:34 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Sorry, I meant what tracking hardware are you using. In either case, you can apply an offset to the tracker link. Example:
Code:
#Add 6DOF tracker
tracker = viz.add('tracker.dls')

#Link tracker to main view
headLink = viz.link(tracker,viz.MainView)

#Apply offset to head to account for physical tracker offset
headLink.preTrans(0,-0.15,0.13)
Let me know if you have problems with this.
Reply With Quote
  #5  
Old 10-09-2007, 08:35 AM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
Sorry about that - we're using an Intersense IS-900 tracker.

I'll try the .preTrans, but could you please explain to me how it differs from view.translate? The vizard help file only explains that it "will pre-multiply the matrix with the specified translation", which I don't quite understand. Does this mean that it works with the node's local coordinates instead of the global coordinates? This is what we need, so the viewpoint is always + 0.13m in front of the tracker, not .13m frontward in z-space.

Thanks!
Reply With Quote
  #6  
Old 10-09-2007, 08:47 AM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
Hi farshizzo,
My explanatory question above still stand, but in addition...it doesn't work! I keep getting the error:
AttributeError: 'VizSensor' object has no attribute 'preTrans'

Here's my code, which as near as I can tell follows both your example and the code in the <link>.preTrans help file:

view = viz.MainView
#Link viewpoint with tracker, initialize boresite
if keyControl == 1: #If you're using the tracker
headTrack = viz.add('tracker.dls')
viz.link(headTrack, view) #Link the sensor to the view.
headTrack.preTrans(0,-.15,.14) #Boresite function - translates the viewpoint from the tracker position to eyepoint position
viz.eyeheight(0.0) #This is to compensate for vizard's intrinsic eyeheight of 2m
viz.ipd(eyeohd/100.0) #Set ipd from input above

Additionally, I've tried (had been using) viz.addSensor('intersense') - that doesn't work either, but are these commands redundant? Thanks.
Reply With Quote
  #7  
Old 10-09-2007, 08:52 AM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
Sorry, one more comment for your reference - the viz.add('tracker.dls') doesn't work with intersense, so I had to go back to using viz.addSensor('intersense'). That does work for tracking, though the boresite still doesn't work.
Reply With Quote
  #8  
Old 10-09-2007, 10:03 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I did not expect that to work, it was just a placeholder since I didn't know what tracker you are using. Just replace it with your actual tracker. Please look at the example again. It performs the preTrans on the link object, not the sensor object. In your code you are performing the preTrans on the sensor. You might want to have a look at the documentation for using links. It should explain how they work.

To answer your first question, preTrans will perform the translation in the objects local coordinate system.
Reply With Quote
  #9  
Old 10-09-2007, 12:11 PM
JMOwens JMOwens is offline
Member
 
Join Date: Jun 2007
Location: Providence, RI
Posts: 34
Thanks!

Ah, I understand now - I had linked the viewpoint with the tracker, but I hadn't initialized it as an object I could operate on. It seems to be working now. Thanks for bearing with me!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Jump


All times are GMT -7. The time now is 07:52 AM.


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