Skip to main content

rudimentary python parser for the xsens format mvnx

Project description

To use this mvnx parser

To install this mvnx parser:

pip install mvnx_parser

To use this tool:

import mvnx_parser
my_data = mvnx_parser.Mvnx_p(<path/to/your/mvnx/file.mvnx>)

You can then either access the date through the frames list that has all the data of all normal frames, or through the item lists if you want to have all data of one item (for example orientation, or position). You can also get some data from the header frames.

Normal frames

The frames start at 0 and go up to how ever many frames you have -1. Therefore to get for example the 2. frame:

my_data.frames[1]

To get a whole item, for example orientation from the 2. frame:

my_data.frames[1]["orientation"]

To get the orientation of the first joint of the 2. frame:

my_data.frames[1]["orientation"][0]

Item lists

To access all data of one item (for example "orientation"):

my_data.orientation

To get the data of the first frame of the item orientation you would write:

my_data.orientation[0]

Header frames

There are three frames in the mvnx file written in front of the normal frames with the types: "identity", "tpose" and "tpose-isb".
You can access them by:

my_data.identity
my_data.tpose
my_data.tpose_isb

If you want to access for example the first orientation of tpose:

my_data.tpose["orientation"][0]

The data structure

frames list

frames is the list with all the frames of the type "normal" which are all the frames of the xsens recording. This list contains each frame as a dictionary.
Here is the structure it uses (Stuff behind a "#" are comments I wrote in here to explain the structure better):

[ #list of all frames
  { #dictionary with all item names of one frame as keys and the item data as values
    <item_name01>: 
      [ #list of data or in most cases groups of related data (coordinates with x, y, z or x, y, z, w)
        [x, y, z], [x, y, z], ... #just as an example
      ],
    <item_name02>:
      [ 
        [x, y, z], [x, y, z], ... #just as an example
      ]
    ...
  },
  {...},
  ...
]

item lists

The item lists contain the values of each item per frame. (It's a list of frames with lists of value(groups)).
It's structure looks like follows (Stuff behind a "#" are comments I wrote in here to explain the structure better):

[ #list of frames
  [#list of grouped item values of the first frame
    [x, y, z], #just as example group/list
    [x, y, z],
    [...],
    ...
  ],
  [#list of grouped item values of the second frame
    [x, y, z], #just as example group/list
    [x, y, z],
    [...],
    ...
  ],
  [...],
  ...
]

header dictionaries

The header dicts look like the following:

{ #dictionary with item names as keys and their data as values
  <item_name01>: [ #list of data groups
    [x, y, z, w],
    [...],
    ...
  ],
  <item_name02>: [
    [...],
    ...
  ],
  ...
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mvnx_parser-0.0.4.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvnx_parser-0.0.4-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file mvnx_parser-0.0.4.tar.gz.

File metadata

  • Download URL: mvnx_parser-0.0.4.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mvnx_parser-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c2310393b1920f0e9d560a3eba7a79748648385ccdbea719e50bbe0fbb0f69c5
MD5 d00b9d7a912e6ead08e2c57d868f0793
BLAKE2b-256 e2de848838e72eac2e5b8d725f8a45dc216cbfcb89765450b9df21240899cb05

See more details on using hashes here.

File details

Details for the file mvnx_parser-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mvnx_parser-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mvnx_parser-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c4aa872fe3d77cecef18d44d0b0a53219c011d720fa454959135aa7903a0080
MD5 381fae2c38a18dde7513be86c80eeea3
BLAKE2b-256 32c65ac7c871daedbcaa7ef973e3f42d568f35445fdbe50496ca767760dfdc19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page