NatNetML.dll - setting a callback in Matlab
Posted: Mon Jan 28, 2013 11:46 pm
Hello,
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:
when my callback function is the following:
Unfortunately it doesn't work and the function is never called. Does anyone have any ideas what I might have done wrong?
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.
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.