Skip to content

boxddp

Rohan Budhiraja requested to merge proyan/crocoddyl:topic/boxddp into devel

I'm facing a problem when the constraints are active. I still need to investigate why that happens. 1) I temporarily changed the biped example in order to test that the box ddp works. I'll revert that before merging. 2) When the constraints are active, the Quu becomes not positive definite after some iterations. I plan to investigate that tomorrow. 3) I'll also implement a box-kkt tomorrow to compare the box-ddp

Reviews regarding the choices on implementation are welcome.

This PR implements the box ddp:

  1. The solver is borrowed from the ddp solver.
  2. In the ddp solver, the compute gains are separated to a separate function. only this function is updated in boxddp
  3. In the forward pass of box ddp, the value of utry[t] is clamped to the lower/upper limits. This means that either:
    3a) we replicate the full forward pass inside box ddp, or
    3b) we separate the update of utry into a separate function inside ddp class; and replace only this new function inside ddpbox class
    I chose to implement 3a here.
  4. In the unittest, I check ddpbox solver against the ddp solver for two conditions:
    4a) if u_sol is the solution of ddp, and we set uu=u_sol or ul=u_sol; then assert(u_sol_box==u_sol) passes.
    4b) if u_sol is the solution of ddp, and we set uu=u_sol-1e-5 or ul=u_sol+1e-5; then u_sol_box is clamped to ul or uu for the indices which were changed, and u_sol_box==u_sol for the indices which were not changed.
Edited by Rohan Budhiraja

Merge request reports

Loading