LouKordos / walking_controller

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

Seemingly regular spikes in solver time #68

Closed LouKordos closed 3 years ago

LouKordos commented 3 years ago

The time spent solving the optimization problem is showing spikes in a regular interval.

image

LouKordos commented 3 years ago

Different prediction horizon lengths as well as different contact swap intervals shift the spike times, indicating it's something related to the MPC getting new information.

LouKordos commented 3 years ago

With the formula (n * contact_swap_interval - N) * dt, where n specifies which spike / peak is meant and contact_swap_interval is in iterations, the time of the spikes can be calculated. Plugging values like n = 10 into the formula, a peak should appear at (10 * 16 - 24) * (1/50) = 2.72 [s] As can be seen below, there indeed seems to be a spike at that point in time.

image

This in turn means that the MPC gets information about a new future contact swap, which increases the time needed to solve the optimization problem since it drastically changes the CoM's trajectory.

Since this is expected / "normal", there is not really a solution. Closing.