WorldViz User Forum  

Go Back   WorldViz User Forum > Precision Position Tracker (PPT)

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 01-05-2012, 05:23 PM
surf3rguy surf3rguy is offline
Member
 
Join Date: Jan 2012
Posts: 5
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?
Reply With Quote
  #2  
Old 01-06-2012, 10:15 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
  #3  
Old 01-06-2012, 12:29 PM
surf3rguy surf3rguy is offline
Member
 
Join Date: Jan 2012
Posts: 5
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
Reply With Quote
  #4  
Old 01-06-2012, 03:47 PM
surf3rguy surf3rguy is offline
Member
 
Join Date: Jan 2012
Posts: 5
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.
Reply With Quote
  #5  
Old 01-06-2012, 05:47 PM
surf3rguy surf3rguy is offline
Member
 
Join Date: Jan 2012
Posts: 5
nevermind

I just used the raw data and manipulated the MainView myself. Too much abstraction with the viztracker. Thanks for your suggestions!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with imported Facegen head Don Vizard 1 11-04-2011 01:27 AM
problem in setting the orientation of bones bharatbhushan Vizard 0 06-30-2009 04:30 AM
orientation question whj Vizard 3 01-21-2009 11:22 AM
tracking head rotation orientation VAmanda Vizard 3 09-21-2005 04:57 PM
Translate Head Pos to Starting Pos via Key vjonshih Vizard 1 09-20-2004 01:13 PM


All times are GMT -7. The time now is 03:25 AM.


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