cube_joystick arJoystickDriver define filter_axis_0 getCurrentEventAxis 0.000031 * setCurrentEventAxis enddef define filter_axis_1 getCurrentEventAxis -0.000031 * setCurrentEventAxis enddef reaction_timer arReactionTimerDriver cube_tracker arMotionstarDriver initTrackerCalibration initIIRFilter /* Define stuff to rotate & remap positional coordinates and rotate orientation by 135 degrees around Y */ matrix yTransRotMatrix -45. yaxis yTransRotMatrix rotationMatrix vector oldLo vector oldHi vector newLo vector newHi 1.2 -5. 1.2 oldLo vectorStore 10.4 5. 10.4 oldHi vectorStore -5. 0. -5. newLo vectorStore 5. 10. 5. newHi vectorStore vector oldRange vector newRange oldHi oldLo 3 oldRange arraySubtract newHi newLo 3 newRange arraySubtract vector newOldRatio newRange oldRange 3 newOldRatio arrayDivide vector position define rescale_position position oldLo 3 position arraySubtract position newOldRatio 3 position arrayMultiply position newLo 3 position arrayAdd enddef matrix yRotMatrix -135 yaxis yRotMatrix rotationMatrix matrix inputMatrix matrix rotMatrix matrix transMatrix /* Apply transformations that are common to all sensors */ define filter_all_matrices inputMatrix getCurrentEventMatrix /* Extract translation, rotate it by 45 degrees about y */ inputMatrix position extractTranslation yTransRotMatrix position position vectorTransform /* Rescale position coords */ rescale_position /* Rotate rotation component about Y */ inputMatrix rotMatrix extractRotationMatrix yRotMatrix rotMatrix rotMatrix matrixMultiply /* Recombine translational and rotational components */ position transMatrix translationMatrixV transMatrix rotMatrix inputMatrix matrixMultiply /* Apply tracker-calibration lookup table */ inputMatrix inputMatrix doTrackerCalibration inputMatrix setCurrentEventMatrix enddef /* Fix rotational matrix components (depends on how sensors are mounted) */ matrix headZRotMatrix matrix wandZRotMatrix matrix wandTweakMatrix /* Head sensor is mounted sideways */ -90 zaxis headZRotMatrix rotationMatrix /* Wand sensor is mounted upside-down */ -180 zaxis wandZRotMatrix rotationMatrix /* Wand sensor points upwards by about 20 degrees with gamepad held subjectively level (actually tilted up slightly, but it feels right) */ -20. xaxis wandTweakMatrix rotationMatrix matrix wandRotMatrix wandZRotMatrix wandTweakMatrix wandRotMatrix matrixMultiply /* Head-specific filter (applied after generic, above) */ define filter_matrix_0 inputMatrix getCurrentEventMatrix inputMatrix inputMatrix doIIRFilter inputMatrix headZRotMatrix inputMatrix matrixMultiply inputMatrix setCurrentEventMatrix enddef /* Hand-specific filter (applied after generic) */ define filter_matrix_1 inputMatrix getCurrentEventMatrix inputMatrix wandRotMatrix inputMatrix matrixMultiply inputMatrix setCurrentEventMatrix enddef NOTE: inputsimulator is a hack, treated uniquely. In particular, it has no szg_device record as in the above! The cube's configuration has two parts. The user-dependent part is the path wherein executables are searched for. The other part handles the rest. This second part is further subdivided into "everything else" and "graphics" configuration that varies per user (really just varies based on linux or windows). front_wall
right_wall
left_wall
rear_wall
top_wall
bottom_wall
fire_screen
front_window_stereo right_window_stereo left_window_stereo rear_window_stereo top_window_stereo bottom_window_stereo hmd_window_mono Exec paths: replace THE_USER_NAME with your login name. If using Python 2.4 in Windows, change Python22 to Python24. Hosts running Python exes need python in their EXEC_PATH. picasso SZG_EXEC path G:\THE_USER_NAME\bin\win32 joystick SZG_EXEC path G:\THE_USER_NAME\bin\win32 air SZG_EXEC path /home/public/THE_USER_NAME/bin/linux;/usr/bin north SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 south SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 east SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 west SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 top SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 bottom SZG_EXEC path G:\THE_USER_NAME\bin\win32;g:\Python22 Path for python applications. picasso needs it only for locating bundled data (sounds). air SZG_PYTHON path /home/public/THE_USER_NAME/pycube north SZG_PYTHON path G:\THE_USER_NAME\pycube south SZG_PYTHON path G:\THE_USER_NAME\pycube east SZG_PYTHON path G:\THE_USER_NAME\pycube west SZG_PYTHON path G:\THE_USER_NAME\pycube top SZG_PYTHON path G:\THE_USER_NAME\pycube bottom SZG_PYTHON path G:\THE_USER_NAME\pycube fire SZG_PYTHON path G:\THE_USER_NAME\pycube picasso SZG_PYTHON path G:\THE_USER_NAME\pycube Path for python modules. The application directory, SZG_PYTHON/path, and each host's PYTHONPATH are also searched. air SZG_PYTHON lib_path NULL north SZG_PYTHON lib_path NULL south SZG_PYTHON lib_path NULL east SZG_PYTHON lib_path NULL west SZG_PYTHON lib_path NULL top SZG_PYTHON lib_path NULL bottom SZG_PYTHON lib_path NULL fire SZG_PYTHON lib_path NULL Configuration that is basically the same for all users. Graphics comes last. definitions of the cube virtual computers The "standard" virtual computer (trigger on air). cube SZG_CONF location cube cube SZG_CONF virtual true cube SZG_TRIGGER map air cube SZG_MASTER map SZG_DISPLAY2 cube SZG_DISPLAY number_screens 6 cube SZG_DISPLAY0 map top/SZG_DISPLAY0 cube SZG_DISPLAY0 networks cube/internet cube SZG_DISPLAY1 map bottom/SZG_DISPLAY0 cube SZG_DISPLAY1 networks cube/internet cube SZG_DISPLAY2 map north/SZG_DISPLAY0 cube SZG_DISPLAY2 networks cube/internet cube SZG_DISPLAY3 map south/SZG_DISPLAY0 cube SZG_DISPLAY3 networks cube/internet cube SZG_DISPLAY4 map east/SZG_DISPLAY0 cube SZG_DISPLAY4 networks cube/internet cube SZG_DISPLAY5 map west/SZG_DISPLAY0 cube SZG_DISPLAY5 networks cube/internet cube SZG_INPUT0 map air/cube_tracker/joystick/cube_joystick cube SZG_INPUT0 networks internet cube SZG_SOUND map picasso cube SZG_SOUND networks internet Windows-only V.C., trigger on north wincube SZG_CONF location cube wincube SZG_CONF virtual true wincube SZG_TRIGGER map north wincube SZG_MASTER map SZG_DISPLAY2 wincube SZG_DISPLAY number_screens 6 wincube SZG_DISPLAY0 map top/SZG_DISPLAY0 wincube SZG_DISPLAY0 networks cube/internet wincube SZG_DISPLAY1 map bottom/SZG_DISPLAY0 wincube SZG_DISPLAY1 networks cube/internet wincube SZG_DISPLAY2 map north/SZG_DISPLAY0 wincube SZG_DISPLAY2 networks cube/internet wincube SZG_DISPLAY3 map south/SZG_DISPLAY0 wincube SZG_DISPLAY3 networks cube/internet wincube SZG_DISPLAY4 map east/SZG_DISPLAY0 wincube SZG_DISPLAY4 networks cube/internet wincube SZG_DISPLAY5 map west/SZG_DISPLAY0 wincube SZG_DISPLAY5 networks cube/internet wincube SZG_INPUT0 map air/cube_tracker/joystick/cube_joystick wincube SZG_INPUT0 networks internet wincube SZG_SOUND map picasso wincube SZG_SOUND networks internet V.C. for many experiments: Windows-only, trigger on north, with a copy also running on fire. expt_cube SZG_CONF location cube expt_cube SZG_CONF virtual true expt_cube SZG_TRIGGER map north expt_cube SZG_MASTER map SZG_DISPLAY2 expt_cube SZG_DISPLAY number_screens 7 expt_cube SZG_DISPLAY0 map top/SZG_DISPLAY0 expt_cube SZG_DISPLAY0 networks cube/internet expt_cube SZG_DISPLAY1 map bottom/SZG_DISPLAY0 expt_cube SZG_DISPLAY1 networks cube/internet expt_cube SZG_DISPLAY2 map north/SZG_DISPLAY0 expt_cube SZG_DISPLAY2 networks cube/internet expt_cube SZG_DISPLAY3 map south/SZG_DISPLAY0 expt_cube SZG_DISPLAY3 networks cube/internet expt_cube SZG_DISPLAY4 map east/SZG_DISPLAY0 expt_cube SZG_DISPLAY4 networks cube/internet expt_cube SZG_DISPLAY5 map west/SZG_DISPLAY0 expt_cube SZG_DISPLAY5 networks cube/internet expt_cube SZG_DISPLAY6 map fire/SZG_DISPLAY0 expt_cube SZG_DISPLAY6 networks internet expt_cube SZG_INPUT0 map air/cube_tracker/joystick/cube_joystick expt_cube SZG_INPUT0 networks internet expt_cube SZG_SOUND map picasso expt_cube SZG_SOUND networks internet V.C. for reaction-time experiments: Windows-only, trigger on north, with a copy also running on fire, using reaction-timer instead of normal joystick. rt_expt_cube SZG_CONF location cube rt_expt_cube SZG_CONF virtual true rt_expt_cube SZG_TRIGGER map north rt_expt_cube SZG_MASTER map SZG_DISPLAY2 rt_expt_cube SZG_DISPLAY number_screens 7 rt_expt_cube SZG_DISPLAY0 map top/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY0 networks cube/internet rt_expt_cube SZG_DISPLAY1 map bottom/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY1 networks cube/internet rt_expt_cube SZG_DISPLAY2 map north/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY2 networks cube/internet rt_expt_cube SZG_DISPLAY3 map south/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY3 networks cube/internet rt_expt_cube SZG_DISPLAY4 map east/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY4 networks cube/internet rt_expt_cube SZG_DISPLAY5 map west/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY5 networks cube/internet rt_expt_cube SZG_DISPLAY6 map fire/SZG_DISPLAY0 rt_expt_cube SZG_DISPLAY6 networks internet rt_expt_cube SZG_INPUT0 map air/cube_tracker/joystick/reaction_timer rt_expt_cube SZG_INPUT0 networks internet rt_expt_cube SZG_SOUND map picasso rt_expt_cube SZG_SOUND networks internet Windows-only V.C., trigger on fire firecube SZG_CONF virtual true firecube SZG_TRIGGER map fire firecube SZG_MASTER map SZG_DISPLAY6 firecube SZG_DISPLAY number_screens 7 firecube SZG_DISPLAY0 map top/SZG_DISPLAY0 firecube SZG_DISPLAY0 networks internet/cube firecube SZG_DISPLAY1 map bottom/SZG_DISPLAY0 firecube SZG_DISPLAY1 networks internet/cube firecube SZG_DISPLAY2 map north/SZG_DISPLAY0 firecube SZG_DISPLAY2 networks internet/cube firecube SZG_DISPLAY3 map south/SZG_DISPLAY0 firecube SZG_DISPLAY3 networks internet/cube firecube SZG_DISPLAY4 map east/SZG_DISPLAY0 firecube SZG_DISPLAY4 networks internet/cube firecube SZG_DISPLAY5 map west/SZG_DISPLAY0 firecube SZG_DISPLAY5 networks internet/cube firecube SZG_DISPLAY6 map fire/SZG_DISPLAY0 firecube SZG_DISPLAY6 networks internet firecube SZG_INPUT0 map air/cube_tracker/joystick/cube_joystick firecube SZG_INPUT0 networks internet firecube SZG_SOUND map picasso firecube SZG_SOUND networks internet fire-only V.C. vfire SZG_CONF virtual true vfire SZG_TRIGGER map fire vfire SZG_MASTER map SZG_DISPLAY0 vfire SZG_DISPLAY number_screens 1 vfire SZG_DISPLAY0 map fire/SZG_DISPLAY0 vfire SZG_DISPLAY0 networks internet vfire SZG_INPUT0 map fire/inputsimulator vfire SZG_INPUT0 networks internet vfire SZG_SOUND map picasso vfire SZG_SOUND networks internet Definitions of search paths that are the same for all users (really just varies with OS). picasso SZG_DATA path g:\Data picasso SZG_SOUND path g:\Sounds picasso SZG_RENDER texture_path g:\Texture picasso SZG_RENDER text_path g:\Texture\Text joystick SZG_DATA path g:\Data joystick SZG_SOUND path g:\Sounds joystick SZG_RENDER texture_path g:\Texture joystick SZG_RENDER text_path g:\Texture\Text air SZG_DATA path /home/public/Data air SZG_SOUND path /home/public/Sounds air SZG_RENDER texture_path /home/public/Texture air SZG_RENDER text_path /home/public/Texture/Text north SZG_DATA path c:\Data;g:\Data north SZG_SOUND path g:\Sounds north SZG_RENDER texture_path g:\Texture north SZG_RENDER text_path g:\Texture\Text south SZG_DATA path c:\Data;g:\Data south SZG_SOUND path g:\Sounds south SZG_RENDER texture_path g:\Texture south SZG_RENDER text_path g:\Texture\Text east SZG_DATA path c:\Data;g:\Data east SZG_SOUND path g:\Sounds east SZG_RENDER texture_path g:\Texture east SZG_RENDER text_path g:\Texture\Text west SZG_DATA path c:\Data;g:\Data west SZG_SOUND path g:\Sounds west SZG_RENDER texture_path g:\Texture west SZG_RENDER text_path g:\Texture\Text top SZG_DATA path c:\Data;g:\Data top SZG_SOUND path g:\Sounds top SZG_RENDER texture_path g:\Texture top SZG_RENDER text_path g:\Texture\Text bottom SZG_DATA path c:\Data;g:\Data bottom SZG_SOUND path g:\Sounds bottom SZG_RENDER texture_path g:\Texture bottom SZG_RENDER text_path g:\Texture\Text fire SZG_DATA path c:\Data;g:\Data fire SZG_SOUND path g:\Sounds fire SZG_RENDER texture_path g:\Texture fire SZG_RENDER text_path g:\Texture\Text misc. definitions air SZG_FARO probe_radius 0.23 air SZG_FAROCAL coord_transform NULL air SZG_FAROCAL cube_width 9.86 air SZG_FAROCAL data_file temp.xml air SZG_FAROCAL data_render_scale_factor 10 air SZG_FAROCAL filter arFaroCalFilter air SZG_FAROCAL grid_cube_size .2 air SZG_FAROCAL num_divisions 7 air SZG_FAROCAL num_samples 60 air SZG_INPUT filter arTrackCalFilter air SZG_MOTIONSTAR IIR_filter_weights 0/0.9/0 air SZG_MOTIONSTAR calib_file FaroCalLookupTables.txt air SZG_MOTIONSTAR use_button false air SZG_MOTIONSTAR IPhost 130.126.127.69 Experiment-related parameters north SZG_EXPT save_data false north SZG_EXPT file_name Demo north SZG_EXPT method enumerated north SZG_EXPT subject DEMO north SZG_EXPT path G:\Experiments south SZG_EXPT path G:\Experiments east SZG_EXPT path G:\Experiments west SZG_EXPT path G:\Experiments top SZG_EXPT path G:\Experiments bottom SZG_EXPT path G:\Experiments fire SZG_EXPT path G:\Experiments joystick SZG_RT com_port 1 Head parameters (on master & controller) north SZG_HEAD eye_spacing 0.2 north SZG_HEAD eye_direction 1/0/0 north SZG_HEAD mid_eye_offset 0.29/0/0.25 north SZG_HEAD fixed_head_mode false fire SZG_HEAD eye_spacing 0.2 fire SZG_HEAD eye_direction 1/0/0 fire SZG_HEAD mid_eye_offset 0.29/0/0.25 fire SZG_HEAD fixed_head_mode false air SZG_HEAD eye_spacing 0.2 air SZG_HEAD eye_direction 1/0/0 air SZG_HEAD mid_eye_offset 0.29/0/0.25 air SZG_HEAD fixed_head_mode false This is the true mid-eye offset. An incorrect one is used because it makes the tracker error and latency less noticeable during head turns. north SZG_HEAD mid_eye_offset 0.29/0/-0.21 Locate the inputsimulator nicely on fire, the psych experimenter's console. fire SZG_INPUTSIM position 600/100 north SZG_DISPLAY0 name front_window_stereo east SZG_DISPLAY0 name right_window_stereo west SZG_DISPLAY0 name left_window_stereo south SZG_DISPLAY0 name rear_window_stereo top SZG_DISPLAY0 name top_window_stereo bottom SZG_DISPLAY0 name bottom_window_stereo fire SZG_DISPLAY0 name hmd_window_mono