Why is it not possible to set object position with mj_model data structure when using free joint

Discussion in 'Simulation' started by Jędrzej Orbik, Jan 22, 2020.

  1. As in the subject, based on the threads: thread1 and thread2 the only possibility to set the position of the body with free joint is the use of mj_data.qpos (because mj_model.body_pos does not change anything). Why is it this way?

    Why is it possible to change the position of body in much more convenient way with mj_model.body_pos when body is connected using any joint type but not if we use free joint? The documentation says only about the difference of the definition of joint position regarding the frame (here under the body/joint section), I am not sure if this is somehow the reason for the difference?

    Thanks for clarification!
     
    Kyokushin likes this.
  2. Mujoco would require a generic inverse kinematics solver to do so. It would have to deal with unsolvable IKs and resolve redundancy. Your proposed type of convenience enhancement would probably not be straightforward to integrate as generic, nice feature. But that is only my humble guess.