Example of capturing eyetracker output in OpenSesame using the Tobii Pro SDK
This example uses inline code in OpenSesame to capture eyetracker output, using the Tobii Pro SDK:
http://developer.tobiipro.com/python/python-sdk-reference-guide.html
Note that support for the Tobii SDK is now in PyGaze and OpenSesame, so you shouldn't need the example here! You may still want to use it if you are doing something fancy like your own custom calibration routine.
If you want to write any output variables alongside eyetracker data, add them to the list cols_results
in the inline code item set_up_eyetracker_output
.
This experiment tries to capture loop variables in OpenSesame and write them alongside eyetracking data. At present this conflicts with a lock in OpenSesame. So do one of the following:
raise osexception(
u"Recursion detected! Is variable '%s' defined in terms of itself (e.g., 'var = [var]') in item '%s'" \
% (var, self.name))
Change raise osexception(
to warnings.warn(
to disable this error.
start_eyetracker
and comment out the code: for k in cols_from_loop:
if var.has(k):
data[k] = var.get(k)