Skip to content

Visualisation of fusioned MoCap data

d.kilic requested to merge swt-projekt-gruppe-04/petrack:master into master

This MR is for the visualisation of the data from our XSens MoCap-Systems which was implemented as part of the module Softwaretechnik with a small team of MATSEs.

This MR introduces:

  • Loading a C3D-File from XSens into an internal tree structure
  • Transforming the internal skeleton into lines and arrows to be drawn
  • Actual drawing
  • Settings for the visualisation (turning it on/off, changing thickness or color)
  • Saving the path to the C3D and other metadata in the project file
  • Loading the data from the project file

The time offset parameter when loading a person is only an additional value to tweak. A calculated final time offset should be set via the firstFrame parameter of the c3d file. This is accommodated for in the code.

The readily available SAMPLE_RATE parameter is not used, because XSens does not conform to the standard and saves the correct rate in the header and the rate of the recording as parameter (instead of synchronozing both to the actual framerate). In such a case, ezc3d, the library used to read C3D-Files, assumes the parameter is the correct value and overwrites the actually correct one in the header.

What is to be done (need to create issues):

  • Support for multiple Skeletons/Persons
    • Needs an overhaul of the file loading dialog
      • Idea: Transform it into an file management dialog
  • Only loading the C3D-Files on project start-up, when visualisation is turned on (currently always)
  • Move options for visualisations somewhere else (currently in tracking tab)

There is also documentation on how to add another MoCap-System ( ). Since this would end up in the Wiki, which has no MR or similar, I'd like feedback on this one too.

A file is loaded through a dialog from the file-menu. The options for the visualisation are currently in the tracking tab, but should probably moved elsewhere.


The resulting visualisation looks as follows:


With the arrow indicating the direction of the head.

Two things I'm not too confident in and which should be considered especially in this review are the exception handling and the calculation of the arrow indicating the head orientation. It should also be discussed how to document this feature and if the given unit-tests are sufficient.

Merge request reports