NPTrackingTools new dll version problem

Post Reply
stanedav
Posts: 6
Joined: Wed Oct 26, 2011 2:49 am

NPTrackingTools new dll version problem

Post by stanedav »

Hello,
I'm using Optitrack V120 Trio camera in my C# project. In this project I am using NPTrackingTools library for capturing data from camera (both versions x86 and x64). With older libraries everything goes without problem, but with newer version I am always getting this error:
Unable to load dll file - exception 0x8007007E

I don't know, how to describe "version" of library so I can provide sizes here:
Old versions, used without problem:
NpTrackingTools.dll 6516 kB
NpTrackingTools.x64.dll 15477 kB
New versions, with error:
NPTrackingTools.dll 23991 kB
NpTrackingTools.x64.dll 28228 kB

Sourcecode from my C# wrapper:

Code: Select all

	[DllImport("NPTrackingTools.dll", EntryPoint = "TT_Initialize", CallingConvention = CallingConvention.Cdecl)]
	public static extern int TT_Initialize();

	[DllImport("NPTrackingTools.dll", EntryPoint = "TT_CameraCount", CallingConvention = CallingConvention.Cdecl)]
	public static extern int TT_CameraCount();

	[DllImport("NPTrackingTools.dll", EntryPoint = "TT_Update", CallingConvention = CallingConvention.Cdecl)]
	public static extern int TT_Update();
Please help me, where is the problem. Thanks
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: NPTrackingTools new dll version problem

Post by steven.andrews »

Hello stanedav,

Thank you for reaching out to us regarding your issue.
Are you running the new libraries on the same machine that Motive and its API were originally installed on?

It is important that the Motive Installer that originated the NPTrackingTools.dll file being used was run on the machine in which you are trying to load the DLL. NPTrackingTools.dll has prerequisites like all software. The MSVC 2010 run-time libraries are a good example of these dependencies. They will change minor versions from one installer to the next due to things like security updates pushed by Microsoft. These can change major versions as well due to upgrading our development environment.

If these DLLs are being pulled directly from the Motive install directory and copied to another machine, it is likely there will be problems due to dependencies that have not been installed. Could you please let us know if this sounds like the workflow you are following, or if you have run the complete Motive installer on the machines being used?

Best regards,
Steven
--
Steven Andrews
OptiTrack | Customer Support Engineer
stanedav
Posts: 6
Joined: Wed Oct 26, 2011 2:49 am

Re: NPTrackingTools new dll version problem

Post by stanedav »

Thanks for the answer, I got your point.
On my PC is installed newest version of Motive and Camera SDK - with all dependencies, that I was asked for during installation. Everything works fine, when I am using old versions of libraries in my project. (When I replace them by newer version, I will get the error "Unable to load dll file - exception 0x8007007E.").
Maybe, there is new dependency, which is connected to newer version of libraries, but I wasn't asked to install it during Motive installation.
Here is list (sorry for image) of my MSVC libraries installed:
Image
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: NPTrackingTools new dll version problem

Post by steven.andrews »

Hi stanedav,

Thanks for your reply.
Just to confirm, you have run the newest version of our Motive installer on the machine that you are experiencing the problem on? And the problem only exists when using the new libraries that were installed?

How are you switching between using the new libraries and the old libraries?

Steven
--
Steven Andrews
OptiTrack | Customer Support Engineer
barneygumble
Posts: 10
Joined: Wed Oct 14, 2009 2:28 am
Location: France, Bordeaux

Re: NPTrackingTools new dll version problem

Post by barneygumble »

Dear all,

I'm using NPTrackingTools.dll (32bits) with Matlab since 2010, using a method similar to this one: http://www.mathworks.com/matlabcentral/ ... ols_demo.m.
After a Motive update, it appears that the available functions in NPTrackingTools.dll have change. For instance, in the library from 1.7.5, the function 'TT_TrackableCount' return the number of rigid bodies defined in the project. In the library from Motive 1.8, this function have change of name ('TT_RigidBodyCount'), and in the 1.9 version, this function disappeared.
My main concern is: where can I have, now, the direct access to TT_TrackableCount or TT_TrackableLocation (for instance)?

Thanks for your help!
Etienne
steven.andrews
NaturalPoint Employee
NaturalPoint Employee
Posts: 720
Joined: Mon Jan 19, 2015 11:52 am

Re: NPTrackingTools new dll version problem

Post by steven.andrews »

Hi Etienne,

Thank you for reaching out to the community regarding your questions.
I am using Motive 1.9, and the TT_RigidBodyCount() function is still available.

Have you tried looking at the markers.cpp example that installs with Motive? (Motive\Samples\markers\)

There are sections in this sample code that display how to access the tracked objects, as well as their position and orientation data. The workflow may have changed since 2010, but all of this information is still available through the API.

Cheers,
Steven
--
Steven Andrews
OptiTrack | Customer Support Engineer
Post Reply