Page 1 of 1

Problem using getMatterSubsystem in matlab

Posted: Tue Apr 05, 2016 2:41 am
by msarens
Hi all,

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);
After running this code Matlab crashes. Can anyone help me out with this problem?

Greetings Maarten Sarens