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
Performing Inverse Dynamics via Matlab API
- Ayman Habib
- Posts: 2235
- Joined: Fri Apr 01, 2005 12:24 pm