PyGaze supports Tobii Pro SDK

TL;DR

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

Background

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.

Tobii Pro Spectrum

Tobii Pro Spectrum. More info on the Tobii website.

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).

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’.

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).

9 Comments:

  1. 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.

    • Hi Luca,

      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’ calibrate function. 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.

      Good luck!
      Edwin

      • HI edwin,
        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?
        Dimitri

        • 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.

  2. Hello,
    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.
    Thank you.

    • Hi Crina,

      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.

      Cheers,
      Edwin

  3. Hello,

    I am new to PyGaze, can i ask a basic question? Does PyGaze work with Tobii SDK on Mac? Thank you.

    • Hi Ivy,

      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.)

      Good luck!
      Edwin

  4. I want to use tobii eye tracker on my Ubuntu machine. Is it possible to do that, and if do support me to do that

Leave a Reply to Crina Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">