WorldViz User Forum

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

wouters 04-16-2008 11:32 AM

Intersense Eyeheight
 
Hi,

I am using an Intersense tracker and I can't seem to get the eye height correct. I want the current height of the view to be the same as the physical height of the HMD helmet I am tracking with the Intersense tracker. When I was reading through the documentation, it sounded like I needed to use viz.eyeheight(0.0) so that it would add 0 to the height the tracker was returning. Unfortunately, instead of making the eye height match the height of the HMD, it sets the height of the HMD to be 0.0.

Here is the code that I am using to set this up:


Code:

if viz.get(viz.TRACKER):
        v = viz.add('intersense.dls')
        viz.mouse.setVisible(viz.OFF) #Hide mouse
        viz.tracker()
        # Link sensor to view point and don't use eyeheight
        view = viz.MainView
        headLink = viz.link( v, view , dstFlag = viz.LINK_POS_RAW)
        headLink.preTrans([0, -0.0375, 0.20]) # Offset eyepoint from tracking point
                                #on helmet by 20cm forward and 3.75 cm down
       
        viz.eyeheight(0.0)
        print 'eyeheight: '
        print headLink.getPosition()
        print v.getPosition()
                        # This doesn't give us the correct eye height

        tracking = 1
else:
        tracking = 0

Any suggestions would be helpful.

Thanks,
Leah

farshizzo 04-16-2008 11:43 AM

Try removing the viz.tracker() command from your code. That command should not be used and only exists for backward compatibility with older scripts.

wouters 04-16-2008 01:15 PM

Thanks. Its working now!

Leah


All times are GMT -7. The time now is 06:48 AM.

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