The TobiiGlassesPyController is an open-source controller for accessing eye-tracking data and for managing recordings, participants and calibrations using the mobile Tobii Pro Glasses 2 eye-tracker. The controller is based on the Tobii Pro Glasses 2 APIs available at:
https://www.tobiipro.com/product-listing/tobii-pro-glasses-2-sdk/
git clone --recursive https://github.com/ddetommaso/tobiiglasses-controller.git
cd tobiiglasses-controller
python setup.py install (for Python 2.x)
or
python3 setup.py install (for Python 3.x)
python -m pip install --upgrade tobiiglassesctrl (for Python 2.7)
or
python3 -m pip install --upgrade tobiiglassesctrl (for Python 3.5)
python -m pip uninstall tobiiglassesctrl (for Python 2.7)
or
python3 -m pip uninstall tobiiglassesctrl (for Python 3.5)
python setup.py sdist
twine upload dist/*
Connect the glasses through Wifi or Ethernet connection. You have 3 methods to connect with the device.
tobiiglasses = TobiiGlassesController()
If you do not pass any parameter to the constructor, a set of discovery packets will be sent through all the network interfaces of your system waiting for an answer from the glasses.
tobiiglasses = TobiiGlassesController("192.168.71.50")
Once a wireless connection with the glasses is established you can run the controller providing the IPv4 address to the constructor.
You can use both IPv4 or IPv6. In case you are using IPv4, ensure to have a DHCP server running in your machine. In case of IPv6, ensure that the network is configured as link-local.
tobiiglasses = TobiiGlassesController("fe80::76fe:48ff:ff00:hell")
In case you have multiple network interfaces in your system, please specify the network interface-name when you create a TobiiGlassesController object:
For Linux systems you should specify the name of the net interface ...
tobiiglasses = TobiiGlassesController("fe80::76fe:48ff:ff00:ff00%eth0")
For Windows systems you should specify the net interface index
tobiiglasses = TobiiGlassesController("fe80::76fe:48ff:ff00:ff00%7")
Python examples are available in the examples folder of the tobiiglasses-controller
git clone --recursive https://github.com/ddetommaso/tobiiglasses-controller.git
cd tobiiglasses-controller/examples