esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
677 stars 211 forks source link

Do you support eyetribe eye-tracker? #19

Closed hejibo closed 9 years ago

hejibo commented 10 years ago

Do you support eyetribe eye-tracker? I hope to do eye-tracking using eyetribe eye-tracker. Here is some package pyTribe.py for eyetribe eye-tracker. I am wondering how to make it work for either PyGaze or PsychoPy. Thanks!

https://github.com/psychopy/psychopy/blob/7a6ffe699341338d1054f930b17e3027f11bc96d/psychopy/iohub/devices/eyetracker/hw/theeyetribe/pyTribe.py

esdalmaijer commented 10 years ago

Hi, and thanks for your interest! We're currently working on PyGaze and PyTribe integration. To clarify: this is our own EyeTribe communication routine; the one you link to was written by Sol Simpson (@isolver), and seems to be designed specifically to work with psychopy (on top of the iohub framework, which I think was designed specifically to support lots of different types of eyetrackers).

Currently, our implementation does not allow for a proper calibration via the API yet, but work on this is planned for this week. To give you a more realistic time frame: I hope to finish the EyeTribe support for PyGaze by the end of this month.

smathot commented 10 years ago

I hope to finish the EyeTribe support for PyGaze by the end of this month.

Nice, I just received mine today!

esdalmaijer commented 10 years ago

I'm very happy to report that the EyeTribe tracker support now works! Please do keep in mind that the code is experimental. Everything worked nicely when I just tested it on a win7 setup, but please do test your own setups and report any issues here.

To use the EyeTribe support, download the latest snapshot (by going here, and clicking the Download ZIP button), and place it in the site-packages directory of your Python installation. In your constants.py file, define TRACKERTYPE = 'eyetribe'.

@smathot So cool! Have fun messing around with it! BTW: I'm very curious to see whether the new EyeTribe functionality works with OpenSesame too. I'm a bit concerned about all the multi-threading in the pytribe's EyeTribe class; would that work within OpenSesame? All Threads are daemon, so they won't play up in a crash, but I'm not quite up to date with what you and @dschreij did with multi-threading in running experiments (so no clue if there's problems to expect there).

KNOWN ISSUES:

hejibo commented 10 years ago

Great! Thanks. I am on travel now. I will test it on August 20 after I come back home. Thanks for the great work.

Jibo

On Mon, Aug 11, 2014 at 6:39 PM, Edwin Dalmaijer notifications@github.com wrote:

I'm very happy to report that the EyeTribe tracker support now works! Please do keep in mind that the code is experimental. Everything worked nicely when I just tested it on a win7 setup, but please do test your own setups and report any issues here.

