Inverse dynamics output body forces
Posted: Wed Jan 12, 2022 8:12 am
Hi everyone,
I have been trying to run inverse dynamics without external loads using the Matlab API. I got it to successfully output the generalized forces/torques but I would like the body forces/torques instead. The documentation for the InverseDynamicsTool makes it seem like this is possible, but the two required attributes (jointsForReportingBodyForces and outputBodyForcesAtJointsFileName) are both protected. I am not familiar enough with C++ to know how to access/change these attributes. Could someone please explain the required additional lines of code?
Here is the code I have so far:
id = InverseDynamicsTool();
id.setModel(myModel);
id.setCoordinatesFileName('walk1_ik.mot');
id.setLowpassCutoffFrequency(6);
id.setOutputGenForceFileName('id_no_GRF.sto');
id.setStartTime(0);
id.setEndTime(3.6);
id.run();
Thank you in advance for your help!
Melanie Hook
melaniehook@vt.edu
I have been trying to run inverse dynamics without external loads using the Matlab API. I got it to successfully output the generalized forces/torques but I would like the body forces/torques instead. The documentation for the InverseDynamicsTool makes it seem like this is possible, but the two required attributes (jointsForReportingBodyForces and outputBodyForcesAtJointsFileName) are both protected. I am not familiar enough with C++ to know how to access/change these attributes. Could someone please explain the required additional lines of code?
Here is the code I have so far:
id = InverseDynamicsTool();
id.setModel(myModel);
id.setCoordinatesFileName('walk1_ik.mot');
id.setLowpassCutoffFrequency(6);
id.setOutputGenForceFileName('id_no_GRF.sto');
id.setStartTime(0);
id.setEndTime(3.6);
id.run();
Thank you in advance for your help!
Melanie Hook
melaniehook@vt.edu