With this SDK you will be able to easily find and get data from your Tobii eye tracker. If you are new to eye tracking we recommend that you spend some time exploring the content in Tobii's Learn & Support section of the Tobii Pro website . There you will find a lot of information about how eye tracking works in general and how to design studies.
In the Common concepts section of this website, you will find information about concept referenced in the SDK documentation which are common for all SDK languages. This includes, but are not limited to, things like the different coordinate systems used as well as how time stamps are defined.
The Tobii Pro SDK for Python is designed to be a natural part of Python and, as such, there are two ways you can install it; either by downloading it and installing it manually, or by using PyPI which requires an internet connection.
To install the Tobii Pro SDK from PyPI, you will use the pip command line tool. If you have Python installed from python.org, you will most likely already have pip and setuptools installed, but might need to upgrade to the latest version of pip. To do this, type the following on the command line and press Enter:
On Linux or OS X:
pip install -U pip setuptools
python -m pip install -U pip setuptools
Otherwise, you can install pip following the instructions in the user guide on python.org .
When you have pip installed, run the following command to install the Tobii Pro SDK:
pip install tobii_research
Once the installation is completed, verify that the packaged installed successfully by running the following command.
For more information about how to use PyPI, please refer to the PyPi website .
Visit our download site for the Tobii Pro SDK , and download the latest version of the Tobii Pro SDK Python Binding for your platform. The package includes all files you will need to develop an application that communicates with a Tobii Pro eye tracker. Extract the files and put them where you usually keep your development files.
Extract all files for your platform to the same directory as your source files, or add the directory to PYTHONPATH.
Most eye tracking applications follow the same pattern in terms of in which order functionality is used. The order is usually as follows:
To do this with the Tobii Pro SDK is very simple:
Start with importing
tobii_research, and use either the
tobii_research.find_all_eyetrackers function to get a list of available eye trackers,
or create a
tobii_research.EyeTracker object from an address (URI).
The objects returned from
find_all_eyetrackers are instances of
tobii_research.EyeTracker. Through those objects you can interact with the eye trackers.
To calibrate the eye tracker, use a
tobii_research.ScreenBasedCalibration object. The
tobii_research.ScreenBasedCalibration class requires a
tobii_research.EyeTracker object to be passed to the constructor. More information about how a calibration works can be found in the section Calibration.
When you have the
EyeTracker object and want to subscribe to gaze data, subscribe to either
EYETRACKER_GAZE_DATA. The data will be available as
GazeData. You can also get the data as a dictionary if you send
On the Step-by-step page, there's a detailed description on how to perform these steps.