iit-DLSLab / Quadruped-PyMPC

A model predictive controller for quadruped robots based on the single rigid body model and written in python. Gradient-based (acados) or Sampling-based (jax).
132 stars 11 forks source link

Question about `shift_solution` Implementation #4

Closed jc-bao closed 3 weeks ago

jc-bao commented 3 weeks ago

I noticed that the shift_solution function appears to shift only the first few nodes rather than all the nodes. However, in standard receding horizon control, the shift should be applied to all parameters. I am wondering if I have misunderstood the code, or if this is a deliberate design choice?

Any information would be greatly appreciated! Thanks.

giulioturrisi commented 3 weeks ago

Hi! That part unfortunately is still incomplete, in fact in config.py the shift solution is deactivated. But you are right, a correct implementation would shift everything. To be honest, I did not notice any big difference given the high frequency (and the high number of samples) of the controller, but I will test it more in the next weeks.

jc-bao commented 3 weeks ago

Got it. This makes sense. Thanks for the prompt reply!