calcAngularMomentum() functionality
Posted: Thu Sep 05, 2024 6:40 am
Hello! I am fairly new to using OpenSim and am having some trouble with MATLAB scripting. I want to use the calcAngularMomentum() function on the walking data that I have processed. I have a scaled model and have been able to run IK on this model by uploading the file with marker data that I had. I am not sure how this function works however. This is the script I am running in MATLAB, however, I do not think that this takes into account the walking data since I am opening the placed static trial. How do I affiliate the walking data to this?
import org.opensim.modeling.*;
model_path = 'C:\modelPath\\FullBodyModelCGM\CGM24_FullBody\CGM24FullBody_placed.osim';
model = Model(model_path);
state = model.initSystem();
ground_frame = model.getGround();
angular_momentum = model.calcAngularMomentum(state);
import org.opensim.modeling.*;
model_path = 'C:\modelPath\\FullBodyModelCGM\CGM24_FullBody\CGM24FullBody_placed.osim';
model = Model(model_path);
state = model.initSystem();
ground_frame = model.getGround();
angular_momentum = model.calcAngularMomentum(state);