how to calculate mjData.ctrl?

Discussion in 'Simulation' started by meijuan_jia, Mar 30, 2018.

  1. hi everyone
    Is there any method to calculate mjDate.ctrl given mjData.qpos, mjData.qvel, mjData.cvel and mjData.cinert?
    thank you!
     
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    mjData.ctrl is a control input. The user is supposed to set it.

    Or are you talking about inverse dynamics? In that case, you can calculate mjData.qfrc_inverse, however mapping this force back to the actuators (and inferring the controls) is not automated, because the mapping is ill-posed in general.

    Note also that cvel and cinert are computed internally (from qpos, qvel). You should not attempt to set them directly.