aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/TobiiGlassesPro2/README.md
blob: 378deb5ab1cb7ebc49ac55a2c94e1fa645e8d15c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# TobiiGlassesPro2

_This module provides a class interface to handle TobbiGlassesPro2 data and video stream.
It is based on [TobiiGlassesPyController package](https://github.com/ddetommaso/TobiiGlassesPyController)._

## To connect Tobii glasses on Mac OS

* Install DHCP server: brew install isc-dhcp

* Setup DHCP server:
    * /usr/local/etc/dhcpd.conf
    * /usr/local/etc/master.conf

* Setup USB LAN Interface:
    * ip: 192.168.1.1
    * subnet: 255.255.255.0
    * router: 192.168.1.254

* Launch Tobii glasses interface to enable USB LAN Interface before to Launch DHCP server.

* Launch DHCP server: sudo /usr/local/sbin/dhcpd

* Kill DHCP server: sudo kill `cat /usr/local/var/dhcpd/dhcpd.pid`

* Watch DHCP server: sudo log stream --info --debug --predicate "process == 'dhcpd'"

## Tobii data structure

Each data frame have the following structure:

```
{
    'mems': {
        'ac': {
            'ts': 1042711827, 
            's': 0, 
            'ac': [0.549, -9.868, 2.203]
        }, 
        'gy': {
            'ts': 1042723807, 
            's': 0, 
            'gy': [2.94, -2.384, 1.428]
        }
    },
    'right_eye': {
        'pc': {
            'ts': 1042743553, 
            's': 0, 'gidx': 39971, 
            'pc': [-35.24, -25.51, -31.66], 
            'eye': 'right'
        }, 
        'pd': {
            'ts': 1042743553, 
            's': 0, 
            'gidx': 39971, 
            'pd': 3.72, 
            'eye': 'right'
        }, 
        'gd': {
            'ts': 1042743553, 
            's': 0, 
            'gidx': 39971, 
            'gd': [0.1833, 0.307, 0.9339], 
            'eye': 'right'
        }
    }, 
    'left_eye': {
        'pc': {
            'ts': 1042743553, 
            's': 0, 
            'gidx': 39971, 
            'pc': [29.96, -27.92, -40.9], 
            'eye': 'left'
        }, 
        'pd': {
            'ts': 1042743553, 
            's': 0, 
            'gidx': 39971, 
            'pd': 4.42, 
            'eye': 'left'
        }, 
        'gd': {
            'ts': 1042743553, 
            's': 0, 
            'gidx': 39971, 
            'gd': [0.1528, 0.2977, 0.9423], 
            'eye': 'left'
        }
    },
    'gp': {
        'ts': 1042743553, 
        's': 0, 
        'gidx': 39971, 
        'l': 82832, 
        'gp': [0.3975, 0.2228]
    }, 
    'gp3': {
        'ts': 1042743553, 
        's': 0, 
        'gidx': 39971, 
        'gp3': [313.64, 542.2, 1728.85]
    }, 
    'pts': {
        'ts': 1042123917,
        's': 0, 
        'pts': 93695,
        'pv': 7
    }, 
    'vts': {
        'ts': -1
    }
}
```