Forward and Inverse Kinematics
This note covers the core kinematic problems for manipulators. Forward Kinematics (FK) is the process of calculating the end-effector's position and orientation from a given set of joint angles. Inverse Kinematics (IK) is the reverse and more challenging problem of finding the required joint angles to place the end-effector at a desired pose. These calculations rely heavily on the principles of Co-ordinate-Transforms.
Forward Kinematics (FK)
The goal of forward kinematics is to find the function
The fundamental method for solving the FK problem is by chaining together the homogeneous transformation matrices for each link, starting from the base and moving outward to the end-effector. For a robot with
Each transformation
Derivation for a 2R Planar Arm
For a 2-joint planar arm with link lengths
Multiplying the homogeneous matrices gives us the final end-effector position equations:
The final orientation of the end-effector is the sum of the joint angles,
The Denavit-Hartenberg (DH) Convention
For more complex 3D manipulators, creating these transformations manually can be error-prone. The Denavit-Hartenberg (DH) convention provides a standardized, systematic method for assigning coordinate frames to each link and defining the transformation between them using just four parameters. This makes the FK problem much more manageable.
Inverse Kinematics (IK)
Inverse kinematics is the inverse problem: given a desired pose for the end-effector,
IK is generally much harder than FK because:
- A solution may not exist if the target pose is outside the robot's workspace.
- Multiple solutions often exist. For a 2R arm, this manifests as "elbow up" vs. "elbow down" configurations.
- The governing equations are non-linear, making them difficult to solve.
Analytical IK Solution for a 2R Planar Arm
For simple manipulators like a 2R arm, we can find a closed-form analytical solution.
Geometric Approach
The most intuitive method is geometric. We can form a triangle between the robot's base, its elbow joint, and the target end-effector position
Using the Law of Cosines, we can solve for the angle at the elbow, which directly relates to
Since
Because
Algebraic Approach
Alternatively, we can start with the FK equations and solve them algebraically.
By squaring and adding these two equations and simplifying with trigonometric identities, we can isolate
Numerical IK Solutions
For manipulators with more joints, an analytical solution is often impossible. In these cases, we rely on iterative numerical methods to find an answer. These methods start with an initial guess for the joint angles and iteratively refine it to minimize the error between the current end-effector pose and the desired pose.
This turns the IK problem into a root-finding or optimization problem. The methods used are forms of non-linear optimization, this is present in NLS.
Velocities and the Jacobian
To understand the relationship between the speed of the joints and the speed of the end-effector, we use the Jacobian matrix. The Jacobian,
The Jacobian is found by taking the partial derivatives of the forward kinematics equations with respect to each joint variable. For our 2R arm, differentiating the FK equations with respect to time yields:
The
Singularity
A manipulator is in a singularity when the Jacobian matrix loses rank and cannot be inverted. At a singularity, there are certain directions in the task space that the end-effector cannot move in, no matter how the joints move. This means the robot has momentarily lost a degree of freedom.
This happens when the determinant of the Jacobian is zero. For the 2R arm, the determinant is
This concept is directly analogous to the problem of Gimbal Lock in EULER ANGLES note, which is a singularity in an orientation representation.