This post first appeared on pygaze.org, in September 2017.
Tobii is a major player in the eye-tracking world, selling devices to customers in business and science. Today, Tobii has made a major step towards supporting open science by adding support for its new SDK in PyGaze (and by extension in OpenSesame). You can review the code on GitHub, download the PyGaze package as a zip, or download a full WinPython version. Details below, and more info on downloading here.
Tobii Pro SDK
Tobii has recently updated their software development kit (SDK), which meant that new Tobii trackers were not supported by the old SDK. That was unfortunate for PyGaze users, as PyGaze only included support for the older version. When this was flagged up on GitHub by user alisdt, Magnus Smedberg from Tobii responded with good news: Tobii was interested in writing a new library to support their new SDK in PyGaze. Today, him and Pedro Alvito uploaded their code to GitHub.
What devices are supported?
The new SDK should support most devices, including devices that were sold before the new SDK was released (Tobii informs us that they retro-fitted the code to work with older devices). That means that you can try to make your old device work with the new code. However, the old Tobii SDK is still supported in PyGaze, so older devices that don’t work with the new SDK are still supported.
How do I use the new SDK?
First, install the software that came with your tracker. Then download the new PyGaze package, and use ‘tobii’ as your TRACKERTYPE in a constants.py file (should be in the same directory as your experiment script).
# To use your code with the new Tobii Pro SDK,
# set the TRACKERTYPE to 'tobii'
TRACKERTYPE = 'tobii'
Can I still use the old SDK?
Yes! You’ll have to make one tiny change to your code, though: The TRACKERTYPE in the constants needs to be set to ‘tobii-legacy’.
# To use your code with the old Tobii SDK,
# set the TRACKERTYPE to 'tobii-legacy'
TRACKERTYPE = 'tobii-legacy'
Can I help?
Tobii Pro Glasses
Another promising Tobii development in PyGaze and OpenSesame is support for the Tobii Pro Glasses 2. This was added by Davide De Tommaso, and is currently ‘experimental’. That means it’s not supported by the core PyGaze team (because we don’t have Tobii Glasses), but maintained by Davide (and potentially other members of the PyGaze community).