Page 1 of 1

Derivative of Jacobian

Posted: Fri Jul 15, 2022 4:04 am
by AdityaNair
Hello!
I'm currently working with a Daisy Hexapod. I need to figure out a way to change the joint angles in order for the Jacobian matrix to behave a certain way.
For this I need a function that would output the derivative of the Jacobian Matrix with respect to the joint angles (6 by 3 by 3 matrix for one leg of the Daisy). I can realistically come up with this by getting the equation for the Jacobian as a symbolic function of the angles, and differentiating it to define the new function. Alternatively, I could also differentiate the Forward kinematics matrix twice and reach the same result.

However, I'm unable to find either of these matrices as symbolic functions within the documentation. If someone is aware of what either of these functions are, it would be very helpful. Alternatively, if someone knows how to differentiate the Jacobian matrix without worrying about the exact definition, it would also serve the same purpose. Thanks for your time :)

Re: Derivative of Jacobian

Posted: Fri Jul 15, 2022 11:56 am
by matt_tesch
Hello,

The forward kinematics and jacobian are generated procedurally and numerically within the API, and so we do not have a symbolic function for either of these that we can expose. However, you should be able to numerically differentiate the Jacobian matrix or double-differentiate the forward kinematics. In these cases, you can perturb with a small joint angle perturbation dTheta around the current angle position, and use the resulting matrices to generate your numerical derivative. For example:

dJ(theta)/dTheta = (J(theta + dTheta) - J(theta)) / dTheta

Depending on your requirements, you can make this derivative unbiased by centering your Jacobian computations around theta instead of only adding to one side, which can make this more accurate. You can also numerically double-differentiate the forward kinematics directly by evaluating at theta, theta+dTheta, and theta-dTheta.

If it would help, we can provide some pseudocode for numerical differentiation of these matrices here as well.

Best,
Matt

Re: Derivative of Jacobian

Posted: Mon Jul 18, 2022 10:25 am
by AdityaNair
Hello Matt!

Thanks for your insight. This makes a lot of sense and seems like the best way to go forward. If you have some pseudocode for this available, I would be most grateful.

Thanks again,
Aditya