Changing model parameters while training

Discussion in 'Modeling' started by dmank, Mar 9, 2017.

  1. Hi,

    Is it possible to change parameters of the model on the fly? For example, can I dynamically change the mass of the cart in the inverted pendulum domain and automatically update the dynamics equations?

    Thanks,
    Daniel
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    Yes, you can change the real-valued model parameters between time steps. Keep in mind though that certain derived quantities are precomputed and saved in mjModel. These are the quantities whose names end in '0'. If you change something that affects these quantities, you should call mj_setConst to recompute them.
     
  3. Thanks! That's good to know.