Tobii Pro SDK Python API
create_eyetracker.py
1 def execute(address):
2  # <BeginExample>
3  import tobii_research as tr
4 
5  # address = "tet-tcp://12.13.14.15"
6  eyetracker = tr.EyeTracker(address)
7 
8  print("Address: " + eyetracker.address)
9  print("Model: " + eyetracker.model)
10  print("Name (It's OK if this is empty): " + eyetracker.device_name)
11  print("Serial number: " + eyetracker.serial_number)
12 
13  if tr.CAPABILITY_CAN_SET_DISPLAY_AREA in eyetracker.device_capabilities:
14  print("The display area can be set on the eye tracker.")
15  else:
16  print("The display area can not be set on the eye tracker.")
17 
18  if tr.CAPABILITY_HAS_EXTERNAL_SIGNAL in eyetracker.device_capabilities:
19  print("The eye tracker can deliver an external signal stream.")
20  else:
21  print("The eye tracker can not deliver an external signal stream.")
22 
23  if tr.CAPABILITY_HAS_EYE_IMAGES in eyetracker.device_capabilities:
24  print("The eye tracker can deliver an eye image stream.")
25  else:
26  print("The eye tracker can not deliver an eye image stream.")
27 
28  if tr.CAPABILITY_HAS_GAZE_DATA in eyetracker.device_capabilities:
29  print("The eye tracker can deliver a gaze data stream.")
30  else:
31  print("The eye tracker can not deliver a gaze data stream.")
32 
33  if tr.CAPABILITY_HAS_HMD_GAZE_DATA in eyetracker.device_capabilities:
34  print("The eye tracker can deliver a HMD gaze data stream.")
35  else:
36  print("The eye tracker can not deliver a HMD gaze data stream.")
37 
38  if tr.CAPABILITY_CAN_DO_SCREEN_BASED_CALIBRATION in eyetracker.device_capabilities:
39  print("The eye tracker can do a screen based calibration.")
40  else:
41  print("The eye tracker can not do a screen based calibration.")
42 
43  if tr.CAPABILITY_CAN_DO_MONOCULAR_CALIBRATION in eyetracker.device_capabilities:
44  print("The eye tracker can do a monocular calibration.")
45  else:
46  print("The eye tracker can not do a monocular calibration.")
47 
48  if tr.CAPABILITY_CAN_DO_HMD_BASED_CALIBRATION in eyetracker.device_capabilities:
49  print("The eye tracker can do a HMD screen based calibration.")
50  else:
51  print("The eye tracker can not do a HMD screen based calibration.")
52 
53  if tr.CAPABILITY_HAS_HMD_LENS_CONFIG in eyetracker.device_capabilities:
54  print("The eye tracker can get/set the HMD lens configuration.")
55  else:
56  print("The eye tracker can not get/set the HMD lens configuration.")
57  # <EndExample>