SMI Eyetracker iViewXAPi

Hi Fabian,

First of all, the psychopy.org documentation is missing, but you can find generally accurate documentation here: http://www.isolver-solutions.com/iohubdocs/iohub/api_and_manual/device_details/eyetracker.html

Second, I successfully used PsychoPy and iohub with the iViewX API last year on a SMI RED500 system. I needed very minimal things from it, but once I got the eye-tracker talking to psychopy it looked like I could get it to do whatever I wanted. I was also able to port the whole thing to an EyeLink system a couple months ago with minimal difficulty.

The setup I was on had a separate computer for stimulus presentation and the eye-tracker control, and those two computers were connected on a closed network. I ran iViewX on the eye-tracker control computer and psychopy on the stimulus computer, and just having iViewX running was all I needed, everything else was python. Using iohub I connected to the eye-tracker and the basically just sampled from it in psychopy whenever I wanted to, built my own data structure for the info I got back, and saved what I needed in a CSV. Very simple, but it did what I needed it to do.
EDIT: I just remembered that I needed the API installed on the stimulus presentation computer to make it all work. Important detail!

You should be able to get something working with an iohub_config.yaml file, the relevant piece of which is at the bottom of this post. In your psychopy script, all you should need to start with is:

from psychopy.iohub import launchHubServer
io=launchHubServer(iohub_config_name='iohub_config.yaml')
tracker=io.devices.tracker

Then, when you want to run calibration:

calib = tracker.runSetupProcedure('CALIBRATION_STATE')

And then to start getting data, the following two lines:

tracker.setRecordingState(True) 
tracker.enableEventReporting(True)

From there out you can just ask the eye-tracker for information whenever you need it. I only wanted fixation location, so every call after that is simply:

gpos = tracker.getLastGazePosition()

But there are getEvents functions which can get you much more complete information. Hope all that helps!

Here’s my iohub_config info:

SMI iView Config

- eyetracker.hw.smi.iviewx.EyeTracker:
    name: tracker
    save_events: True
    stream_events: True
    event_buffer_length: 1024
    monitor_event_types: [ BinocularEyeSampleEvent, FixationStartEvent, FixationEndEvent]
    network_settings:
        send_ip_address: 169.254.101.116
        send_port: 4444
        receive_ip_address: 169.254.10.231
        receive_port: 5555	            
    runtime_settings:
        sampling_rate: 250
        track_eyes: BINOCULAR_AVERAGED
        sample_filtering:
            FILTER_ALL: FILTER_OFF            
        vog_settings:
            pupil_measure_types: PUPIL_DIAMETER
    calibration:
        type: NINE_POINTS
        auto_pace: Yes
        pacing_speed: SLOW
        screen_background_color: 125
        target_type: CIRCLE_TARGET
        target_attributes:
            target_size: 30
            target_color: 239
            target_inner_color: RED
        show_validation_accuracy_window: False
    model_name: RED
3 Likes