Page 1 of 1

Error using osimC3D.m

Posted: Tue Mar 22, 2022 1:16 am
by laurinxaver
Hi,

I am experiencing the following issue in MATLAB using the included osimC3D tool when trying to read experimental data recorded with a Vicon system:

Code: Select all

Error using osimC3D (line 68)
Java exception occurred:
java.lang.RuntimeException: Invalid Argument. Number of labels does not match number of columns of dependent data.
	Thrown at DataTable.h:1231 in DataTable_().
As far as I am aware, this error only occurs with .c3d files that contain virtual/modelled markers - the tool does work with the sample .c3d files that come with OpenSim, as well as our own recordings as long as all modelled markers are removed beforehand.

Is this a known issue, or is there any way around this aside from removing the modelled markers? Any and all help is greatly appreciated!

Re: Error using osimC3D.m

Posted: Mon Mar 28, 2022 10:58 am
by johnjdavisiv
It's possible that the gait software you are using to create the virtual markers creates them in a way that doesn't respect the c3d file conventions that are supported by ezc3d, which is the back-end that OpenSim uses to read c3d files. Maybe it doesn't add the expected "residuals" column to the data, or doesn't label it as expected?

One thing you could try is reading the .c3d file directly using ezc3d through its MATLAB or Python API and see if it throws an error. If it does, you can post an issue on the GitHub page and attach your file--the ezc3d creator is pretty good about looking into why some c3d files don't open as expected.

Re: Error using osimC3D.m

Posted: Tue May 17, 2022 8:25 am
by jobingthampi
Hi iam trying to use ezc3d and I followed the steps in ezc3d page to implement in Matlab but it's not getting worked. Can anyone help me in setting up ezc3d in Matlab.

Re: Error using osimC3D.m

Posted: Tue May 17, 2022 11:51 am
by aymanh
Hi Jobin,

As John pointed out this could be an issue specific to your system/c3d files. I'd try a file provided by OpenSim or from the OpenSim repository (e.g. https://github.com/opensim-org/opensim- ... sts/shared) and if that works, test the c3d writing on your end. If the issue is exclusive to ezc3d, I'd address that directly with the ezc3d project maintainers as they're better positioned to decide if this is supported format/functionality.

Hope this helps,
-Ayman