How to get equality constraint jacobian from efc_J?

Discussion in 'Simulation' started by Pedro Morais, May 10, 2019.

  1. I'd like to implement an inverse kinematics solver for a robot with an equality constraint (closed loop). For this I need the equality constraint Jacobian, which appears to be stored in efc_J, but I can't tell exactly how efc_J is organized, as it stores all constraints together. How can I extract only the sub-matrix that corresponds to the equality constraint I care about?

    Also, what are the minimal function calls to update the constraint Jacobian (e.g. for the kinematic Jacobian it's mj_kinematics(), mj_comPos(), mj_jacBody()); is it sufficient to just call mj_makeConstraint()? I'm confused as to what d->efc_type and d->efc_id are too, as they appear to always be zero.

    Thank you,
    Pedro
     
    Last edited: May 10, 2019