To use the EyeTribe support, download the latest snapshot (by going here https://github.com/esdalmaijer/PyGaze, and clicking the Download ZIP button), and place it in the site-packages directory of your Python installation. In your constants.py file, define TRACKERTYPE = 'eyetribe'.

KNOWN ISSUES:

  • Saccade detection seems to pick up only saccades of large amplitudes. This is a result of the saccade detection algorithm. Please implement your own dispersion based algorithm if you wish to detect saccades better.

— Reply to this email directly or view it on GitHub https://github.com/esdalmaijer/PyGaze/issues/19#issuecomment-51855570.

dschreij commented 10 years ago

Hi Edwin,

Nice work! I already had a play around with the last version last week. I’m happy to report that I gladly look at bikini’s and surrounding area’s…

I can’t find a constants.py file. Do I have to create it myself? Also, is the plugin already working together with OpenSesame? In the last snapshot it said OpenSesame support was started, but you can’t select the EyeTribe tracker in the module’s dropdown list. For now, I’m going to give the standalone module a spin!

Best,

Daniel

From: Edwin Dalmaijer [mailto:notifications@github.com] Sent: dinsdag 12 augustus 2014 1:44 To: esdalmaijer/PyGaze Cc: Daniel Schreij Subject: Re: [PyGaze] Do you support eyetribe eye-tracker? (#19)

I'm very happy to report that the EyeTribe tracker support now works! Please do keep in mind that the code is experimental. Everything worked nicely when I just tested it on a win7 setup, but please do test your own setups and report any issues here.

To use the EyeTribe support, download the latest snapshot (by going here https://github.com/esdalmaijer/PyGaze , and clicking the Download ZIP button), and place it in the site-packages directory of your Python installation. In your constants.py file, define TRACKERTYPE = 'eyetribe'.

@smathot https://github.com/smathot So cool! Have fun messing around with it! BTW: I'm very curious to see whether the new EyeTribe functionality works with OpenSesame too. I'm a bit concerned about all the multi-threading in the pytribe's EyeTribe class; would that work within OpenSesame? All Threads are daemon, so they won't play up in a crash, but I'm not quite up to date with what you and @dschreij https://github.com/dschreij did with multi-threading in running experiments (so no clue if there's problems to expect there).

KNOWN ISSUES:

— Reply to this email directly or view it on GitHub https://github.com/esdalmaijer/PyGaze/issues/19#issuecomment-51855570 . https://github.com/notifications/beacon/689044__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzQxOTgzMywiZGF0YSI6eyJpZCI6Mzg4MDEwODR9fQ==--c2fbd0f9ca3eaf05233a336fc1e073181fe3031a.gif

dschreij commented 10 years ago

I think you meant defaults.py, in which TRACKERTYPE should be edited!

From: Edwin Dalmaijer [mailto:notifications@github.com] Sent: dinsdag 12 augustus 2014 1:44 To: esdalmaijer/PyGaze Cc: Daniel Schreij Subject: Re: [PyGaze] Do you support eyetribe eye-tracker? (#19)

I'm very happy to report that the EyeTribe tracker support now works! Please do keep in mind that the code is experimental. Everything worked nicely when I just tested it on a win7 setup, but please do test your own setups and report any issues here.

To use the EyeTribe support, download the latest snapshot (by going here https://github.com/esdalmaijer/PyGaze , and clicking the Download ZIP button), and place it in the site-packages directory of your Python installation. In your constants.py file, define TRACKERTYPE = 'eyetribe'.

@smathot https://github.com/smathot So cool! Have fun messing around with it! BTW: I'm very curious to see whether the new EyeTribe functionality works with OpenSesame too. I'm a bit concerned about all the multi-threading in the pytribe's EyeTribe class; would that work within OpenSesame? All Threads are daemon, so they won't play up in a crash, but I'm not quite up to date with what you and @dschreij https://github.com/dschreij did with multi-threading in running experiments (so no clue if there's problems to expect there).

KNOWN ISSUES:

— Reply to this email directly or view it on GitHub https://github.com/esdalmaijer/PyGaze/issues/19#issuecomment-51855570 . https://github.com/notifications/beacon/689044__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzQxOTgzMywiZGF0YSI6eyJpZCI6Mzg4MDEwODR9fQ==--c2fbd0f9ca3eaf05233a336fc1e073181fe3031a.gif

smathot commented 10 years ago

@dschreij

I think you meant defaults.py, in which TRACKERTYPE should be edited!

If you create a constants.py, this will override the settings in defaults.py. So the idea is basically that you leave defaults.py as is.

Also, is the plugin already working together with OpenSesame? In the last snapshot it said OpenSesame support was started, but you can’t select the EyeTribe tracker in the module’s dropdown list.

I just committed an update to the OpenSesame plug-ins to support the EyeTribe. That's basically just adding it to the drop-down menu, all the actual work is handled in PyGaze. For me, it works reasonably well, although I often get connection errors, particularly during the calibration. The errors vary, so I don't have any detailed report or fix yet. It's also not specific to OpenSesame--I get the same thing when running a standalone script.

At any rate, for your hacking pleasure, you can get the latest update from my fork. (Edwin is away on holiday, so I don't suspect he'll be around here much.)

esdalmaijer commented 10 years ago

Just got back and merged the commits Sebastiaan mentioned.

@dschreij Thanks for sharing your results on the example. All this data is leading me to believe looking at boobies might be common behaviour in men. Will investigate further...

On a more serious note:

Thanks to Sebastiaan's last two pull requests, OpenSesame support should be completely functional.

The constants.py file is something you create for every new PyGaze experiment, to change only the constants that you want changed. As Sebastiaan mentioned: these override the default values specified in defaults.py. The idea behind this, is that you only edit defaults.py once (to make it match your setup), and then use a constants.py to change only those constants that you need changed to save you some time. I'm currently working on a different approach, with a central constants dict that can be changed at runtime (work in progress, no clue when it's finished yet, but will be backwards compatible with having a separate constants.py file!).

esdalmaijer commented 9 years ago

PyGaze and EyeTribe seem to work nicely, so I'm closing this issue. For specific problems, please open a new issue, or inquire on the forum.