FAQ question: C3D Files

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Ayman Habib
Posts: 2252
Joined: Fri Apr 01, 2005 12:24 pm

FAQ question: C3D Files

Post by Ayman Habib » Wed Sep 05, 2007 11:21 am

Does OpenSim 1.0 support importing C3D files directly?

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

RE: FAQ question: C3D Files

Post by Ayman Habib » Wed Sep 05, 2007 11:44 am

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

User avatar
francois asseman
Posts: 1
Joined: Mon Sep 03, 2007 1:32 am

RE: FAQ question: C3D Files

Post by francois asseman » Wed Sep 05, 2007 10:42 pm

ok but how can you reporcess them and so how can you read and import Vicon Files to Open sim then ?
thanks
françois

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

RE: FAQ question: C3D Files

Post by Ajay Seth » Thu Sep 13, 2007 12:54 pm

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.

User avatar
Michael Schwartz
Posts: 2
Joined: Tue Sep 04, 2007 7:42 am

RE: FAQ question: C3D Files

Post by Michael Schwartz » Tue Oct 09, 2007 5:14 am

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.

User avatar
Manvendra Chauhan
Posts: 2
Joined: Wed May 28, 2008 5:05 am

RE: FAQ question: C3D Files

Post by Manvendra Chauhan » Wed May 26, 2010 6:03 am

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.

User avatar
Tim Dorn
Posts: 125
Joined: Tue Feb 26, 2008 10:14 pm

RE: FAQ question: C3D Files

Post by Tim Dorn » Wed May 26, 2010 6:13 am

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

User avatar
Timothy Kotin
Posts: 1
Joined: Thu Jun 10, 2010 10:40 am

RE: FAQ question: C3D Files

Post by Timothy Kotin » Mon Jun 21, 2010 8:19 am

Thanks Tim, you are both a savior and my namesake.
I'll try to see if this works.

Tim

User avatar
Yi Wang
Posts: 83
Joined: Fri Oct 30, 2009 1:12 pm

RE: FAQ question: C3D Files

Post by Yi Wang » Mon Jul 26, 2010 9:25 pm

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.

User avatar
Tim Dorn
Posts: 125
Joined: Tue Feb 26, 2008 10:14 pm

RE: FAQ question: C3D Files

Post by Tim Dorn » Fri Aug 06, 2010 4:07 am

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

POST REPLY