hjsuh94 / irs_mpc

iRS-LQR: iterative Randomized Smoothing LQR
MIT License
7 stars 0 forks source link

Refactor IrsLqrQuasistatic and TvLqr Interface #9

Closed hjsuh94 closed 3 years ago

hjsuh94 commented 3 years ago

High-level changes:

  1. Now IrsLqrQuasistatic has a IrsLqrQuasistaticParameters class, which stores all the relevant information about the problem. The implementation of IrsLqrQuasistatic as well as the planar hand has changed to reflect the new structure.
  2. The implementation of solve_tvlqr now includes absolute and relative bounds. The cost on u vs. du is added depending on whether or not index_u_into_x is supplied. Closes #2. The original implementation of irs_lqr is made to be compatible with the new solve_tvlqr interface.
  3. Many parameters that used to be hand-written somewhere deep within the implementations of irs_lqr_quasistatic and quasistatic_dynamics are now fully exposed into parameters. These include the following:
    • gradient_mode: can now choose between exact, first_order, zero_order_B, zero_order_AB`
    • task_stride: expoerted as parameters.
    • decouple_AB: whether the off-diagonal terms will be set to zero.
    • use_workers: whether the workers are used for threading.
  4. Changes interface for planar_hand example (which has been renamed from quasistatic). Now planar_hand_setup has high-level parameters which are fed to IrsLqrQuasistatic in run_planar_hand. @pangtao22 it seems like since we have a setup file already, the yaml file seems unnecessary. If you agree with this solution, this Closes #7
  5. Implements variance scheduling as an input function to IrsLqrQuasistaticParameters. Closes #5.

This change is Reviewable