This ROS package maps user's gaze data from the Pupil Labs eye tracker, onto a different video feed, using markers and feature matching.
-
Ubuntu 16.04
-
ROS Kinetic installation. Older versions may work but are not tested.
-
Install Pupil Capture Download here
-
Install pip
sudo apt-get install python-pip
sudo pip install --upgrade pip
-
Install zmq
sudo pip install pyzmq
-
Install sox
sudo apt-get install sox
-
Place the folder pupil_ros to your catkin workspace, and build the ROS package.
cd Path/To/catkin_ws
catkin_make
source devel/setup.bash
This will build six custom ROS messages: pupil, pupil_positions, gaze, gaze_positions, surface_position, accu
-
Print markers
Print the QR-code like trackers. They can be found inside the markers/ folder
-
Make pupil_zmq_ros_pub.py executable
cd to the installed pupil_ros package in your catkin workspace:
cd ~/catkin_ws/src/pupil_ros/scripts
chmod +x pupil_zmq_ros_pub.py main_run_v4.py audio_output.py start_pupil.py
-
Launch ROS package:
roslaunch pupil_ros pupil_ros.launch
Pupil Capture will launch automatically.
-
Set correct settings in Pupil Remote:
-
Load plugin Pupil_Remote and Frame_Publisher
-
Set localhost to 50010
-
Set Frame Publisher to bgr
-
Calibrate Pupil Remote
Calibrate the eye tracker using a calibration method of your choice.
-
Setup rosbag record
rosbag record matcher/gaze_accu
-
Quit recording when ready
-
Make csv file with custom BAGFILE_NAME and LOGFILE_NAME (or logfile.txt)
rostopic echo -b BAGFILE_NAME.bag -p /matcher/gaze_accu > LOGFILE_NAME.csv
This software is released under the Apache 2.0 license.