C3DFileAdapter() Reading Problem: OpenSim 4.4 vs 4.5

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Andrey Aksenov
Posts: 1
Joined: Thu Oct 21, 2010 4:19 pm

C3DFileAdapter() Reading Problem: OpenSim 4.4 vs 4.5

Post by Andrey Aksenov » Mon Feb 05, 2024 3:38 am

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.

Tags:

User avatar
Mohammadreza Rezaie
Posts: 408
Joined: Fri Nov 24, 2017 12:48 am

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

Post by Mohammadreza Rezaie » Mon Feb 05, 2024 7:07 am

Hi, it's been fixed in the recent EZC3D: https://github.com/pyomeca/ezc3d/pull/311

Must wait until OpenSim developers update it.

User avatar
Benjamin Michaud
Posts: 31
Joined: Mon May 03, 2010 6:35 am

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

Post by Benjamin Michaud » Mon Feb 12, 2024 7:07 am

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!

POST REPLY