LouKordos / walking_controller

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

Desired foot position formula does not account for steady state position error #70

Closed LouKordos closed 3 years ago

LouKordos commented 3 years ago

During testing of stepping in place, steady state error accumulates over time.

LouKordos commented 3 years ago

After testing walking in the Jupyter Notebook with a normal prediction horizon N = 24, similar steady state error was observed. Very high prediction horizon lengths N > 150 seemed to proportionally reduce the steady state error.

This indicates that the MPC only reduces the steady state error when the prediction horizon is long enough that the cost is too high for the MPC to ignore (the steady state error accounts for a large part of the cost function when it is present over the majority of the prediction horizon).

Since such high prediction horizon lengths are not viable, the foot formula needs to be adjusted to counteract steady state position error. A simple feedback term k * (pos - pos_desired) turned out to be sufficient. It was tested in both the foot position formula directly and as an adjustment to the foot velocity, with the latter being the "cleaner" and slightly better performing approach.

The foot position correction term virtually eliminates the position error while stepping in place and largely helps with keeping up with the desired body velocity.