-
Notifications
You must be signed in to change notification settings - Fork 174
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
Code generated DDP with free flyer model in contact gives random result #917
Comments
This is not clear. If you have a random guess, then the solver iterations will be different between them, right? You also need to be aware that the DDP solver is much unstable than the FDDP solver. It means, it requires a "better" initial guess.
This code is closed source, if you wanted me to have a look then you need to give me the reading rights :) |
Have you played with the benchmark code? Perhaps, you can reproduce your issue there. |
What I meant by random guess is that for a fixed (random) guess, two repetitions of a ddp.solve won't give the same decrease in cost as it is expected with classically generated DDP. |
Thanks for the clarification. Have you observed this issue in other solvers? Could you quickly try with FDDP and BoxFDDP? |
I have the same issue with DDP, FDDP, and BoxFDDP. |
Here is an example of how I write my code generated problem. https://github.com/edantec/crocoddyl/blob/benchmark/benchmark/talos_cppad.cpp However I couldn't make this branch compile on my machine due to an error of type |
You need to link |
I have added |
Is there any update regarding this topic? |
Yes there is. |
Sorry @edantec, but I have not yet worked on your issue. Code-gen bugs take time to solve. And unfortunately, I haven't found the courage to plunge in your implementation. I may come around to it, but I can't give you any timeline for my support. |
Just for illustration, I've written a simple example highlighting the problem here on a side branch: https://github.com/edantec/crocoddyl/blob/benchmark/benchmark/talos_cppad.cpp |
You are sharing the same CG model across all the running models: https://github.com/edantec/crocoddyl/blob/benchmark/benchmark/talos_cppad.cpp#L129 Despite that I am not sure if this is the issue source, could you create a single CG per node? |
I've created one single CG per node: |
I am trying to produce a code generated DDP object with the Talos model in contact and a very simple cost function composed of a state regularization and control regularization. This simple cost function is sufficient to stabilize Talos on its feet so I'm expecting the code generation to behave the same way.
However when executing one iteration of the DDP over a random guess, the result is completely random (cost decrease, gradient, etc... all random) and not at all repeatable. The derivatives of the code generated action model have been compared to the derivatives of the classical action model, and are the same, so the error doesn't come from that.
An example of how I build my DDP object is presented here: https://gitlab.laas.fr/proyan/mpc_controller/-/blob/master/src/hand_tracking_problem_full_codegen.cpp
The text was updated successfully, but these errors were encountered: