Order of rows in Jacobian matrix

Discussion in 'Modeling' started by Jędrzej Orbik, Jul 8, 2019.

  1. Hello everyone,

    I have one more question:
    what is the actual order of the matrix, which I am getting with 'mj_jacBody'? It has the dimension of 3 x nv, which is the number of degrees of freedom (so the number of 'joint' elements in .xml file, please correct me if I am wrong.). Does it mean, that the rows in the 'jacp' matrix correspond to the order of the joints in the .xml file, exactly as 'qpos' does?

    Because from my current observations it does not seem like it. I am getting the non-zero values for the joint which are higher in the tree, than the element, which I define as 'body' in 'mj_jacBody' function. Maybe something is wrong in the mujoco-py implementation, which I am using... But it is just calling the original Mujoco C++ functions, so I am wanted to ask on the original forum to make sure.
     
    Last edited: Jul 8, 2019
  2. Ok, I got this... I read the flattened out matrix incorrectly. Simple reshape to size (3, -1) has exposed the actual structure of the matrix. Everything is working as expected.
     
    Last edited: Sep 2, 2019