Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Use two eye-trackers at the same time in OpenSesame

Hello!

I want to conduct an eye-tracking experiment where I want to record the Gazepoint HD3 and the Tobii Pro X3-120 simultaneously. I have already successfully got both devices running separately with the PyGaze plugins in OpenSesame.

But as soon as I want to define both as eye-trackers at the same time, my problems start. I cannot insert two init commands, because then I get the error message "You should have only one instance of 'pygaze_init' in your experiment". I also can't copy the code of both init commands into one init block (then the code for one eye-tracker is automatically deleted). 

Does anyone know if it is possible to have both devices recorded at the same time in an OpenSesame experiment? That would be incredibly helpful! Thanks a lot in advance.

Best, Lisa

Comments

  • Hi Lisa,

    As you describe yourself, you can't have two eye trackers running in the same experiment with Opensesame and Pygaze plugin. I am not sure though whether this generally impossible, or could work if you used direct coding (e.g. in Python, maybe even with the Pygaze library). But I would imagine you would need to make sure that the eyetrackers run on different I/O ports or channels. Otherwise they would interfere. Again, whether this is generally possible or not, I don't know.

    Hope this helps a bit.

    Eduard

    Buy Me A Coffee

  • Hey Eduard,

    thanks a lot for your reply! I am currently trying to solve the problem by implementing "Lab Streaming Layer" somehow to synchronize the eye-trackers (unfortunately, there is no direct support for the Gazepoint eye-tracker I want to use). If this does not work, I will definitely try using direct coding as you suggested.

    Best, Lisa

  • Hello again!

    I am currently trying the option suggested by Eduard, to use direct coding to include multiple eye-trackers at the same time in OpenSesame. Yet, I am still struggling with this. I am able to use the functions described in the OpenSesame PyGaze documentation (https://osdoc.cogsci.nl/3.2/manual/eyetracking/pygaze/#function-overview), but for using them I need to embed the PyGaze init-item (plug-in) first. When I try to embed two init-items (one for the Gazepoint eye-tracker and the other one for the Tobii eye-tracker) I get the error message that I can only include one init-item. Does anyone know how to inititate eye-trackers using the inline python script?

    I can't even record one eye-tracker with this method. Here is an example of how I tried to call the function, but it does not work:

    Thank you in advance!!

    Best, Lisa

  • Hi Lisa,

    I don't think you can directly use the pygaze functions. As these are also used by the plugins in Opensesame. Instead, I would recommend you go through the source code of Pygaze and try to follow how connections with the Eyetracker is established. Based on that code you might be able establish a connection with the trackers. For example, here is the main code how Pygaze interacts with Eyelink trackers: https://github.com/esdalmaijer/PyGaze/blob/master/pygaze/_eyetracker/libeyelink.py

    But again, to be clear, even though I proposed this idea, I have no idea whether it works. In fact, I have the hunch it won't, but please prove me wrong.

    Good luck!

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    I tried some different things and actually found a method that worked (but not in OpenSesame)! Instead, I used Rapunzel and wrote the code manually. I used an example experiment provided in the pygaze documentation ("simple tracker experiment") as orientation, and manually wrote the code. By using the pygaze functions via code, I could define two eye-trackers at the same time. For example:

    Thank you very much for your help!

    Best, Lisa

  • Very cool! If you eventually make your experiment work, it would be nice if you could post your code/experiment. This might be interesting for other users.

    Thanks

    Buy Me A Coffee

Sign In or Register to comment.