Hi.
I want to use my models and motion data of version 3.3 to run CMC in the OpenSim 4.0. According to the upgrade note for OpenSim 4.0, I first changed the knee_angle_beta in the .osim file to be coupled coordinate. Now I want to update motion files using "updatePre40KinematicsFilesFor40MotionType()" function. But how must we use this function? what's its input?
I used this function in the scripting shell and Matlab, but I encountered several errors such as this function not defined.
Thanks.
fixing the motion file of the older version for use in OpenSim 4.0
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: fixing the motion file of the older version for use in OpenSim 4.0
Please see the doxygen documentation here: https://simtk.org/api_docs/opensim/api_ ... d37b2810f3. In Matlab, the code would look something like this:Now I want to update motion files using "updatePre40KinematicsFilesFor40MotionType()" function. But how must we use this function? what's its input?
Code: Select all
import org.opensim.modeling.*;
myModel = Model('filename.osim');
updatePre40KinematicsFilesFor40MotionType(myModel, 'kinematics.mot');
Re: fixing the motion file of the older version for use in OpenSim 4.0
Tanks for your response.
I ran the Matlab code suggested by you but the Matlab got an error.
"Undefined function or variable 'updatePre40KinematicsFilesFor40MotionType'."
I visited the link you shared but on this page have been written that this function Not available through scripting.
I ran the Matlab code suggested by you but the Matlab got an error.
"Undefined function or variable 'updatePre40KinematicsFilesFor40MotionType'."
I visited the link you shared but on this page have been written that this function Not available through scripting.
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: fixing the motion file of the older version for use in OpenSim 4.0
According to the "Upgrade Notes for OpenSim 4.0" page in the documentation (https://simtk-confluence.stanford.edu/d ... penSim+4.0): "Use the function updatePre40KinematicsFilesFor40MotionType() to fix older MOT files which would have incorrectly converted the units of some coordinates. This function is available in the GUI Scripting Shell, Python, Matlab, and C++." Unfortunately, I'm unable to test on Matlab so perhaps the method isn't in fact available there---however, it's available in Python.