Skip to main content

calcMaximizingPropulsiveForceIntegrand.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function maximizes the propulsive force for the specified foot.
%
% (struct, struct, struct) -> (Array of number)
%


function cost = calcMaximizingPropulsiveForceIntegrand(modeledValues, ...
params, costTerm)

for i = 1:length(params.contactSurfaces)
if params.contactSurfaces{i}.isLeftFoot == costTerm.is_left_foot
propulsiveForce = getPropulsiveForce( ...
modeledValues.groundReactionsLab.forces{i}(:,1));
end
end
cost = calcMaximizingCostArrayTerm(propulsiveForce);
end