Vizard 7 » Reference » Input Devices » Position and Orientation Trackers » Xsens MVN Studio
7.6

Xsens MVN Studio plug-in

This plug-in provides support for the Xsens MVN motion capture device. The Moven plug-in supports both position and rotation data.

Initialization

The Moven plug-in is implemented as a Vizard extension. When creating the Moven extension, you must specify the IP address or hostname of the MVN Studio server as the 'mesg' argument. You can also specify the port number by adding a ':' followed by the port number to the address string. The default port is 9763.

 

To receive 6DOF data, make sure MVN Studio is setup to stream either Euler or Quaternion based orientations. 3DOF marker data is only provided if MVN Studio is setup to stream position only.

 

The Moven extension object has the following methods/constants:

Method

Description

<moven>.getAvatarList() Returns a list of all Moven avatars on the server.

<moven>.getBody(id)

Returns the body sensor with the specified Moven body ID belonging to the first avatar. See below for available body IDs.

<moven>.getMarkerList()

Returns a list of all the 3DOF markers on the server belonging to the first avatar.

<moven>.getBodyList()

Returns a list of all the 6DOF bodies on the server belonging to the first avatar.

<moven>.getMarker(id)

Returns the marker sensor with either the specified Moven marker ID or tuple containing the Moven body ID and local marker ID belonging to the first avatar..

<moven>.getBodyMarkers(id)

Returns a list of marker sensors that belong to the specified Moven body ID. See below for available body IDs.

<moven>.PELVIS

<moven>.L5

<moven>.L3

<moven>.T12

<moven>.T8

<moven>.NECK

<moven>.HEAD

<moven>.RIGHT_SHOULDER

<moven>.RIGHT_UPPER_ARM

<moven>.RIGHT_FORE_ARM

<moven>.RIGHT_HAND

<moven>.LEFT_SHOULDER

<moven>.LEFT_UPPER_ARM

<moven>.LEFT_FORE_ARM

<moven>.LEFT_HAND

<moven>.RIGHT_UPPER_LEG

<moven>.RIGHT_LOWER_LEG

<moven>.RIGHT_FOOT

<moven>.RIGHT_TOE

<moven>.LEFT_UPPER_LEG

<moven>.LEFT_LOWER_LEG

<moven>.LEFT_FOOT

<moven>.LEFT_TOE

<moven>.PROP1

<moven>.PROP2

These constants represent all the available Moven body IDs

The Moven avatar objects have the following methods:

Method

Description

<avatar>.getAvatarID() Returns the Moven avatar ID.
<avatar>.getName() Returns the Moven avatar name.
<avatar>.getColor() Returns the Moven avatar [r,g,b] color.

<avatar>.getBodyList()

Returns a list of all the 6DOF bodies belonging to the avatar.

<avatar>.getBody(id)

Returns the body sensor with the specified Moven body ID. See above for available body IDs.

<avatar>.getMarkerList()

Returns a list of all the 3DOF markers belonging to the avatar.

<avatar>.getMarker(id)

Returns the marker sensor with either the specified Moven marker ID or tuple containing the Moven body ID and local marker ID.

<avatar>.getBodyMarkers(id)

Returns a list of marker sensors that belong to the specified Moven body ID. See above for available body IDs.

The Moven body objects have the following methods in addition to the standard extension sensor methods:

Method

Description

<body>.getBodyID()

Returns the Moven body ID of the sensor. See above for available body IDs.

<body>.getMarkerList() Returns a list of all the 3DOF markers belonging to the body.
<body>.getJointAngle() Returns the [x,y,z] joint angles of the body.

The Moven marker objects have the following methods in addition to the standard extension sensor methods:

Method

Description

<marker>.getBodyID()

Returns the Moven body ID of the marker. See above for available body IDs.

<marker>.getLocalMarkerID()

Returns the local Moven marker ID of the marker.

<marker>.getMarkerID()

Returns the Moven marker ID of the marker.

Example

The following example shows how to connect to a MVN studio server and get a handle to the 6DOF head sensor:

#Connect to MVN Studio server on local machine
moven = viz.add('moven.dle',0,'localhost')

#Get sensor representing head position/rotation
head = moven.getBody(moven.HEAD)

The following example shows how to iterate through all the marker objects and link each one to a node:

for m in moven.getMarkerList():
    ball = viz.add('white_ball.wrl',color=viz.RED,cache=viz.CACHE_CLONE)
    viz.link(m,ball)

You can also connect to multiple MVN Studio servers simultaneously. The next example connects to two different servers and gets a handle to the right hand of each server:

moven1 = viz.add('moven.dle',0,'media3')

rightHand1 = moven1.getBody(moven1.RIGHT_HAND)

moven2 = viz.add('moven.dle',0,'dev15')

rightHand2 = moven2.getBody(moven2.RIGHT_HAND)