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?
Yes, please! You can help by testing out the new code, and reporting any issues you might run into. You can do so on GitHub, on the support forum, or by commenting on this post.
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).
Can pygaze be used with tobii 4c eye tracker?
I would like to use a solution which allow me to use this eyetracking with AAC software like I would have the Dynavox windows control (which I don’t have).
Also interested to know whether pygaze supports features like, calibration, mouse emulation like Dynavox windows control does for instance with the pc mini eye tracker.
Thanks in advance.
This comes down to whether your 4C is supported by the Tobii Pro SDK. If I recall correctly, this is only possible if you bought an additional research license from Tobii. However, I’m not completely sure, so you’d have to check with Tobii’s support directly.
In general, PyGaze works with the Tobii Pro SDK, so if your tracker works with that, your tracker should work with PyGaze.
Calibration is supported in the Tracker class’
calibratefunction. Mouse control is not supported out of the box, but is something that you could develop yourself using PyGaze. Note that this is a Python library, so it helps you do the programming, but it doesn’t just do all the things out of the box.
Tobii 4C is supported by the pro SDK if you buy a research licence. I have this 4C system, “unlock” with the pro licence. However if i try to run pygaze_init on Opensesame, i have the error message “No module named tobii.eye_tracking_io.basic”. Any idea of how i can solve that issued?
I don’t need to load the SDK, i guess it’s included in the pygaze library?
Sounds like you’re using “tobii-legacy” (based on the old Tobii SDK) rather than “tobii” (based on Tobii Pro SDK) as the TRACKERTYPE.
In either case, you’ll need to install the Tobii Python bindings.
I would like to know if I can use PyGaze to run OpenSesame with Tobii software. We have a mountable Tobii x3-120 eye tracker, and we have trouble designing experiments in E-prime. I was wondering if PyGaze works for OpenSesame like Tobii extension works for E-prime.
You can use OpenSesame to create you experiment, and the PyGaze plug-ins within OpenSesame to communicate to your Tobii tracker.
As I understand from Tobii, there is now also an option to build experiments within Tobii Studio, and have those communicate to external applications (like E-Prime and OpenSesame). We’re currently discussing implementing this too, but it’s not available yet.
So, for now, you can build an experiment using the OpenSesame builder, and this should work with Tobii trackers that work with the Pro SDK.
I am new to PyGaze, can i ask a basic question? Does PyGaze work with Tobii SDK on Mac? Thank you.
PyGaze should work on Mac, provided you have Python and all dependencies installed. I’m not sure whether the Tobii Pro SDK works on Mac, though; you’d have to check that with Tobii. (I don’t work on Mac, nor do the stimulus computers at our department.)