MVN Studio Real-Time Network Streaming Protocol Specification
MVN Studio Real-Time Network Streaming Protocol Specification
streaming
Protocol Specification
Pantheon 6a
phone
phone
310-481-1800
fax
Suite C
fax
310-416-9044
7500 AN Enschede
The Netherlands
internet www.xsens.com
USA
internet www.xsens.com
Revisions
Revision
Date
By
Changes
February 2012
DOS
June 2013
AOD
December 2013
CMO
October 2014
JMU
November 2014
PVR
2005-2014, Xsens Technologies B.V. All rights reserved. Information in this document is subject to
change without notice. Xsens, MVN, MotionGrid, MTi, MTi-G, MTx, MTw, Awinda and KiC are registered
trademarks or trademarks of Xsens Technologies B.V. and/or its parent, subsidiaries and/or affiliates in
The Netherlands, the USA and/or other countries. All other trademarks are the property of their
respective owners.
Document MV0305P.I
ii
Xsens Technologies B.V.
Table of Contents
1
INTRODUCTION ................................................................................................................................ 1
1.1 PERCEIVED USAGE ............................................................................................................................. 1
1.1.1
Usage in real-time previs and simulation VR setups ................................................................. 1
1.1.2
Network Streamer and Network monitor ................................................................................ 1
1.1.3
Usage in multi-person or other complex motion capture setups ............................................... 2
SEGMENT IDS................................................................................................................................. 10
Document MV0305P.I
iii
Xsens Technologies B.V.
1 Introduction
MVN Studio, developed by Xsens, is a tool to capture and compute the 6DOF motion data of an inertial
sensor-driven system. It allows the export of the data to third party applications such as Motion Builder,
making the data available to drive rigged characters in e.g. animations. The data transfer to other
applications is primarily file based when using MVN Studio. With the XME API (SDK) there are many
other options.
In many situations it is attractive to keep the ease of use of MVN Studio, while receiving the motion
capture data in real-time in another application, even on another PC possibly physically remote from the
MVN system.
This document defines a network protocol specification for this purpose. It describes the transport
medium, the given data and the datagrams to be sent and received over the network, as well as the
control sequences the server and clients will use to communicate states and requests during the
sessions. The network communication is mainly required to be fast/real-time, other quality criteria are
secondary.
This document describes MVN Studio Real-time Network Streaming. The streaming feature enables
computers that run MVN Studio to stream the captured data over a network to other client computers.
1.1
Perceived Usage
Document MV0305P.I
1
Xsens Technologies B.V.
Document MV0305P.I
2
Xsens Technologies B.V.
2 Transport Medium
2.1
Network Environment
The network environment will be assumed to be a local 100 Mbit Ethernet network, larger network
topologies are not considered and can be covered by file transfer of the already given file export
functionality or later extensions to the network protocol. Thus, few packet loss or data corruption during
transfer is to be expected, as well as constant connectivity.
2.2
Network Protocol
Network communication uses a protocol stack, thus the streaming protocol will be implemented on top
of a given set of protocols already available for the network clients. In this case, the layers to build upon
are IP and UDP (or TCP, which is also supported). IP (Internet Protocol, RFC 791) is the network layer
protocol used in Ethernet networks and defines the source and destination of the packets within the
network. Upon this, UDP (User Datagram Protocol, RFC 768) is used to encapsulate the data. The UDP
Protocol is unidirectional, and contrary to TCP (Transmission Control Protocol, RFC 793) it is stateless
and does not require the receiver to answer incoming packets. This allows greater speed.
2.3
Default Port
The default Port to be used on the network is 9763. This Port is derived from the XME API (9=X, M=6,
E=3). MVN Studio server will default to this Port.
It is of course possible to define an arbitrary Port if needed.
2.4
Datagram
The motion capture data is sampled and sent at regular time intervals whose length depends upon the
configuration of MVN Studio. Common sampling rates lie between 60 and 240 Hertz. The update rate
of the real-time network stream can be modified separately. The data content in the datagram is defined
by the specific protocol set, but basically, the positions and rotation of all segments of the body at a
sampling instance are sent away as one or more UDP datagrams.
Each datagram starts with a 24-byte header followed by a variable number of bytes for each body
segment, depending on the selected data protocol. All data is sent in network byte order, which
corresponds to big-endian notation.
Items marked in green are items that are sent as part of the datagram
2.4.1 Header
The number of captured body segments is contained in the datagram header along with additional
information:
Datagram header
6 bytes ID String
4 bytes sample counter
1 byte datagram counter
1 byte number of items
4 bytes time code
1 byte character ID
7 bytes reserved for future use
Document MV0305P.I
3
Xsens Technologies B.V.
2.4.1.1 ID String
The so-called ID String is an ASCII string which consists of 6 characters (not terminated by a null
character). It serves to unambiguously identify the UDP datagram as containing motion data of the
format according to this specification. Since the values in the string are characters, this string is not
converted to a big-endian notation, but the first byte is simply the first character, etc.
These are the ASCII and hexadecimal byte values of the ID String:
ASCII
Hex
M
4D
X
58
T
54
P
50
0
30
1
31
M: M for MVN
X: X for Xsens
T: T for Transfer
P: P for Protocol
##: Message type. The first digit determines what kind of packet this is and the second digit determines
the format of the data in the packet
Message type
01
02
03
04
05
10
11
12
13
Description
Pose data (Euler) MotionBuilder +Maya
Absolute position and orientation (Euler) of segments
Y-Up, right-handed
This type is used by the Motion Builder + Maya plug-in v2015
Supported by MVN Studio as a network client
Pose data (Quaternion) MVN Studio Network Monitor
Absolute position and orientation (Quaternion) of segments
Default mode Z-Up, right-handed or Y-Up
Supported by MVN Studio as a network client
Pose data (Positions only, MVN Optical marker set 1)
Positions of selected defined points (simulating optical markers), typically
38-46 points. Multiple data sets are available.
This type is used by the Motion Builder plug-in v1.0.
NOT supported by MVN Studio as a network client.
However, MVN Studio has a limited ability of re-integrating these marker
positions into proper segment positions with identity orientations, so it
looks anywhere from sort of correct in a Tpose to very weird.
Deprecated: MotionGrid Tag data
Pose data (Unity3D)
Relative position and orientation (Quaternion) of segments
Uses alternative segment order
Left-handed for Unity3D protocol
NOT supported by MVN Studio as a network client.
Deprecated, use 13: Character information scale information
Deprecated, use 13: Character information prop information
Character information meta data
name of the character
MVN character ID (BodyPack or Awinda Station ID)
<< more can be added later >>
Supported by MVN Studio as a network client
Character information scaling and null-pose
Supported by MVN Studio as a network client
Document MV0305P.I
4
Please note that the message type is sent as a string, not as a number, so message type 03 is sent
as hex code 0x30 0x33, not as 0x00 0x03.
2.4.1.2 Sample Counter
The sample counter is a 32-bit unsigned integer value which is incremented by one, each time a new
set of motion tracker data is sampled and sent away. Note that the sample counter is not to be
interpreted as a time code, since the sender may skip frames.
2.4.1.3 Datagram Counter
The size of a UDP datagram is usually limited by the MTU (maximum transmission unit, approx. 1500
bytes) of the underlying Ethernet network. In nearly all cases the entire motion data that was collected
at one sampling instance will fit into a single UDP datagram. However, if the amount of motion data
becomes too large then the data is split up into several datagrams.
If motion data is split up into several datagrams then the datagrams receive index numbers starting at
zero. The datagram counter is a 7-bit unsigned integer value which stores this index number. The most
significant bit of the datagram counter byte is used to signal that this datagram is the last one belonging
to that sampling instance. For example, if motion data is split up into three datagrams then their
datagram counters will have the values 0, 1 and 0x82 (hexadecimal). If all data fits into one UDP
datagram (the usual case) then the datagram counter will be equal to 0x80 (hexadecimal).
The sample counter mentioned above can be used to identify which datagrams belong to the same
sampling instance because they must all carry the same sample counter value but different datagram
counters. This also means that the combination of sample counter and datagram counter values is
unique for each UDP datagram containing (part of the) motion data.
NOTE: For practical purposes this will not be an issue with the MVN streaming protocol. If problems are
encountered, check your MTU settings.
2.4.1.4 Number of items
The number of items is stored as an 8-bit unsigned integer value. This number indicates the number of
segments or points that are contained in the packet. Note that this number is not necessarily equal to
the total number of motion trackers that were captured at the sampling instance if the motion capture
data was split up into several datagrams. This number may instead be used to verify that the entire UDP
datagram has been fully received by calculating the expected size of the datagram and comparing it to
the actual size of the datagram.
2.4.1.5 Time code
MVN Studio contains a clock which starts running at the start of a recording. The clock measures the
elapsed time in milliseconds. Whenever new captured data is sampled the current value of the clock is
sampled as well and is stored inside the datagram(s) as a 32-bit unsigned integer value representing a
time code.
2.4.1.6 Character ID
MVN Studio now supports multiple characters in one viewport. This byte specifies to which character
the data belongs. In a single-character setup this value will always be 0. In multi-character cases, they
will usually be incremental. However, especially during live streaming, one of the characters may
disconnect and stop sending data while others will continue, so the receiver should be able to handle
this.
Each character will send its own full packet.
Document MV0305P.I
5
Xsens Technologies B.V.
2.5
Pose data
Document MV0305P.I
6
Xsens Technologies B.V.
Document MV0305P.I
7
Xsens Technologies B.V.
2.6
Character information
Document MV0305P.I
8
Xsens Technologies B.V.
Document MV0305P.I
9
Xsens Technologies B.V.
3 Data Types
3.1
Segment IDs
Table 1: Euler and Quaternion protocols
Segment Name
Pelvis
L5
L3
T12
T8
Neck
Head
Right Shoulder
Right Upper Arm
Right Forearm
Right Hand
Left Shoulder
Left Upper Arm
Left Forearm
Left Hand
Right Upper Leg
Right Lower Leg
Right Foot
Right Toe
Left Upper Leg
Left Lower Leg
Left Foot
Left Toe
Prop1
Prop2
Prop3
Prop4
Segment Index
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
24
25
26
27
Segment ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
25
26
27
28
Document MV0305P.I
10
Xsens Technologies B.V.
Segment Index
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Segment ID
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Document MV0305P.I
11
Xsens Technologies B.V.