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 Pro'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 2.7 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 Pro SDK from PyPI, you will use the pip command line tool. If you have Python 2 with the version 2.7.9 or above installed from python.org, you will already have pip and setuptools, but will 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 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 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 PYTHON_PATH.
The Eye Tracker Manager (ETM) is an independent tool that can be handy to use when developing eye tracking applications. With the ETM you can browse and change settings, as well as perform calibrations, on all screen based eye trackers* compatible with the Pro SDK as well as update the firmware on some eye tracker models. The ETM can also be used to troubleshoot your own application for connection errors since if the ETM can find and interact with an eye tracker, then the SDK should be able to do the same. The ETM can be downloaded from here .
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 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 either a
tobii_research.ScreenBasedCalibration or a
tobii_research.HMDBasedCalibration object (depending on the type of eye tracker). The
tobii_research.HMDBasedCalibration 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 an
EyeTracker object and want to subscribe to gaze data, subscribe to either
EYETRACKER_HMD_GAZE_DATA (depending on the type of eye tracker). The data will be available as
HMDGazeData respectively. 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.