-
Notifications
You must be signed in to change notification settings - Fork 29
3. Getting started
The TobiiGlassesController class implements the methods for connecting to the device and for streaming and recording data. Once the TobiiClassesPyController is installed you can start using with Python.
python
>>> from tobiiglassesctrl import TobiiGlassesController
A discovery method is implemented in the controller in such a way, whenever the constructor is called without parameters, it automatically starts searching the device among all the network interfaces available in the host PC. Please be aware that the discovery process is slower than connecting knowing the address of the device, as explained later.
python
>>> from tobiiglassesctrl import TobiiGlassesController
>>> TobiiGlassesController()
[DEBUG]: Looking for a Tobii Pro Glasses 2 device ...
[DEBUG]: Discover request sent to ('ff02::1', 13006) on interface```
Once you know the address of the device is preferably to avoid using the discovery process for connecting.
If the IPv4 address of the device is 192.168.71.50 then you can connect with:
>>> TobiiGlassesController("192.168.71.50")
[DEBUG]: Connecting to the Tobii Pro Glasses 2 ...
[DEBUG]: Tobii Pro Glasses 2 successful connected!
If the IPv4 address of the device is fe80::76fe:48ff:ffff:ffff and the interface is eth0 then you can connect with:
>>> TobiiGlassesController("fe80::76fe:48ff:ffff:ffff%eth0")
[DEBUG]: Connecting to the Tobii Pro Glasses 2 ...
[DEBUG]: Tobii Pro Glasses 2 successful connected!
Firstly, you need to install Docker CE and docker-compose.
cd docker
docker-compose run tobiiglasses2