View Single Post
  #2  
Old 06-05-2016, 10:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
All the wall corners need to be specified in the tracking system's coordinates. In this case you need to account for the image rise off of the floor:

Code:
# Declare constants defining the CAVE dimensions
#height from floor to display 32 inches
#height of display 42.875 inches
W = 1.724       # 67.875 inches wide
H = 1.902       # 74.875 inches tall
R = 0.81        # 32 inches rise off floor
D = 1.438       # 56.625 inches deep

W2 = W/2.0
C0 = -W2,H,0     # Front  Wall: C1,C2,C5,C6
C1 = -W2,H,D     # Left   Wall: C0,C1,C4,C5
C2 = W2,H,D      # Right  Wall: C2,C3,C6,C7
C3 = W2,H,0      # Bottom  Wall: C5,C6,C4,C7
C4 = -W2,R,0
C5 = -W2,R,D
C6 = W2,R,D
C7 = W2,R,0
Unless the ART origin is offset from the ground then it should not be necessary to apply a height offset to the tracker. You can add position offsets by creating a tracker link and applying the offset to the link. For example:

Code:
import viz

# VRPN Tracker connection (to ART Dtrack)
vrpn = viz.add('vrpn7.dle')
headtracker = vrpn.addTracker('DTrack@localhost')           #Default sensor is 0. Head tracker is on DTrack sensor 0
headtracker.swapPos([1,2,-3])
headtracker.swapQuat([-1,-2,3,4])

headTrackerLink = viz.link(headtracker,viz.NullLinkable)
# Adjust for origin offset from ground
headTrackerLink.postTrans([0,1,0])
Reply With Quote