#1
|
|||
|
|||
Adjusting starting head orientation of viztracker
I want to use viztracker but everytime i set the user in the desired starting position, the head orientation is incorrect. I want to rotate it. i have tried setting the post euler in the vizsetupcfg to what i need it to be, but then the tracking of the head is flipped around. any ideas?
|
#2
|
|||
|
|||
If you face the user towards PPT North with the script running and press 'Alt + r' is the alignment working for you? Try that without the postEuler operator.
Can you attach your vizsetupcfg file with the hardcoded offset? |
#3
|
|||
|
|||
by north do you me actual north or what we consider north in the room? i have not tried it without the posteuler yet. i will do that
|
#4
|
|||
|
|||
Here is what have
# File generated automatically by WorldViz graphical setup tool 3.1
# Setup option Input --> Manufacturer: Keyboard Type: Mouse LR / PageUpDn # Setup option Tracker --> Manufacturer: InterSense Type: VRPN7 + InertiaCube2/3 # Setup option Display --> Manufacturer: NVIS HMD Type: Nvisor SX60 # Setup option Avatar --> Manufacturer: Generic Type: No Avatar # This file must be loaded by the correct version of viztracker.py included with Vizard import viz viz.requireVersion("3.17.0000") # Source code that defines the composite. This is user editable but changes will be lost if this file is regenerated import vizact import vizuniverse as VU import __main__ import hand # Create a custom composite that handles tracking, display, and input devices all together def createCustomComposite(id=0): # ---- Trackers ---- # Initialize an empty composite object to store all the trackers # The composite.storeTracker() method is used to combine the individual trackers for the user's body within the composite composite = VU.VUCompositeTrackersVRPN(hostname='PPT0@128.111. 240.77', magneticzero=0.0, supplementIntersense=3) # ---- Display ---- viz.setOption ('viz.fullscreen', 1) import nvis nvis.nvisorSX60() # ---- Input ---- composite.createLeftHand(hand.MultiInputSensor(pin chButtons=[viz.KEY_PAGE_UP,viz.MOUSEBUTTON_LEFT], fistButtons=[viz.MOUSEBUTTON_MIDDLE])) composite.createRightHand(hand.MultiInputSensor(pi nchButtons=[viz.KEY_PAGE_DOWN,viz.MOUSEBUTTON_RIGHT], fistButtons=[viz.MOUSEBUTTON_MIDDLE])) # ---- Avatar ---- composite.createAvatarNone() # ---- Finalize Composite ---- composite.finishTrackers() # Build up internal links for all the tracking devices # Attach viewpoint to default location on the user composite.getRawTracker(composite.HEAD).getLink(). preEuler([-90,0,0]) #postEuler does not work. but this does composite.getRawTracker(composite.HEAD).getLink(). postTrans([3,0,-3.75])#move the person in the right position composite.defineViewpoint() # ---- Extra Adjustments Editable By The User ---- # Note that the examples below will not work with LiveCharacters, only inputs with individual trackers # composite.getRawTracker(composite.HEAD).getLink(). postEuler([0,0,45]) # Apply 45 degree offset to the head tracker # composite.getLeftHand().setScale([2,2,2]) # Apply scale to the left hand representation # composite.getLeftHand().alpha(0.0) # Make the left hand invisible # composite.getRawTracker(composite.LHAND).getLink() .postTrans([0,-0.5,0]) # Lower the hand tracker 50 cm # composite.setPosScale([2,1,2]) # Scale XZ position of all trackers by a factor of 2x # composite.setOriScale([0,0,0]) # Suppress all orientation changes for all trackers # The following examples are compatible with all kinds of composite objects, including LiveCharacters # composite.getMovableNode().setPosition([1.0,0.0,0.0]) # Move the user and all trackers +1 unit along the X axis # composite.defineViewpoint(offset=[0,0,0]) # Replace above defineViewpoint() call, allows custom offset of viewpoint # ---- Return Back Result ---- return composite # If this script is run directly, then we should allow it to work for testing purposes (normally viztracker.py loads this file in, and this file is not used standalone) if __name__ == "__main__": print 'Manually overriding viztracker to test vizsetupcfg configuration' import viztracker viztracker.createCustomComposite = createCustomComposite viztracker.go() viz.add('gallery.ive') ########### Basically I move the subject within the room. and the rotate the head so that is is starting in the correct position. but then when you move foreward you move to the left in the world, backwards moves right in the world etc etc. Then when I reset using alt r, the room does not match the virtual one. basically we are working in a virtual model of the actual room we are in. |
#5
|
|||
|
|||
nevermind
I just used the raw data and manipulated the MainView myself. Too much abstraction with the viztracker. Thanks for your suggestions!
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with imported Facegen head | Don | Vizard | 1 | 11-04-2011 02:27 AM |
problem in setting the orientation of bones | bharatbhushan | Vizard | 0 | 06-30-2009 05:30 AM |
orientation question | whj | Vizard | 3 | 01-21-2009 12:22 PM |
tracking head rotation orientation | VAmanda | Vizard | 3 | 09-21-2005 05:57 PM |
Translate Head Pos to Starting Pos via Key | vjonshih | Vizard | 1 | 09-20-2004 02:13 PM |