Inverse Kinematics of KUKA KR3 R540

Inverse Kinematics

It is done for determining the joint variables in terms of the end-effector position and orientation. To control the configuration of the end-effector to reach an object, the inverse kinematics solution must be solved. Hence we need to know what are the required values of joint variables to reach a desired point in a desired orientation

DH Parameters

Denavit-Hartenberg (1955) method that uses four parameters is the most common method for describing the robot kinematics. Denavit & Hartenberg showed that a general transformation between two joints requires four parameters. These parameters known as the Denavit-Hartenberg (DH) parameters have become the standard for describing robot kinematics.

First, we start by defining the z axis along the axis of rotation for revolute joints or the axis of translation for prismatic joints. For the first joint the x axis is a free choice. For later joints each x axis will point away from the previous joint. If we add another joint, we can determine the transformation between them as before the z axis points along the axis of rotation. The DH parameters will be derived from the common normal between these z axes. The common normal is orthogonal to both vectors as also the shortest line between them. The new x axis points along the common normal and has its origin at the intersection of the new z. Using this protocol for laying out the reference frames only for parameters are needed the first of these. d is the depth along the previous joint z axis from the origin to the common normal. Theta rotates about the previous z-axis to line the x-axis. r is the length of the common normal itself. This is also the radius of revolution for the new origin about the previous Z. alpha rotates about the new x-axis to bring Z into alignment with the axis of joint motion.

DH Parameters for KUKA KR3 R540 is given below

Decoupling Technique

It is possible to decouple the inverse kinematics problem into two sub-problems known as inverse position and inverse orientation kinematics. the practical consequence of such a decoupling is the allowance to break the problem into two independent problems each with only three unknown parameters.

Solution of the inverse kinematics problem starts with the wrist position followed by the orientation of the wrist. Wrist position depends only on the θ1, θ2 and θ3 angles, which can be determined geometrically and the orientation of the wrist depends only on the θ4, θ5 and θ6 which can be determined using the algebraic method.

Inverse Position

Geometric Analysis

Finding θ1 : For finding the θ1 we need to first find P04 which can be obtained by a translation d6 under the z6 axis from the joint 6, P06.

Finding θ2 : Before finding the θ2 as we can see from the geometric analysis figure shown above, we need to P14 ,  γ and ω. ω can be obtained using the cosine law of SSS triangle.

where n = [-1,1] because of the z-axis

Finding θ3 : You can either start finding θ2 first or θ3 . Since we obtained P14, we need to find the β and α. β can also be obtained by using the cosine law for SSS triangle. Considering that the sum of the internal angles of any triangle equal to π and then the adjacent angles equal to π-β.

Inverse Orientation

Through the rotation matrix (4R6) we can obtain the other three joint variables namely θ4, θ5,and θ6.

Hope this blog is helpful and feel free to send feedbacks and also to comment on blogs for further improvements in the future.

Thank you.

Different Representations of Rotation

Problem in Representing Rotations

  1. Rotations do not commute
  2. Spatial rotations do not topologically allow a smooth mapping in three dimensional Euclidean space

The primary disadvantage of rotation matrices is that there are so many numbers which often make rotation matrices hard to interpret. Numerical errors may build up until a normalization is done.

Different Representations of Rotation

  1. Angle-Axis Representation
  2. Euler Angles
  3. Quaternions
  4. Euler Parameter

Angle-Axis Representation

Representing a Rotation with an angle φ and with axis of rotation (u) is called angle axis representation of rotation Matrix. Here u vector is the direction cosine vector

u1 is point direction cosine with X-axis, u2 is direction cosine with Y-axis and u3 is direction cosine with Z-axis.

Consider the diagram given above.

  1. The angle ϴ is rotated along X-axis. Therefore, the vector is at Z-Y axis. So the value of ϴ is given by

2. The angle ϕ is rotated along Z-axis. Therefore, the vector is at X-Y axis.

Using these angles we can find u1 and u2 by

The Rotation matrix (Body Frame to Global Frame) can be represented as,

Euler Angle Representation

Euler angles are also employed to describe the rotation matrix of rigid bodies utilizing only three numbers. Euler angles and rotation matrices are not generally one to one and also they are not convenient representations of rotations.

The remaining angles are not distinguishable when ϴ tends to zero.

The equivalent rotation matrix is directly obtained by matrix multiplication, while inverse conversion (Rotation matrix to Euler angles) is not straight forward. It is also not applicable when sin(ϴ)=0

The main advantage of the Euler angles is that they use only three numbers. They are integrable and they provide a good visualization of spatial rotation with no redundancy. Euler angles are used in dynamic analysis of spinning bodies.

The other combinations of Euler angles as well as roll-pitch-yaw angles have the same kind of problems and similar advantages.

Quaternions

Quaternion uses four numbers to represent a rotation according to a special rule for addition and multiplication. Rotation quaternion is a unit quaternion that may be described by Euler parameters or by the axis-and-angle of rotation.

Euler Parameter Representation

We can derive Euler parameter from angle-axis representation. The Euler parameters are e0 e1 e2 e3.

Rotation Matrix and Global Position can be obtained by,

Euler Parameter from Rotation Matrix

Euler Parameters from Euler Angles

Euler Parameter from Rotation Matrix

Euler parameters are the elements of rotation quaternions. Therefore, there is a direct conversion between rotation quaternions and Euler parameters which in turn are related to angle-axis parameters. We can obtain the axis and angle of rotation (φ,u) from Euler parameters or rotation quaternion e(φ,u) by

Homogeneous Transformation

Rotation and Translation:

Gr – Position w.r.t Global Frame

GRB – Rotation Mapping Body Axis to Global Axis

Br – Position w.r.t. Body Frame

Gd – Translation of Local Frame w.r.t Global Frame. In other words, position of the moving origin w.r.t fixed frame of reference

Homogeneous Transformation:

GTB – Transformation Matrix. (Maps Body Frame to Global Frame)

Transformation Matrix maps a homogeneous position vector from one frame to another frame and this matrix is not a orthogonal matrix.

The Last row of all the three above vectors represents the Scaling Factor not the coordinate system.

Representation of an n-component position vector by an (n+1)-component vector is called Homogeneous Coordinate Representation. Homogeneous Representation of a vector r=[x y z]T

where w=1 (Scaling Factor). In this case, the transformed homogeneous coordinates of a position vector is equal to the physical coordinate of the vector and the space is the standard Euclidean space.

If a points is at infinity, then with scale factor as zero (w=0) the points tends towards infinity and we may adopt the convection that the homogeneous coordinate as [x y z 0]T

General Homogeneous Transformation:

Decomposition of Transformation Matrix

Transformation matrix can be decomposed to pure translation (GDB) and pure rotation matrix. Transformation takes place by pure rotation and followed by pure translation.

Inverse Homogeneous Transformation

Since the transformation matrix is not orthogonal,

Compound Homogeneous Transformation

Transformation Matrix obtained by a series of multiplication of Homogeneous Transformation Matrix

Consider the above example. Given the transformation matrices for (B to A) and (C to B). Find the transformation matrix for (C to A).