This is an example using the MocoInverse tool with a complex model to prescribe walking.
#include <Moco/osimMoco.h>
int main() {
inverse.setName("example3DWalking_MocoInverse");
inverse.
setModel(modelProcessor);
inverse.set_initial_time(0.81);
inverse.set_final_time(1.79);
inverse.set_mesh_interval(0.02);
inverse.set_kinematics_allow_extra_columns(true);
solution.
getMocoSolution().
write(
"example3DWalking_MocoInverse_solution.sto");
return EXIT_SUCCESS;
}