Extracting C3D file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
saylee patkar
Posts: 35
Joined: Wed Jun 20, 2018 1:03 am

Extracting C3D file

Post by saylee patkar » Thu Feb 07, 2019 11:11 pm

Dear sir,
I am a new user for Opensim and using vicon nexus system data for analysis. I am facing problem with extracting data from C3D file. I used most of the tools listed under the section 'Tools for preparation motion data'. But every tool shows some error. I am using Matlab 2018b 64-bit licence version for running the codes.
Since, there was no resolution for errors available I tried using TRC files generated from vicon nexus pipeline(there is available option to generate TRC file and GRF MOT file). But if that TRC file is used for scaling then, There is an error showing 'InverseKinematicSolver:Model has no markers!' in the red circle option and the solver keeps executing scaling.
I am also attaching a list of error detected while using the tools to extract the data.
Please suggest some solution.
Attachments
Errors using opensim motion data preparation tools.docx
(15.79 KiB) Downloaded 21 times

Tags:

User avatar
saylee patkar
Posts: 35
Joined: Wed Jun 20, 2018 1:03 am

Re: Extracting C3D file

Post by saylee patkar » Thu Feb 07, 2019 11:16 pm

Also, as mentioned by the developers, if I try to use the MatLab utilities from the Opensim4.0 resources, the MatLab code c3dExport gives an error as follows even though I have added all the function files to the MatLab path.

Undefined variable "C3DFileAdapter" or class "C3DFileAdapter".

Error in osimC3D (line 65)
tables = C3DFileAdapter().read(path2c3d, ForceLocation);

Error in c3dExport (line 35)
c3d = osimC3D(c3dpath,1);

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

Re: Extracting C3D file

Post by jimmy d » Fri Feb 08, 2019 10:47 am

c3dExport.m is an example file, osimC3D.m is a Matlab side wrapper for doing typical C3D tasks, and the OpenSim class C3DFileAdaper() is doing the heavy lifting.
Undefined variable "C3DFileAdapter" or class "C3DFileAdapter".
This indicates that you haven't set up your opensim-matlab environment correctly and Matlab can't find C3DFileAdapter(). You can test this by typing the following lines into Matlab

Code: Select all

import org.opensim.modeling.*
c3d = C3DFileAdapter()
If this gives you an error, it means you have to setup run the configureOpenSim.m script. Details can be found here

User avatar
saylee patkar
Posts: 35
Joined: Wed Jun 20, 2018 1:03 am

Re: Extracting C3D file

Post by saylee patkar » Fri Feb 15, 2019 12:46 am

Dear sir,
I followed the procedure for opensim-matlab environment setup as per the user's guide. But I am still getting an error which I have mentioned in the word document attached here. I have also attached screenshot of error and added path of Opensim Bin Directory.
Please look into this and suggest the solution.
Attachments
error.docx
(12.76 KiB) Downloaded 15 times
OpensimBinPath.png
OpensimBinPath.png (134.72 KiB) Viewed 812 times
error.png
error.png (134.44 KiB) Viewed 812 times

User avatar
Thomas Uchida
Posts: 1790
Joined: Wed May 16, 2012 11:40 am

Re: Extracting C3D file

Post by Thomas Uchida » Fri Feb 15, 2019 8:54 am

Have you verified the value of your Windows PATH environment variable?

User avatar
saylee patkar
Posts: 35
Joined: Wed Jun 20, 2018 1:03 am

Re: Extracting C3D file

Post by saylee patkar » Fri Feb 15, 2019 9:36 am

tkuchida wrote:
Fri Feb 15, 2019 8:54 am
Have you verified the value of your Windows PATH environment variable?
I don't know how to do that. Is it similar to adding path to environment variable?
Last edited by saylee patkar on Tue Feb 19, 2019 5:17 am, edited 1 time in total.

User avatar
saylee patkar
Posts: 35
Joined: Wed Jun 20, 2018 1:03 am

Re: Extracting C3D file

Post by saylee patkar » Sat Feb 16, 2019 5:21 am

tkuchida wrote:
Fri Feb 15, 2019 8:54 am
Have you verified the value of your Windows PATH environment variable?
dear sir,
I verified the value of windows path environment variable. And followed the procedure for scripting with matlab with configureOpensim.m as well as manual setup. But still getting the error as follows.

>> org.opensim.modeling.opensimCommon.GetVersion()
Failed to load one or more dynamic libraries for OpenSim.
java.lang.UnsatisfiedLinkError: C:\OpenSim 4.0-2018-08-27-ae111a49\bin\osimJavaJNI.dll: Can't find dependent libraries
Make sure OpenSim's bin directory is on your PATH.
See https://simtk-confluence.stanford.edu/d ... ith+Matlab
Warning: A Java exception occurred trying to load the
org/opensim/modeling/opensimCommonConstants class:
Java exception occurred:
java.lang.UnsatisfiedLinkError:
org.opensim.modeling.opensimCommonJNI.GET_SYSTEM_INFO_get()Ljava/lang/String;

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

at
org.opensim.modeling.opensimCommonConstants.<clinit>(opensimCommonConstants.java:12)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.mathworks.jmi.OpaqueJavaInterface.findClass(OpaqueJavaInterface.java:137)

Java exception occurred:
java.lang.UnsatisfiedLinkError:
org.opensim.modeling.opensimCommonJNI.GetVersion()Ljava/lang/String;

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

at org.opensim.modeling.opensimCommon.GetVersion(opensimCommon.java:25)
Attachments
error.png
Error file
error.png (71.36 KiB) Viewed 743 times

User avatar
Mritula Chandrasekaran
Posts: 94
Joined: Tue Dec 19, 2017 5:36 am

Re: Extracting C3D file

Post by Mritula Chandrasekaran » Thu Nov 28, 2019 4:53 am

Hi,
My c3dExport.m was working fine till now. But sudden;y started popping up the same above mentioned error. I just changed the Path details in environmental variables as I was trying to implement MOCO. Can someone help me to overcome this?
Opensim bin folder is in my environmental variables too.

Thanks,
Mritula

User avatar
Ayman Habib
Posts: 2242
Joined: Fri Apr 01, 2005 12:24 pm

Re: Extracting C3D file

Post by Ayman Habib » Sun Dec 01, 2019 10:07 pm

Hello,

Moco comes with its own version of OpenSim that is not compatible with OpenSim 4.0 public release. We're trying to resolve this so you can use both in the same setting but for the time being you can have either OpenSim 4.0 or Moco binaries in your path and you need to remove the other from the path.

Hope this helps,
-Ayman

POST REPLY