Page 1 of 1

C3DFileAdapter() Reading Problem: OpenSim 4.4 vs 4.5

Posted: Mon Feb 05, 2024 3:38 am
by andreynet83
Hi!
I use MATLAB for exporting and processing .trc files. A couple of days ago, I noticed that OpenSim 4.5 was released. But after setting up the environment, I found out that my .c3d files are not being read.
My code and the error:

Code: Select all

import org.opensim.modeling.*;
c3dFileAdapter = C3DFileAdapter();
c3dFileAdapter.setLocationForForceExpression(1);
tables = c3dFileAdapter.read(fileLocation);

Code: Select all

Java exception occurred:
java.lang.RuntimeException: Group::parameterIdx could not find FPCOPPOLY in the group FORCE_PLATFORM

	at org.opensim.modeling.opensimCommonJNI.DataAdapter_read(Native Method)

	at org.opensim.modeling.DataAdapter.read(DataAdapter.java:80)
If I revert back to OpenSim 4.4 everything works fine. But when I switch back to 4.5, this error appears again. I have reinstalled OpenSim several times and tried it on other computers (Windows 10, 11), but keep facing the same problem.

Re: C3DFileAdapter() Reading Problem: OpenSim 4.4 vs 4.5

Posted: Mon Feb 05, 2024 7:07 am
by kernalnet
Hi, it's been fixed in the recent EZC3D: https://github.com/pyomeca/ezc3d/pull/311

Must wait until OpenSim developers update it.

Re: C3DFileAdapter() Reading Problem: OpenSim 4.4 vs 4.5

Posted: Mon Feb 12, 2024 7:07 am
by pariterre
Hi everyone,
Just let you know that I opened a pull request the latest version of ezc3d to OpenSim, which should fix the current problem. That said, if you are compiling OpenSim yourself, you can simply change the CMakeLists.txt file in the dependencies folder and bump the ezc3d version to 1.5.8.

Regards!