Inverse Kinematics#
The inverse kinematics (IK) is to determine joint variables given end-effector position and orientation. IK is important in robotics because it allows to transform motion specification of operational space into that of joint space. But IK is complex, because
FK is nonlinear, and thus IK is not always possible to find closed-form solutions.
Multiple IK solutions may exist, e.g., for a redundant robot arm.
There might be no feasbile IK solutions, e.g., due to mechanical limits.
In this lecture, we only talk about IK that has a closed-form solution. This is only the case for some special-structured robot arms. For more generalized case, we will leave IK in future lectures.
IK of Three-link Planar Arm#
Suppose the pose of the end-effector is given by position \((p_{x}, p_{y})\) and the angle \(\phi\) w.r.t. \(x_{0}\). We want to use IK to find the joint variables \(\boldsymbol{q}=[\vartheta_{1}, \vartheta_{2}, \vartheta_{3}]\).
To achieve so, as shown in Fig. 35, we can first identify
Also in Fig. 35, we can find the position of point \(W\) is
Applying cosine theorem to the triangle formed by \(a_{1}, a_{2}\) and the segment \(W-0\) gives
Thus,
For the existence of the triangle, it must be \(\sqrt{p_{W x}^{2}+p_{W y}^{2}} \leq a_{1}+a_{2}\). This condition is not met when the given end-effector pose is outside the arm reachable workspace.
Thus, two solution \(\vartheta_{2}\) are obtained, as shown in Fig. 36: the elbow-up pose when \(\vartheta_{2} \in(-\pi, 0)\); elbow-down pose when \(\vartheta_{2} \in(0, \pi)\).
To find \(\vartheta_{1}\), consider the angles \(\alpha\) and \(\beta\) in Fig. 36. Notice that \(\alpha\) depends on the sign of \(p_{W x}\) and \(p_{W y}\); then,
To compute \(\beta\), applying again the cosine theorem yields
with \(\beta \in(0, \pi)\) so as to preserve the existence of triangles. Then, it is
where the positive sign holds for \(\vartheta_{2}<0\) and the negative sign for \(\vartheta_{2}>0\). Finally, \(\vartheta_{3}\) is computed from (3).
IK of Manipulators of Spherical Wrist#
Most of industrial robot arms are kinematically simple, the design is partly motivated by easing IK. In particular, a 6-DOF robot has closed-form IK if:
three consecutive revolute joint axes intersect at a common point, like for the spherical wrist; or
three consecutive revolute joint axes are parallel, like the three-link robot arm
Inspired by our above IK process to a three-link planar arm, an itermediate point \(W\) on the robot arm can be found, such that the IK can be decoupled into two lower-dimentional sub-problems. Specifically, for a robot arm with spherical wrist, a natural choice is to put \(W\) at the wrist position. As shown Fig. 37, if the end-effector pose is \(\boldsymbol{p}_{e}\) and \(\boldsymbol{R}_{e}=\left[\begin{array}{lll}\boldsymbol{n}_{e} & \boldsymbol{s}_{e} & \boldsymbol{a}_{e}\end{array}\right]\), the wrist position will be
\(\boldsymbol{p}_{W}\) is a function of previous joint variables that determine the wrist position.
Hence, for a special 6-DOF robot arm with sphere wirst, IK can be solved by the following steps:
Compute the wrist position \(\boldsymbol{p}_{W}\left(q_{1}, q_{2}, q_{3}\right)\).
Solve inverse kinematics for \(\left(q_{1}, q_{2}, q_{3}\right)\).
Compute \(\boldsymbol{R}_{3}^{0}\left(q_{1}, q_{2}, q_{3}\right)\).
Compute \(\boldsymbol{R}_{e}^{3}\left(\vartheta_{4}, \vartheta_{5}, \vartheta_{6}\right)=\boldsymbol{R}_{3}^{0 T} \boldsymbol{R}_e\)
Solve inverse kinematics for orientation \(\left(\vartheta_{4}, \vartheta_{5}, \vartheta_{6}\right)\)
Therefore, IK is decoupled into: (1) IK for the arm (Step 1-2); and (2) the IK for the spherical wrist (Step 3-5).
Below are presented IK solutions for two types of arms (spherical and anthropomorphic) and IK solution for the spherical wrist.
IK for Spherical Arm#
Consider the spherical arm:
Its FK is
To solve IK for the joint variables \(\vartheta_{1}, \vartheta_{2}, d_{3}\) given \(\boldsymbol{p}_{W}=[p_{Wx}, p_{Wy}, p_{Wz}]^T\), just equate \(\boldsymbol{p}_{W}\) to the first three elements of the fourth columns. This leads to the following (after some manipulation)
Then, solving the above equation for \(\vartheta_{1}, \vartheta_{2}, d_{3}\) yields
IK of Anthropomorphic Arm#
Consider the anthropomorphic arm:
To find the joint variables \(\vartheta_{1}, \vartheta_{2}, d_{3}\) corresponding to \(\boldsymbol{p}_{W}=[p_{Wx}, p_{Wy}, p_{Wz}]^T\), we equate the first three elements of the fourth columns of the matrix
There exist four solutions:
with
The four solutions are illustrated below: shoulder-right/elbow-up, shoulder-left/elbowup, shoulder-right/elbow-down, shoulder-left/elbow-down; obviously, the forearm orientation is different for the two pairs of solutions.
IK of Spherical Wrist#
Consider the spherical wrist below.
To find the joint variables \(\vartheta_{4}, \vartheta_{5}, \vartheta_{6}\) corresponding to a given end-effector orientation \(\boldsymbol{R}_{6}^{3}\). As previously pointed out, these angles constitute a set of Euler angles ZYZ with respect to Frame 3.
from its expression in terms of the joint variables, it is possible to compute
for \(\vartheta_{5} \in(0, \pi)\), and
for \(\vartheta_{5} \in(-\pi, 0)\)