Accessing real time data with Matlab and .NET
Posted: Fri Oct 15, 2010 6:27 am
Dear all,
I'm trying to access the Optitrack datas using NatNetML.dll.
First, I take the necessary file in the System folder of Windows, and I load the library under Matlab (R2009b) with the following command:
Opti = NET.addAssembly([mypath '\NatNetML.dll']);
It works. After, I have to create a client objet with the constructor, equivalent to the following C command:
theClient = new NatNetClient(iConnectionType);
In matlab, the NatNetClient class does not exist, I only have NatNetClientML. I try to use the NatNetClientML class as following:
theClient = NatNetML.NatNetClientML
(and various other methods with or without optionnal arguments, different syntax, etc... This syntax works with other .dll that I use for other systems)
It results in an error message ("An external components thread an exception"), and I can't create any object to interact with the server.
Please, can someone give us the few code that allow to create a client object with Matlab? We are many people interested!
Many thanks,
Etienne
I'm trying to access the Optitrack datas using NatNetML.dll.
First, I take the necessary file in the System folder of Windows, and I load the library under Matlab (R2009b) with the following command:
Opti = NET.addAssembly([mypath '\NatNetML.dll']);
It works. After, I have to create a client objet with the constructor, equivalent to the following C command:
theClient = new NatNetClient(iConnectionType);
In matlab, the NatNetClient class does not exist, I only have NatNetClientML. I try to use the NatNetClientML class as following:
theClient = NatNetML.NatNetClientML
(and various other methods with or without optionnal arguments, different syntax, etc... This syntax works with other .dll that I use for other systems)
It results in an error message ("An external components thread an exception"), and I can't create any object to interact with the server.
Please, can someone give us the few code that allow to create a client object with Matlab? We are many people interested!
Many thanks,
Etienne