GithubHelp home page GithubHelp logo

harplab / gazetracking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from personalrobotics/gazetracking

1.0 3.0 1.0 62 KB

Eye gaze tracking using Pupil Labs head-mounted tracker.

CMake 6.17% Python 93.83%

gazetracking's Introduction

gazetracking

Eye gaze tracking using Pupil Labs head-mounted tracker.

Publishing gaze positions with ROS

Start Pupil Capture. Ensure that the Pupil Remote plugin is running (available in Pupil Capture under "General" -> "Open plugin").

Ensure that the Pupil Remote IP and port are set to match the values in pupil_listener.py (usually tcp://127.0.0.1:50020).

Run the pupil listener:

rosrun gazetracking pupil_listener.py

This should publish information on two ROS topics: pupil_info and gaze_info. The gaze_info topic contains a subset of the information from pupil_info that is most commonly used, specifically the position of the gaze (norm_pos) and the confidence value (confidence).

For more information about the data contained in pupil_info, see the Pupil Capture website here: https://github.com/pupil-labs/pupil/wiki/Data-Format.

Synchronizing time with ROS

Installation

In addition to standard package installable via pip, you'll need to install pyre:

pip install git+https://github.com/zeromq/pyre

Running the service

In a terminal, after sourcing ros, run

rosrun gazetracking ros_pupil_time_sync.py

Then, in Pupil Capture, enable the plugin Time Sync. It should show some debug messages, and the ros window should show a message like

"<hostname>" joined "default-time_sync-v1" group. Announcing service.

To test the time synchronization, you can use the utility get_pupil_time.py in this package. It should print the current ROS time and the current Pupil Capture time. If they are not identical, something's not set up correctly.

Note that due to a fundamental Python issue, ros_pupil_time_sync.py is not interruptible with Ctrl-C. If you want to quit it, kill it from another thread with kill -9 PID. The following absurd bash command will scrape ps for the right process and kill it for you:

kill -9 $(ps a | grep ros_pupil_time_sync | head -1 | tr -s " " | cut -d " " -f 1)

gazetracking's People

Contributors

ajdroid avatar hadmoni avatar rmaronson avatar sharedautonomy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

xlhou

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.