Page 4 of 4

Re: Performing Inverse Dynamics via Matlab API

Posted: Fri Nov 20, 2020 2:56 pm
by aymanh
Hi Alex,

The fundamental issue (looking at the initial code from years ago) is that adding external loads to the model modifies the original model, as such a call to initSystem is required afterwards.

Also, since there's no API to remove forces from a model, adding more external loads in a loop basically has a cumulative effect. The code should load the model fresh for every iteration of the loop, which is accomplished by recreating the tool from files that load the model anew in every iteration.

Hope that explains,
-Ayman