andreadelprete / consim

GNU General Public License v3.0
14 stars 1 forks source link

Quadruped Jump Results #29

Closed andreadelprete closed 3 years ago

andreadelprete commented 4 years ago

I've ran some tests on the Solo jumping motion generated by @hammoudbilal . It seems to work well, and contrary to the trotting motion here we get even use a control time step of 10 ms (for trotting the max control time step to achieve stability was 2 ms). Here you can see the local integration errors: jump_dt_10ms_mean_inf_norm For large time steps the gain of the exponential integrator is huge because Euler gets unstable. If we are not interested in high accuracy (as in MPC), exponential is an interesting choice, because it gives reasonable results for large time steps (10 ms => ndt=1). To achieve the same accuracy (i.e. 0.2) with Euler we should use a time step 24 times smaller! Exponential keeps beating Euler even for smaller time steps, but the gain decreases.

andreadelprete commented 4 years ago

Looking at the integration error of the exponential integrator over time: jump_integration_err_traj_exp It seems to be highly correlated to the norm of the robot velocity: jump_velocity_norm This is reasonable I think, and indeed it happens also when the robot is in the air. However, this correlation is much less evident for the Euler integrator error (except when the robot is in the air): jump_integration_err_traj_euler My guess is that when the robot is in contact, most of the Euler integration error comes from the contact forces variations during the time step, which are rather independent of the robot velocity norm. Instead, for the Exponential integrator, most of the integration error comes from the variations during the time steps of other terms of the dynamics (e.g., Mass matrix, gravity vector), which are well correlated with the robot velocity norm. This is coherent with the observation that using the exponential integrator the integration error is roughly the same when the robot is in contact or not, which in my opinion is a great result.

andreadelprete commented 4 years ago

I forgot to mention that the robot is in the air in the time interval [1, 1.7] s.

andreadelprete commented 4 years ago

New results for the same test. Here I'm showing the local integration error as a function of the computation time (per time step, which is 10 ms in this test): local_err_vs_comp_time Here Euler is more competitive than in the trot test, but it still never beats the best Exponential integrator, even though sometimes it beats the default Exponential. The best number of matrix multiplications for expm is either 1 or 0.