Page 1 of 2

FAQ question: C3D Files

Posted: Wed Sep 05, 2007 11:21 am
by aymanh
Does OpenSim 1.0 support importing C3D files directly?

RE: FAQ question: C3D Files

Posted: Wed Sep 05, 2007 11:44 am
by aymanh
As of version 1.0, OpenSim does not read C3D files directly. Users need to preprocess these files to put their data in the file formats that OpenSim supports:

.mot SIMM motion files
.trc Motion capture files

RE: FAQ question: C3D Files

Posted: Wed Sep 05, 2007 10:42 pm
by fasseman
ok but how can you reporcess them and so how can you read and import Vicon Files to Open sim then ?
thanks
françois

RE: FAQ question: C3D Files

Posted: Thu Sep 13, 2007 12:54 pm
by aseth
Currently, it is not possible to read a c3d motion file directly into OpenSim. This is a popular feature request that we hope to add to OpenSim in a future release. However, we currently do not have a specific timeline for when this feature will be made available. For now, it is the user's responsibility to write their own utilities to
convert their c3d motion files into OpenSim ".mot" and marker ".trc" files.

For your convenience we can direct you to some public domain utilities and scripts that may be helpful in this process:

1) C3DServer SDK: .dll with programming interface from C, C++, and MATLAB, also comes with standalone viewer to verify data is being retrieved correctly
http://www.c3d.org/download_apps.html

2) A matlab utility that reads the C3D binary file directly into MATLAB structures. Authored by Alan Morris, Toronto and a revision by Jaap Harlaar, Amsterdam.
http://www.cs.cmu.edu/People/akalamda/k ... /readC3D.m

Please note that the OpenSim team does not endorse or support these codes. We recommend contacting the respective author(s) if additional assistance is required.

RE: FAQ question: C3D Files

Posted: Tue Oct 09, 2007 5:14 am
by schwa021
Hey Ajay, I hope all is well with you.

I'd just like to mention that Vicon systems are extremely widely used (probably the MOST widely used motion capture system).

I certainly understand that it's not your job to support everyone's systems, and we have the expertise to write this kind of software ourselves. However, I think it would be a good idea for your group to take on this task.

In the meantime - is there a guide to the .mot and .trc format so that we can write our own converter?

Thanks.

RE: FAQ question: C3D Files

Posted: Wed May 26, 2010 6:03 am
by maanavendra
Please see http://code.google.com/p/b-tk/wiki/Changelog . It may help to read C3D files and then write trc to be imported into OpenSim. analog data and force platform calibration parameters will still remain an issue as it can't read/write MOT files.

RE: FAQ question: C3D Files

Posted: Wed May 26, 2010 6:13 am
by twdorn
Hi all,

I have developed a Matlab toolbox to do exactly this: extract markers, ground forces, emg, etc from a Vicon C3D file, crop the trial, detect the force plates for each foot (using event labeling) and output straight into mot and trc files for use with OpenSim models. This allows rapid batch processing of multiple trials that is very easy to set up and configure to any laboratory frame.

It is available at:
https://simtk.org/home/c3dtoolbox

Tim

RE: FAQ question: C3D Files

Posted: Mon Jun 21, 2010 8:19 am
by wumborti
Thanks Tim, you are both a savior and my namesake.
I'll try to see if this works.

Tim

RE: FAQ question: C3D Files

Posted: Mon Jul 26, 2010 9:25 pm
by tinyvane
Thanks deeply!I'm using the toolkit and I can't help to say this is really great!

I encountered two problems now, any help would be thankful.

1. When running the testWalking, the toolkit could not continue when showing "the file testWalking_myEMG.mot could not be read", I don't know why because that file has been generated at that time.

2. I really got confused about the coordinate system transforming formulas. As you mentioned in the user's manual, "

% This section sets transformation vectors that are crucial to the
% rigid body transformations needed between the Force Plate, Vicon,
% and the Model coordinate systems.
%
% Example: FP coord system -> Model coord system
% glab.dirVec.FPMODEL(3,:) = [2 -3 -1];
%
% MODEL X = FP Y
% MODEL Y = FP -Z
% MODEL Z = FP -X

then in my thought, 2 lines of that are enough for the transforms among 3 coordinate systems, why need 8 lines like below in the "LOADLABLES.M"?

% X direction (Vicon) Gait -> transformation vectors
glab.dirVec.FPMODEL(1,:) = [-1 -3 -2]; % FP coord system -> Model coord system
glab.dirVec.VICMODEL(1,:) = [1 3 -2]; % Vicon coord system -> Model coord system

% -X direction (Vicon) Gait -> transformation vectors
glab.dirVec.FPMODEL(2,:) = [1 -3 2]; % FP coord system -> Model coord system
glab.dirVec.VICMODEL(2,:) = [-1 3 2]; % Vicon coord system -> Model coord system

% Y direction (Vicon) Gait -> transformation vectors
glab.dirVec.FPMODEL(3,:) = [2 -3 -1]; % FP coord system -> Model coord system
glab.dirVec.VICMODEL(3,:) = [2 3 1]; % Vicon coord system -> Model coord system

% -Y direction (Vicon) Gait -> transformation vectors
glab.dirVec.FPMODEL(4,:) = [-2 -3 1]; % FP coord system -> Model coord system
glab.dirVec.VICMODEL(4,:) = [-2 3 -1]; % Vicon coord system -> Model coord system

Anyone mind sparing a little to explain? Thanks!
Yi.

RE: FAQ question: C3D Files

Posted: Fri Aug 06, 2010 4:07 am
by twdorn
Hi Yi,

I have CCed this question and answered it in the c3d toolbox public forum: https://simtk.org/forum/message.php?msg_id=4686

Tim