# 3D Inverse Kinematics Jacobian Construction

I am following this article: Overview of Jacobian IK From the link, an example says:

O is a pose vector which represents the initial orientation of every joint

And following this, it gives an example of O:

For example, O would be (45°, 15°, -60°)

Later on it says for the 2D system, the Jacobian can then be constructed as follows: I now have 2 questions if this was transferred to a 3D system:

1. How would O be represented?
2. How would the Jacobian be constructed?
• The answer is given in the original link. Quote: “Jacobian methods use an iterative approach in calculating dO, similar to the Gradient Descent Method.” Mar 20, 2019 at 18:33
• The J is already in 3D it has XYZ
– 50k4
Aug 23, 2019 at 11:29

You can represent the O vector as a vector with 3 parameters

$$O = [q_1, q_2, q_3, q_4, q_5, q_6]$$

There is no conceptual difference in how to write the Jacobian matrix. It is the same idea written for both positions ad orientations. For 6 degrees of freedom (assuming your 3D robot has 6 degreees of freedom) the Jacobian will be a $$6\times6$$ matrix.

We can think of the columns which create the Jacobi Matrix seperatly

$$J = [ J_1, J_2, \cdots J_n ]$$

where

$$J_i = \begin{cases} \begin{bmatrix}z_{i - 1}\\0_{3\times1}\end{bmatrix} & \text{the i^\text{th} joint is revolute}\\ \begin{bmatrix}z_{i - 1} \times (P - p_{i - 1})\\z_{i - 1}\end{bmatrix} & \text{the i^\text{th} joint is prismatic (linear)} \end{cases}$$

Where $$z_i$$ is the axis of the $$i^\text{th}$$ joint expressed as a 3D vector, P is the position of the final frame, in the and $$o_i$$ is the position of the origin of the $$i^\text{th}$$ frame. It is applied to a robot structure here.

An alternative way to compute the Jacobian is to represent the kinematic chain transformation symbolically and symbolically differentiate it. Then you can evaluate the expression for it at any point analytically.

For example (if you know C++) see the use of this technique in the implementation of the Expression::differentiate() function of OpenSim.