Tracking tools - Matlab and Labview
Tracking tools - Matlab and Labview
Hi,
I have been trying to use the Tracking Tools API through Matlab.
When I load the library (using the 'loadlibrary' function in Matlab) I am getting the following messages -
Warning: The function 'TT_CameraMarkerCount' was not found in the library
Warning: The function 'TT_CameraMarker' was not found in the library
Warning: The function 'TT_CameraMarkerPredistorted' was not found in the library
Warning: The function 'TT_CameraFrameBuffer' was not found in the library
As a result I do not seem to be able to track any data using any of the other functions.
I have successfully been able to use all functions in the API through Labview (getting marker positions, trackable location/orientation etc), so I am not sure what the problem that Matlab has. Does anyone know that best way to troubleshoot this? Or has anyone had a similar experience?
Cheers,
Glen
PS. I am happy to post my Matlab code if required.
I have been trying to use the Tracking Tools API through Matlab.
When I load the library (using the 'loadlibrary' function in Matlab) I am getting the following messages -
Warning: The function 'TT_CameraMarkerCount' was not found in the library
Warning: The function 'TT_CameraMarker' was not found in the library
Warning: The function 'TT_CameraMarkerPredistorted' was not found in the library
Warning: The function 'TT_CameraFrameBuffer' was not found in the library
As a result I do not seem to be able to track any data using any of the other functions.
I have successfully been able to use all functions in the API through Labview (getting marker positions, trackable location/orientation etc), so I am not sure what the problem that Matlab has. Does anyone know that best way to troubleshoot this? Or has anyone had a similar experience?
Cheers,
Glen
PS. I am happy to post my Matlab code if required.
Re: Tracking tools - Matlab
Hi,
I am very interested in how you were able to use the tracking tools library with labview. It would be great if u can post a short how 2.
Ory
I am very interested in how you were able to use the tracking tools library with labview. It would be great if u can post a short how 2.
Ory
Re: Tracking tools - Matlab
Hey Glen,
Email support@naturalpoint.com and you should be able to ask for a nightly build which likely has this resolved. Additionally, Beta4 will be posted in the next few days which should have this resolved as well.
Email support@naturalpoint.com and you should be able to ask for a nightly build which likely has this resolved. Additionally, Beta4 will be posted in the next few days which should have this resolved as well.
Re: Tracking tools - Matlab
Thanks Doug. I will wait for Beta 4 to be released over the coming days.
Ory - It is relatively simple to build a VI library in Labview from the DLL. To do this, just go to Tools --> Import --> Shared Library (.dll) --> Create VI's for shared library --> Enter the location of DLL and H files (in Tracking Tools directory) and basically just follow the process through (I don't think you will need to change anything).
This will make a VI for all of the available functions in the API, including all possible inputs and outputs.
I am happy to give you my example VI, but I am not sure of the best way to post this... any suggestions anyone?
Ory - It is relatively simple to build a VI library in Labview from the DLL. To do this, just go to Tools --> Import --> Shared Library (.dll) --> Create VI's for shared library --> Enter the location of DLL and H files (in Tracking Tools directory) and basically just follow the process through (I don't think you will need to change anything).
This will make a VI for all of the available functions in the API, including all possible inputs and outputs.
I am happy to give you my example VI, but I am not sure of the best way to post this... any suggestions anyone?
Re: Tracking tools - Matlab
I have put the Labview files up at the following links -
First the VI library in case you haven't been able to build it using the instructions in the earlier post.
http://www.easy-share.com/1908042120/NP ... gTools.zip
Next, an example VI that uses this library to track items (need a project file with trackables in it)
http://www.easy-share.com/1908042111/TT_test.vi
This has been done in Labview 2009...
First the VI library in case you haven't been able to build it using the instructions in the earlier post.
http://www.easy-share.com/1908042120/NP ... gTools.zip
Next, an example VI that uses this library to track items (need a project file with trackables in it)
http://www.easy-share.com/1908042111/TT_test.vi
This has been done in Labview 2009...
Re: Tracking tools - Matlab
FYI, the Tracking Tools software has been updated -
http://www.naturalpoint.com/optitrack/s ... l#software
http://www.naturalpoint.com/optitrack/s ... l#software
Re: Tracking tools - Matlab
Thanks guys. This is now working well in Matlab, and I have been able to make good live plots of position and orientation of the trackables and also the 3D marker positions. The only problem I am having is using the TT_IsTrackableTracked function which seems to return a library pointer... i think this is because Matlab can't handle booleans. Also, i can't seem to unload the library once i am finished and this causes errors when closing matlab (the same is true of Labview).
If anyone would like the Matlab code, then please let me know and I will attempt to share it.
If anyone would like the Matlab code, then please let me know and I will attempt to share it.
Re: Tracking tools - Matlab
I'll double check to make sure things are shutting down properly. However, I'm not sure how to solve your boolean issue. Let me know if you have any ideas.
Re: Tracking tools - Matlab
litch09 had posted some files showing how to interface labview to the optitrack cameras to get tracking info into labview. The link to those files is no longer availabe. Would you mind posting them again or letting me know how to obtain those files. If you'd prefer to email them to me that would work too.
Many thanks!
Many thanks!