PDA

View Full Version : CAVE tracking question


NASA GRC
03-01-2010, 09:11 AM
I'm having some trouble getting cave tracking to work correctly. I've implemented it successfully on our one-wall system (using VRPN), but am having frustrations on our four-wall system. To solve my problems, I need a better understanding of whats going on in the example code in the vizard documentation.

This line:
cave.setTracker(pos=viewtracker)

should that be sufficient in linking the viewpoint to the tracker? By using this line alone in our fourwall system, there is an apparent linkage occuring, but the results are not accurate.

When I add this line:
caveorigin = vizcave.CaveView(viewtracker)

that solves some problems but introduces others.

Then the following lines:
origintracker = viztracker.KeyboardMouse6DOF()
originlink = viz.link (origintracker, caveorigin)

from the docs confuse me. Namely, why is the caveorigin being assigned the viewtracker at initialization, when its value is just being overwritten with the vizlink later? In fact, in my one-wall solution, I set the matrix of caveorigin explicitly as a result of lots of matrix math from the wand values. Why is the viewtracker value used with caveorigin to begin with?

So my two questions are:

1) should that first line of code alone be sufficient in setting the tracker to the viewpoint (hypothetically if moving the origin is not desired)?

2) why is viewtracker used to initialize caveorigin, when caveorigin is redefined later with vizlink.

These answers should help me find where my troubles are. Thanks.

farshizzo
03-01-2010, 09:40 AM
In the example from the docs, viewtracker represents the users physical eye location with respect to the wall corners. As mentioned in the docs, cave.setTracker does NOT update the main viewpoint, it is only used to update the projection frustum for each wall.

The user still needs to apply the tracking data to the viewpoint. This is where the CaveView object comes into play. It represents the position of the user in the virtual world. The virtual viewpoint consists of the virtual origin plus any physical movement of the head, this is why CaveView uses viewtracker to initialize.

The link between origintracker and caveorigin is created to allow the user to control the virtual position of the cave using an input device (ie. keyboard).

Hope this clears things up.

NASA GRC
03-01-2010, 12:53 PM
yes, that clears things up greatly.

Turns out my trouble is due to a calibration problem in our optical tracking system, which is also new to us, but I needed to understand this code better to know what was going on and where to look.

Thank you, very much.