forums.naturalpoint.com

Discussion and Support for the OptiTrack, SmartNav and TrackIR brands by NaturalPoint

Tracking tools - Matlab and Labview

by litch09 » Sun Oct 04, 2009 7:12 pm

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

by oschnit » Mon Oct 05, 2009 3:15 pm

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

by beckdo » Tue Oct 06, 2009 10:45 am

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

by litch09 » Tue Oct 06, 2009 5:03 pm

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

by litch09 » Tue Oct 06, 2009 5:41 pm

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

by VincentG » Wed Oct 07, 2009 10:48 am

FYI, the Tracking Tools software has been updated -

http://www.naturalpoint.com/optitrack/s ... l#software
VincentG
 
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

by litch09 » Wed Oct 07, 2009 9:35 pm

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

by beckdo » Thu Oct 08, 2009 12:14 pm

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

by sdougher » Wed Jan 20, 2010 3:37 pm

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

by litch09 » Wed Jan 20, 2010 11:22 pm

I have put this onto the NI website.

http://decibel.ni.com/content/docs/DOC-9171
litch09
 
Posts: 32
Joined: Tue Mar 10, 2009 6:28 pm

Next

Return to Tracking Tools