Commit c0d88c1a authored by Florian Pausch's avatar Florian Pausch

automatic NatNet integration

parent 7f92fd90
......@@ -259,7 +259,7 @@ classdef itaOptitrack < handle
end
properties(SetAccess = 'private', GetAccess = 'private')
dllPath = fullfile(ita_toolbox_path,'applications','Tracking','Optitrack','NatNet_SDK_2-7/lib/x64','NatNetML.dll'); % path to NatNet SDK
dllPath = fullfile(ita_toolbox_path,'applications/Hardware/Tracking/Optitrack/NatNetSDK'); % path to itaOptitrack
timerData = []; % Matlab timer handle
singleShot = 0; % only log 1 frame of tracking data (e.g. for geometric measurement purposes)
correctRowIdx = 1; % idx to fill up Optitrack_obj.rigidBodyLogData.data ignoring duplicate frames
......@@ -290,7 +290,34 @@ classdef itaOptitrack < handle
Optitrack_obj.ip = char(sArgs.ip);
Optitrack_obj.port = char(sArgs.port);
NET.addAssembly(Optitrack_obj.dllPath);
% Check if NatNet dll's are existing
if ~exist(Optitrack_obj.dllPath,'dir')
% create directory
mkdir(Optitrack_obj.dllPath)
fprintf( '[itaOptitrack] NatNet SDK not found. Installing.' );
try
% download NatNet version
url = 'http://s3.amazonaws.com/naturalpoint/software/NatNetSDK/NatNet_SDK_2.10.zip';
websave(fullfile(Optitrack_obj.dllPath,'NatNet_SDK_2.10.zip'),url);
catch
error(['[itaOptitrack] Download of NatNet SDK from ',url,' failed. Please update url in line 302.'])
end
% unzip
fprintf('.')
unzip(fullfile(Optitrack_obj.dllPath,'NatNet_SDK_2.10.zip'),fullfile(Optitrack_obj.dllPath,'NatNet_SDK_2.10'));
% delete zip file
fprintf('.\n')
delete(fullfile(Optitrack_obj.dllPath,'NatNet_SDK_2.10.zip'))
fprintf( '[itaOptitrack] NatNet SDK has been successfully installed.\n' );
end
NET.addAssembly(fullfile(Optitrack_obj.dllPath,'NatNet_SDK_2.10/NatNetSDK/lib/x64/NatNetML.dll'));
% Create an instance of a NatNet client
Optitrack_obj.theClient = NatNetML.NatNetClientML(0); % Input = iConnectionType: 0 = Multicast, 1 = Unicast
......
NaturalPoint, Inc.
NatNet SDK is a simple Client/Server networking SDK for sending and receiving
NaturalPoint data across networks. NatNet uses the UDP protocol in conjunction
with either multicasting or point-to-point unicasting for transmitting data.
Please refer to the NatNet API USer's Guide for more information.
Change Log
-----------
Version 2.7.0 (10/15/2014)
-----------------------
Added: Motive 1.7 Streaming support
Added: New timing sample for validating mocap streaming frame timing.
Added: New Broadcast Trigger sample illustrating how to use remote record
trigger/listen using XML formatted UDP broadcast packets instead of NatNet commands.
Added: NatNetML - added SMPTE Timecode and Timecode Subframe members. See WinForms sample for usage.
Fixed: Fix for FrameID periodically displays dropped/duplicate packets during live mode.
Fixed: Fix for PacketClient incorrectly decoding rigid Body IsTracked parameter.
Fixed: Fix for crash in GetDataDescriptions() when streaming a Rigid Body with a single character name.
Fixed: Sample Clint incorrectly reports skeleton marker data
Changed: Update SampleClient3D to clarify quaterion decomposition, add new visuals.
Changed: Maximum markers per rigid body changed from 10 to 20 to match new RigidBody tracking
capabilities in Motive.
Changed: Frame timestamp now keyed off hardware frame id. fTimestamp resolution increased
from float to double *.
* DirectDepackatization clients should update their code (see timestamp in PacketClient.cpp for an example).
Version 2.6.0 (5/8/2014)
------------------------------
Added: Motive 1.6 Streaming support
Added: RigidBody tracking state parameter
Added: IsRecording flag on FrameOfMocapData indicating frame was recorded in Motive
Added: ModelsChanged flag on FrameOfMocapData indicating actively tracked model list has changed.
Added: Additional flags on LabelMarkerList indicating marker occlusion and marker position
calculation method.
Added: Additional FrameOfMocapData timestamp
Added: NatCap remote capture sample for illustrating send/receive remote Motive control commands via
UDP broadcast direct.
Added: UDP Repeater / Unity3D
Changed: Increase unlabeled/other marker count cap to 1000
Fixed: SampleClient latency value
Version 2.5.0 (9/2013)
------------------------------
Added: Motive 1.5 streaming support.
Added: New Matlab sample.
Added: Additional function signature overloads to better support MatLab.
Added: Motive remote control commands Start/Stop Recording, Start/Stop Playback,
LiveMode, EditMode, SetRecordTakeName, SetLiveTakeName. Refer to WinForms sample for usage examples.
Added: Motive record broadcast message parser sample.
Added: Samples updated to illustrate accessing point cloud model solved marker locations.
Added: Timing information to WinForms sample.
Added: New QuaternionToEuler() helper routines
Changed: Winforms Sample update for newer layout, sample Command/Requests for use with Motive
Fixed: SimplerServer compile issue.
Fixed: SampleClient when >2 skeletons are streaming.
Version 2.4.0 (3/19/2013)
------------------------------
Added: Motive 1.0 support.
Fixed: Memory leak in Client.
Fixed: Timecode during playback from file.
Fixed: Fix for crashes during large actor count (4-5) streaming.
Changed: Force "Dont Fragment" bit in IP header to off (0).
Changed: Update Winforms 2010 sample to target .NET 4.0 framework (same as NatNetML.dll assembly).
Changed: NatNetML - added additional MatLab compatible event signature (OnFrameReady2).
Version 2.3.0 (12/28/2011)
------------------------------
Added: SMPTE Timecode support (where supported, adds timecode stamp to every frame of mocap data).
Added: New "LabeledMarker" data type. This data type is used for labeled markers not associated
with a pre-defined "MarkerSet".
Changed: PacketClient example updated to reflect the new bitstream syntax containing "LabeledMarkers".
Changed: PacketClient example updated to reflect the new bitstream syntax containing Timecode data.
Version 2.2.0 (4/25/2010)
------------------------------
Added: New Unicast Point-to-Point connection type. Servers and clients can now
use MultiCast or Unicast as their connection type. Connection type between
server and client must be the same.
Added: Application-definable command and data port assignments, including Multicast address.
Added: VC redistributable installer (\Samples\VCRedist\vcredist_x86.exe) for running
the pre-compiled samples on machines without VisualStudio and/or the correct
version of the CRT runtime installed on them.
Changed: Changed PacketClient to support shared addresses (SO_REUSEADDR). Necessary
when server and client are running on same machine.
Changed: Updates to SimpleServer, SampleClient, and Winforms client to illustrate
Unicast usage.
Changed: Default Multicast address/port to IANA safe default values.
Fixed: Precompiled WinForms sample crashes on some machines.
Version 2.1.0 (11/20/2009)
------------------------------
Added: New "Skeleton" data type, representing a named, hierarchical collection
of RigidBodies.
Version 2.0.0 (11/12/2009)
------------------------------
Added: New RigidBody parameters
- RigidBody Name to RigidBody description
- MarkerData to RigidBody Data, including ID, position, and size
- MeanError to RigidBody data
Added: New managed (.NET) class library (NatNetML.dll). Allows for NatNetClient
and NatNet data types to be consumed directly in .NET compatible
environments (e.g. VB.Net, C#, LabView, MatLab).
Added: New WinForms .NET sample application illustrating NatNetML consumption.
Added: New depacketization sample (PacketClient) to replace the bitstream syntax.
This sample can be used to decode NatNet packets directly without the need
for the NatNet SDK. Intended only for clients that cannot use the NatNet SDK (e.g. Unix clients).
Added: New SDK documentation.
Added: Basic Client/Server message passing support (SendMessage(..)/SendMessageAndWait(..))
Added: Allow connections to a single server from multiple clients on same and/or different machines.
Changed: SampleClient updated to illustrate MarkerSet and RigidBody data handling.
Changed: SampleServer and SimpleServer samples merged into a single, simplified NatNet Server example.
Changed: SampleClient3D to include conversion and display of RigidBody quaternions to euler angles.
Changed: Updated to IPV6 protocol.
Version 1.2.0 (1/23/2008)
------------------------------
Added: VC8 static library (NatNetLibStatic.lib)
Added: VC6 static library (NatNetvc6StaticLib.lib)
Added: x64 libraries (dynamic and static)
Added: Bitstream syntax documentation.
Added: Rigid body data type support.
Added: Versioning information. NatNet version information is now available from
file (DLL), local version (NatNetHelper::NatNetVersion), and fom the
connected application(ServerDescription.NatNetVersion()) to help ensure NatNet
server/client versions are in synch.
Changed: Updated to Visual Studio 2005 Project files.
Changed: Removed all /clr references. NatNet and the samples use strictly
native code.
Changed: NatNet types and helper routines cleaned up to improve usage.
Changed: SampleServer and Sampleclient programs updated to illustrate new usages.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment