You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble accessing the "gaze" data on my own unity application using the Pupil Labs Unity plugin.
For calibration I am using the pupil manager prefab with an added "WorldCamera" that starts as activated, is deactivated on calibration start up, then reactivated again after calibration is successful.
After the calibration procedure, I deactivate the calibration camera and activate the "WorldCamera." After doing such, I set the following lines of code:
PupilSettings.Instance.currentCamera = Camera.main; // I confirmed this is the camera I want it to be
PupilTools.IsGazing = true;
PupilTools.SubscribeTo("gaze");
After reading the documentation I expected the code in the function InitializeSubscriptionSocket of connection.cs to be called every time the hardware detects a gaze:
subscriptionSocketForTopic[topic].ReceiveReady += (s, a) =>
{
int i = 0;
NetMQMessage m = new NetMQMessage();
while(a.Socket.TryReceiveMultipartMessage(ref m)) {
...
switch(msgType) {
...
case "gaze":
case "pupil.0":
case "pupil.1":
var dictionary = MessagePackSerializer.Deserialize<Dictionary<string,object>> (mStream);
...
if (confidence > 0.6f && msgType == "gaze")
PupilTools.gazeDictionary = dictionary;
...
Such that when I call PupilData._2D.GazePosition or PupilData._3D.GazePosition I would receive meaningful data.
However, after the calibration function ends the subscriptionsocket is never called. I suspect this isn't just for the gaze subscription either.
My suspicion is that something got deactivated which makes the subsciptions void. However, I have yet to prove this.
Any suggestions?
The text was updated successfully, but these errors were encountered:
We've modified that code to also look for the new topics, and now we are catching events. Edit: Tracking was fine after we played with it some more (i.e. user error).
We will prepare a pull request with our small changes but it's possible that we missed something else that has changed in either the message format or the content.
I'm having trouble accessing the "gaze" data on my own unity application using the Pupil Labs Unity plugin.
For calibration I am using the pupil manager prefab with an added "WorldCamera" that starts as activated, is deactivated on calibration start up, then reactivated again after calibration is successful.
After the calibration procedure, I deactivate the calibration camera and activate the "WorldCamera." After doing such, I set the following lines of code:
After reading the documentation I expected the code in the function InitializeSubscriptionSocket of connection.cs to be called every time the hardware detects a gaze:
Such that when I call
PupilData._2D.GazePosition
orPupilData._3D.GazePosition
I would receive meaningful data.However, after the calibration function ends the subscriptionsocket is never called. I suspect this isn't just for the gaze subscription either.
My suspicion is that something got deactivated which makes the subsciptions void. However, I have yet to prove this.
Any suggestions?
The text was updated successfully, but these errors were encountered: