Comments (11)
I modified Titta.init() to pass an optional address, if the address is passed it skips finding eyetrackers, and passes the address to TittaMex.init, and this works.
Patch:
diff --git a/Titta.m b/Titta.m
index 132c34f..b6e59f7 100644
--- a/Titta.m
+++ b/Titta.m
@@ -499,15 +499,18 @@ classdef Titta < handle
end
end
- function out = init(obj)
+ function out = init(obj, address)
% Initialize Titta instance
%
- % Titta.init() uses the currently active settings to
+ % Titta.init([address]) uses the currently active settings to
% connects to the indicated Tobii eye tracker and
- % initializes it.
+ % initializes it. If you pass an optional [address], instead
+ % of searching for eyetrackers it tries to open [address].
%
% See also TITTA.TITTA, TITTA.GETOPTIONS, TITTA.SETOPTIONS
+ if ~exist('address','var'); address = []; end
+
% Load in our callback buffer mex
obj.buffer = TittaMex();
obj.buffer.startLogging();
@@ -519,7 +522,7 @@ classdef Titta < handle
else
wfunc = @pause;
end
- while true
+ while isempty(address)
if iTry<obj.settings.nTryReConnect+1
func = @warning;
else
@@ -575,8 +578,12 @@ classdef Titta < handle
break;
end
end
- % get our instance
+
+ if isempty(address)
theTracker = trackers(qTracker);
+ else
+ theTracker.address = address;
+ end
% provide callback buffer mex with eye tracker
obj.buffer.init(theTracker.address);
I can make a pull request (adding docs to readme) if you want...
from titta.
Hi Ian, I do not know where the problem comes from, haven't seen it (but then i do not regularly use Linux). Is this one system or do you see it on others too?
Glad you found this solution (and glad i exposed the constructor using the address in the MEX, even if the matlab-side didn't use it. Yes, I'd love a pull request, lets make this available, there are probably more use cases than yours.
from titta.
I think this is an mDNS problem somewhere, Tobii uses mDNS to find their eyetrackers, so a change in either their code or the avahi daemon which manages this is the likely culprit. I haven't checked on other machines yet, so it is possible this is some local glitch. I've posted a support request to Tobii anyway to see if they can reproduce.
Pull: #73
I'll have a look through the controller idea later today, the new advanced UI looks nice though I had problems getting a good calibration with it compared to a basic automatic on myself.
from titta.
I'll leave this open as i can't be sure where the problem is for now...
Would you mind testing if https://pypi.org/project/TittaPy/ shows the issue:
import TittaPy
ets = TittaPy.find_all_eye_trackers()
print(ets)
run that a few times in a loop as it may fail every now and then
from titta.
Hi @dcnieho — yes it seems to work fine in TittaPy (Python 3.12), which confuses me as i thought tittaPy was a wrapper for the C SDK and therefore should have the same problem?
from titta.
Note, the feedback from tobii engineers was this discovery problem is some mDNS issue but they couldn't reproduce it on their setup...
from titta.
Hi @iandol. Yeah, TittaPy is just a wrapper around the C SDK, same as TittaMex is, which is why i asked you to test. So, very strange!...
from titta.
Python 3.12.1 (main, Jan 16 2024, 10:35:26) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import TittaPy
>>> ets = TittaPy.find_all_eye_trackers()
>>> print(ets)
[{'device_name': 'TPSP1-010109521381', 'serial_number': 'TPSP1-010109521381', 'model': 'Tobii Pro Spectrum', 'firmware_version': '2.9.0-oculus-0', 'runtime_version': 'Legacy TTP (4.24.0/33)', 'address': 'tet-tcp://169.254.7.39', 'frequency': 600.0, 'tracking_mode': 'human', 'capabilities': [<capability.can_set_display_area: 1>, <capability.has_external_signal: 2>, <capability.has_eye_images: 4>, <capability.has_gaze_data: 8>, <capability.can_do_screen_based_calibration: 32>, <capability.can_do_monocular_calibration: 256>, <capability.has_eye_openness_data: 512>], 'supported_frequencies': [1200.0, 600.0, 300.0, 150.0, 120.0, 60.0], 'supported_modes': ['human', 'monkey', 'great_ape', 'small_monkey']}]
But still nothing in MATLAB, e.g.
>> settings = Titta.getDefaults('Tobii Pro Spectrum');
>> t = Titta(settings);
>> t.init
Warning: Titta: No eye trackers of model 'Tobii Pro Spectrum' connected
> In Titta/init (line 557)
Warning: Titta: No eye trackers of model 'Tobii Pro Spectrum' connected
> In Titta/init (line 557)
Warning: Titta: No eye trackers of model 'Tobii Pro Spectrum' connected
> In Titta/init (line 557)
Error using Titta/init
Titta: No eye trackers of model 'Tobii Pro Spectrum' connected
No eye trackers connected.
>> e=EyeTrackingOperations;
>> e.find_all_eyetrackers()
ans =
[]
There is something being triggered only via the MATLAB interface...
from titta.
I really cannot imagine what that would be. Its exactly the same code under the hood of course, just different wrapper around it for calling that Titta function and converting the return value. Is this only on one system?
from titta.
I've seen the same problem on two different workstations, but that could be that I use the same software tools on each (I use a script to automate my Linux install). But apart from using zerotier as a seperate private network, my network setup is very standard. I use a seperate PCIE network card only for Tobii using the recommended settings, something which always worked without issue before. Passing the address is a fair workaround for the moment... Anyway I think we can close this, thanks @dcnieho!
from titta.
from titta.
Related Issues (20)
- [Not] using multiflip for operator screen HOT 1
- [QUESTION]: Starting and stopping recording, best practice? HOT 11
- Cannot set frequency HOT 3
- Reference to non-existant field 'RMS' HOT 1
- 1.10 API Support HOT 1
- Linux: libtobii_research.so - file too short error HOT 7
- Calibration fails if eye openness is not supported HOT 8
- Linux error on Ubuntu 20.04: glibcxx_3.4.29 not found HOT 3
- Understanding the output file HOT 6
- how to deal with the HOT 1
- how to deal with error 201? HOT 1
- Testing on macOS? HOT 4
- Question concerning calibration data HOT 6
- wrong variable name in comment
- TalkToProLab: proper implementation of attachAOIToVideo
- Export to CSV? HOT 3
- Crash when showing Plot HOT 1
- settings.UI.val.bgColor leaks to subject display? HOT 4
- Calibration face is a oval HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from titta.