I am using NatNetML.dll to connect to Tracking Tools using MATLAB. The essential functions work, i.e. I can use m_NatNet.GetLastFrameOfData() to get the positions of markers and rigid bodies.
Unfortunately there is no way for me to learn when exactly a new frame is available. I tried to set up a callback in the following way:
Code: Select all
lh = addlistener(m_NatNet,'OnFrameReady',@frame_ready_callback)
Code: Select all
function [ ] = frame_ready_callback( src, evnt )
disp('New frame ready.')
end
Do I maybe need to specify my own event? I wouldn't think so, especially that I am not sure how this should be done. I was under the impression that adding a listener should be enough, but it doesn't do the trick.