![]() |
|
#1
|
|||
|
|||
What I've noticed is that the Kinect is indeed not an incredibly accurate tracking system. For our purposes at this moment it is sufficient, but in the future we will want a much more accurate system. However, the scenario as I was describing it, didn't seem to have anything to do with the Kinect, since I didn't change the tracking solution between the scripts where I used either caveorigin or the scene node.
Some code of our setup: The screens are setup at an angle of 90 degrees. The Kinect is setup directly in the middle, which means that it 'looks' at an angle of 45 degrees of the screens. In this setup, each screen is setup diagonally according to the cave coordinates, like so: Code:
#""" Setup CAVE walls W = 0.94 H = 0.531 D = 0.94 TABLEHEIGHT = 0.79 SQRT2 = 0.7071 C0 = -SQRT2*W, H+TABLEHEIGHT, -SQRT2*D C1 = -SQRT2*W, H+TABLEHEIGHT, -SQRT2*D C2 = 0, H+TABLEHEIGHT, 0 C3 = SQRT2*W, H+TABLEHEIGHT, -SQRT2*D C4 = -SQRT2*W, TABLEHEIGHT, -SQRT2*D C5 = -SQRT2*W, TABLEHEIGHT, -SQRT2*D C6 = 0, TABLEHEIGHT, 0 C7 = SQRT2*W, TABLEHEIGHT, -SQRT2*D viz.go(viz.FULLSCREEN) viz.mouse.setVisible(viz.OFF) cave = vizcave.Cave() FrontWall = vizcave.Wall(upperLeft=C1, upperRight=C2, lowerLeft=C5, lowerRight=C6, name='Front Wall' ) cave.addWall(FrontWall, mask=viz.MASTER) BEZEL = 0.05 C2 = 0+BEZEL, H+TABLEHEIGHT, 0-BEZEL/2.0 C3 = SQRT2*W+BEZEL, H+TABLEHEIGHT, -SQRT2*D-BEZEL/2.0 C6 = 0+BEZEL, TABLEHEIGHT, 0-BEZEL/2.0 C7 = SQRT2*W+BEZEL, TABLEHEIGHT, -SQRT2*D-BEZEL/2.0 RightWall = vizcave.Wall(upperLeft=C2, upperRight=C3, lowerLeft=C6, lowerRight=C7, name='Right Wall' ) cave.addWall(RightWall, mask=viz.CLIENT1) #EO Setup CAVE walls""" The Kinect is added to this mix like this: Code:
final = viz.addGroup() #""" Use Kinect for headtracking HEAD = 0 vrpn = viz.addExtension('vrpn7.dle') marker = vrpn.addTracker( 'Tracker0@localhost',HEAD ) linkedView = viz.link(marker, final) # viz.MainView linkedView.setMask(viz.LINK_POS) linkedView.postScale([1, 1, -1]) linkedView.postTrans([0, 1.5, 0]) # Use Kinect for headtracking""" cave.setTracker(pos=final) caveorigin = vizcave.CaveView(final) Code:
#"""use Space Navigator for movement def spacemove(e): position = caveorigin.getPosition() moveTo = vizact.move(e.pos[0]*0.333, e.pos[1]*0.1, e.pos[2]*0.333, e.elapsed*0.5) caveorigin.clearActionList() caveorigin.addAction(moveTo) viz.callback(vizspace.TRANSLATE_EVENT,spacemove) def spacerot(e): angles = caveorigin.getAxisAngle() if angles[1] < 0: angles[3] = -angles[3] caveorigin.setAxisAngle([0,1,0,e.ori[1]*e.elapsed + angles[3]]) viz.callback(vizspace.ROTATE_EVENT,spacerot) #EO use Space Navigator for forward/backward/rotation and keyboard PageUp/PageDown for up/down""" Again, I'm having a hard time reproducing this in a movie or with camera stills. We'll be getting our 3d screens soon and I'll see if that improves this further. Perhaps it has something to do with the fact that our Kinect is for position tracking only and we don't use any rotation for our headtracking? Thanks again and kind regards, Victor |
#2
|
|||
|
|||
Hi Victor,
I'm betting we simply need to get the wall definitions and kinect tracker coordinates working nicely together. Trust vizcave. When things shrink on the walls, this should be compensated for by the user's eyes getting closer to the screen. Lets setup a third person view of the scene. We will add a 3d model to represent the user's head position. The cave.drawWalls() function will come in handy to show our wall definitions. When we have this setup, we test by having the user stand in known physical locations and checking that our virtual 3rd person view shows the users representation in the correct position relative to the walls. I suspect that the problem will come from the offset you do to the Kinect data. We'll need to figure out the postTrans and possibly postEuler so that when people stand in the middle of the cave the viewtracker.getPosition command should return [0, high of person, 0]. Here is some code that does a third person view for the powerwall example script: Code:
import viz import vizcave import viztracker #Dimension of PowerWall in meters WIDTH = 3.0 HEIGHT = 3.0 DISTANCE = 2.0 #Initialize graphics window viz.go() #Create single power wall PowerWall = vizcave.Wall( upperLeft=(-WIDTH/2.0,HEIGHT,DISTANCE), upperRight=(WIDTH/2.0,HEIGHT,DISTANCE), lowerLeft=(-WIDTH/2.0,0.0,DISTANCE), lowerRight=(WIDTH/2.0,0.0,DISTANCE), name='Power Wall' ) #Create cave object with power wall cave = vizcave.Cave() cave.addWall(PowerWall) cave.drawWalls() #Create tracker object using the keyboard (WASD keys control the viewpoint, the user's eye location) #Make the starting location for the user's eye above origin viewtracker = viztracker.KeyboardPos() viewtracker.setPosition(0.0,1.8,0) #Pass the viewpoint tracker into the cave object so it can be automatically updated cave.setTracker(pos=viewtracker) #visualize tracker eyeTrackerRepresentation = viz.add('biohead_eyes.vzf') viz.link(viewtracker, eyeTrackerRepresentation) #Create CaveView object for manipulating the entire cave environment #The caveorigin is a node that can be adjusted to move the entire cave around the virtual environment caveorigin = vizcave.CaveView(viewtracker) #XXX don't work with cave.drawWalls() #Create another tracker using the keyboard and mouse (arrow keys adjust position, mouse changes orientation) #origintracker = viztracker.KeyboardMouse6DOF() ##Link the keyboard/mouse so that it moves the cave and user around the virtual environment #originlink = viz.link (origintracker, caveorigin) #Add gallery environment model viz.add('gallery.ive') BirdEyeWindow = viz.addWindow() BirdEyeWindow.fov(60) BirdEyeWindow.setPosition([0,1]) BirdEyeWindow.setSize(.5, .5) BirdEyeView = viz.addView() BirdEyeWindow.setView(BirdEyeView) BirdEyeView.setPosition([0,6,0]) BirdEyeView.setEuler([0,90,0]) #only show eyeTrackerRepresentation in 3rd person view thirdPersonMask = viz.addNodeMask() eyeTrackerRepresentation.setMask(thirdPersonMask) BirdEyeWindow.setCullMask(thirdPersonMask) for z in range(-2, 2): viz.add('ball.wrl', pos=[0, 1, z])
__________________
Paul Elliott WorldViz LLC |
![]() |
Tags |
headtracking, vizcave |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using vizcave without tracking | pcatalano | Vizard | 3 | 01-08-2013 10:17 AM |
Jumping and Noise in head tracking | cyclonseye | Vizard | 7 | 08-02-2010 10:25 AM |
Head tracking, Flock of Birds and vizcave; how do I connect them? | Arandia | Vizard | 2 | 08-26-2009 04:59 PM |
Head tracking logging & realtime data | tmcw | Vizard | 2 | 08-18-2007 10:31 AM |
tracking head rotation orientation | VAmanda | Vizard | 3 | 09-21-2005 04:57 PM |