WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   boresite? (https://forum.worldviz.com/showthread.php?t=1234)

JMOwens 10-05-2007 02:14 PM

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!

farshizzo 10-05-2007 02:26 PM

Can you describe the hardware setup you are using?

JMOwens 10-05-2007 05:05 PM

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!

farshizzo 10-08-2007 09:34 AM

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.

JMOwens 10-09-2007 08:35 AM

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!

JMOwens 10-09-2007 08:47 AM

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 .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.

JMOwens 10-09-2007 08:52 AM

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.

farshizzo 10-09-2007 10:03 AM

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.

JMOwens 10-09-2007 12:11 PM

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!


All times are GMT -7. The time now is 05:29 AM.

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