-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need ObjectiveFcn.MAYER.TRACK_CONTACT_FORCES #791
Comments
Dear @Alpha2Shahiri, Also, a force without integration does not really make sense as the only effect of a force is solely reflected on the q and qdot state parameters. What are you trying to accomplish by needing a Mayer objective? |
Thanks for your answer. I would like to track specific force profile in a phase (pianist key reaction force profile). I used Lagrange and seems the contact forces are tracking that values. To clarify, the Lagrange Objective Function accumulates costs throughout the entire duration, while Mayer addresses costs at distinct times. Given I'm working with a specific profile, it seems Mayer is the appropriate choice and I will make the changes. |
Again, assuming you are solving using the Ipopt solver, if you are tracking forces accross all the phase, then Mayer and Lagrange are strictly equivalent near to a factor (corresponding to the delta time). The be more precise, the way Mayer is implemented is actually the same than Lagrange but assumes a delta time equals to 1. In that sense Lagrange does not accumulate the objectives, it is separately computed at each shooting node. So declaring Mayer objective at each shooting node or using a Lagrange is almost the same. Please note that using a Mayer to declare a value at the last node does not make sense for the forces. |
I'm currently working on a specific phase and require to track the values of the forces. I noticed that ObjectiveFcn.Lagrange.TRACK_CONTACT_FORCES exists. However, for my project's needs, I require ObjectiveFcn.MAYER.TRACK_CONTACT_FORCES. Can this functionality be added or is there an alternative approach I should consider?
The text was updated successfully, but these errors were encountered: