LouKordos / walking_controller

The main walking controller code for the Bipedal Robot.
13 stars 2 forks source link

Initialize the solver better somehow to fix first iteration time #58

Closed LouKordos closed 3 years ago

LouKordos commented 3 years ago

First iteration takes roughly a second, most likely due to some missing or incorrect initialization. If everything seems correct, it might be necessary to "warm up" the NLP by solving a few iterations on a simulated model in advance in order to provide a closer hotstart guess.

LouKordos commented 3 years ago

This is actually not an issue, the high first iteration time only occurs because the simulation is started a few seconds after the controller has been started, which means the MPC thread measures that time difference as iteration time.

The logs show that the first iteration only spends ~35ms in the solver, while the full iteration time is ~4s:

image