Tracking tools - Matlab and Labview

litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Tracking tools - Matlab and Labview

Post by litch09 »

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.
oschnit
Posts: 10
Joined: Sun Aug 16, 2009 11:50 am

Re: Tracking tools - Matlab

Post by oschnit »

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
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Tracking tools - Matlab

Post by beckdo »

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.
litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Tracking tools - Matlab

Post by litch09 »

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?
litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Tracking tools - Matlab

Post by litch09 »

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...
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: Tracking tools - Matlab

Post by VincentG »

FYI, the Tracking Tools software has been updated -

http://www.naturalpoint.com/optitrack/s ... l#software
litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Tracking tools - Matlab

Post by litch09 »

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.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Tracking tools - Matlab

Post by beckdo »

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.
sdougher
Posts: 1
Joined: Wed Jan 20, 2010 3:32 pm

Re: Tracking tools - Matlab

Post by sdougher »

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!
litch09
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Re: Tracking tools - Matlab

Post by litch09 »

I have put this onto the NI website.

http://decibel.ni.com/content/docs/DOC-9171
Post Reply