Page 1 of 1

Matlab Inverse Dynamics

Posted: Thu Mar 16, 2023 1:27 pm
by crubow
Hello,
I have a model and a motion file I would like to perform Inverse Dynamics on but am having trouble using the Matlab API. I am specifically using OpenSim 3.3.
This is the code I've figured out so far,

Code: Select all

%%%%%%%%%% Inverse Dynamics %%%%%%%%%%%
my_model.buildSystem()
my_state = my_model.initializeState()
id = InverseDynamics(my_model)
% crashes if id.begin(my_state)

%%% or %%%
id_solver = InverseDynamicsSolver(my_model)

%%% or %%%
id_tool = InverseDynamicsTool()
id_tool.setModel(my_model)
Thank you