I have a problem with getting the location with respect to the ground. More excactly the problem is using the method getMatterSubsystem();
I use the following code :
Code: Select all
clc
close all
clear all
import org.opensim.modeling.* % import class opensim.
osimModel = Model(modelFile2); % Model Motion Capture
s = osimModel.initSystem();
index_femur_r = osimModel.getBodySet().get('femur_r').getIndex();
femur_r = osimModel.getMatterSubsystem().getMobilizedBody(index_femur_r);
coordin_femur_r = femur_r.getBodyOriginLocation(s);
Greetings Maarten Sarens