Undefined function or variable 'opensimC3D'.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Gaurav Girish
Posts: 3
Joined: Thu Jan 19, 2017 6:27 pm

Undefined function or variable 'opensimC3D'.

Post by Gaurav Girish » Tue Jul 24, 2018 10:13 am

Hello,

I am trying to make a program to use c3d files into the Opensim pipeline. However, when i use the practice c3dexport.m script in matlab, I get an error:

>> c3dExport
Undefined function or variable 'opensimC3D'.

Error in c3dExport (line 13)
c3d = opensimC3D(c3dpath);

What would I need to do to get opensimC3D? I have used the configureOpenSim script first before i ran the c3d export.

Tags:

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Undefined function or variable 'opensimC3D'.

Post by jimmy d » Tue Jul 24, 2018 5:24 pm

osimC3D.m is distributed in the resources directory that is in the OpenSim resources directory.If you did install the resources directory to your Documents folder, the path should be something like '...\Documents\OpenSim\4.0Beta\Code\Matlab\Utilites'. You will need to add this path to Matlab so that Matlab knows where the osimC3D.m is on your system.

User avatar
Daniel Gordon
Posts: 34
Joined: Fri May 06, 2016 7:57 am

Re: Undefined function or variable 'opensimC3D'.

Post by Daniel Gordon » Fri Aug 10, 2018 4:36 am

Hi,

In my Matlab/Utilities folder there is no 'opensimC3D' file, but there is an 'osimC3D' class. When I change 'opensimC3D' to 'osimC3D' in the 'c3dExport' function, I get this error:

Error using osimC3D (line 23)
Java exception occurred:
java.lang.RuntimeException: invalid map<K, T> key

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

at org.opensim.modeling.C3DFileAdapter.read(C3DFileAdapter.java:54)


Error in c3dExport (line 13)
c3d = osimC3D(c3dpath);

Do you have any ideas why this might occur?

Thanks for your help,

Daniel

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Undefined function or variable 'opensimC3D'.

Post by jimmy d » Fri Aug 10, 2018 7:48 am

opensimC3D.m was an older versions that no longer exist. The file is now osimC3D.

The osimC3D.m class has had significant updates recently and will be packaged with an upcoming refresh of the 4.0 Beta. This should happen in the next week or so. Until then, I suggest holding off using the OpenSim Matlab C3D scripts packaged with the Beta.

POST REPLY