1. Introduction
Robot manipulators are typically controlled by specifying the desired Cartesian velocities of the end-effector, which are then mapped into joint rate commands. This process, referred to as “resolved-rate control”, runs into difficulty when the “Jacobian” mapping between joint and Cartesian space becomes singular. A singularity occurs when joint motions become linearly dependent, which causes the rank of the Jacobian to collapse. Singularities can occur either at the workspace boundary, such as when the arm is fully extended, or internal to the workspace, such as when two joint axes align. If the singularities are not addressed in the inverse kinematics, then large joint velocities and errors in the end-effector trajectory can result.
When a six-axis manipulator encounters a singularity, it can be particularly catastrophic since it results in the loss of a tool Cartesian translational or rotational Degree(s) of Freedom (DOF). For industrial manipulators such as those shown in
Figure 1 with a yaw-pitch-pitch arm and roll-pitch-roll (RPR) wrist, the singularities occur when [
1]: (a) the elbow pitch causes the shoulder, elbow, and wrist pitch joints to be co-linear, (b) the wrist (intersection of joints 4-5-6) falls on the joint 1 axis, and (c) the wrist pitch causes joints 4 and 6 to align. The elbow pitch singularity causes nearly full arm extension and therefore is most practically avoided by not commanding the robot outside its reachable workspace. The wrist on joint 1 axis singularity is commonly avoided by keeping the task forward so that the tool does not need to reach above the robot. However, the wrist singularity is extremely difficult to avoid because it occurs in the center of the wrist rotation workspace and can occur anywhere in the reachable workspace of the tool.
The RPR wrist becomes singular when the wrist pitch angle is
so that the forearm (
) and hand roll (
) axes align (see
Figure 2). This neutralizes rotation about an axis (
) that is perpendicular to the plane containing the two roll and pitch (
) axes. This singularity is particularly troublesome since it is in the middle of the wrist workspace and wrist abduction/adduction is common throughout the course of a task. Since the singularity cannot be avoided for a six-degree-of-freedom (DOF) robot, then the ill-conditioning of the Jacobian must be handled if the manipulator is to remain in resolved-rate mode.
By far the most common approach in use is the damped least-squares (DLS) method, which modifies the minimum singular value of the Jacobian so that it is nonsingular throughout the workspace ([
2,
3,
4]). The challenge is in selecting a suitable damping factor that gives good behavior in the neighborhood of all singularities without sacrificing too much accuracy. To help resolve this, a weighting matrix can be applied to the Jacobian to deemphasize movement in certain directions [
5] or to use the inertia to reduce acceleration near singularities [
1]. However, the distortion of the Jacobian mapping can produce motion even in directions that are controllable. This “uncommanded” motion can result in inadvertent collisions of the tool with the worksite during close proximity tasks.
Another approach to handling singularities is to eliminate the degenerate component of the motion near the singularity thereby preventing the buildup of large velocities [
6,
7]. The row of the Jacobian corresponding to the singular direction is eliminated, and then the pseudoinverse of the degenerate Jacobian is used to find the mapping between the Cartesian and joint velocities. This procedure has the advantage of eliminating the singular behavior while maintaining a least-squares fit to the desired Cartesian path. However, this requires a priori knowledge of the singularity locations, and several investigators have reported “jerkiness” on the singularity boundary while transitioning between the full and degenerate Jacobians to compute the inverse kinematics.
Other investigators have sought to resolve the spherical wrist singularity in six-axis manipulators by adding a virtual (nonphysical) axis at the end-effector [
8]. Referred to as the Virtual Redundant Axis Method (VRAM), the virtual joint absorbs the Cartesian tracking errors created in the singular direction of the wrist when the joint axes align. Since the robot now has kinematic redundancy by virtue of the additional joint, a weighted DLS solution is then implemented in which the physical uncontrollable direction is heavily penalized. This method has also been recently generalized to other singularities in serial robots [
9]. However, the VRAM requires additional computation, and like the DLS method, can still produce tracking errors in the controllable direction.
The objective of this research is to address the abovementioned deficiencies in singularity avoidance algorithms currently being used for this class of nonredundant robots. While the Task Priority Inverse Kinematics (TPIK) method has been previously used for kinematically redundant robots [
10,
11], applying it to singularity handling for a 6-DOF robot has not been previously done. The new approach is able to preserve the Cartesian path in controllable directions (in a specified order of priority) while circumventing singularities without a priori knowledge of their locations.
The article begins with a brief review of resolved-rate control and the task priority method in
Section 2. The specific algorithm and equations for controlling a six-axis robot are presented in
Section 3. Simulations for the Motoman MH250 manipulator [Yaskawa Electric Corp., Kitakyushu, Fukuoka, Japan] are given in
Section 4. Results and conclusions are presented in
Section 5. The kinematics and singularity analysis for the Motoman MH250 manipulator are presented in
Appendix A and
Appendix B, respectively. The Jacobian and manipulability calculations needed by the task priority and projection method are given in
Appendix C. Functions implemented by the algorithms are given in
Appendix D.
2. Task Priority Inverse Kinematics and Task Projection Theory
The joint position solver is situated between the Cartesian Rate Limiter (CRL) and the Joint Velocity Norm Limiter (JVNL), as illustrated in
Figure 3. The reference Cartesian position input on the left is derived by integrating the commanded Cartesian position changes,
, where the components represent the position and angle-axis “twist”, respectively. The
step of the integration is as follows:
where
is the last reference joint position.
The summer block calculates the difference between the reference task space pose, 0, and the task space pose, 0, calculated from the forward kinematics of the last joint command issued by the norm-limited output of the solver, . The CRL then enforces a saturation limit to prevent excessive Cartesian rate inputs to the position solver. The JVNL applies a saturation limit to the difference between the output of the joint position solver, , and the previous output of the joint velocity norm limiter, , to maintain the norm of the joint position change within specified limits. Thus, the input to the position solver, 0, takes into account not just the trajectory 0 but also any Cartesian position errors that accrue due to Cartesian or joint rate limiting external to the solver and singularity avoidance internal to the solver.
A Newton–Raphson iteration technique is then used within the position solver to converge on the joint solution based on the inverse Jacobian as follows:
where
is the commanded tool pose from the CRL,
is the estimate of the commanded joint position in the
kth step of the iteration, and
represents the forward kinematics.
The classical approach is for the velocity solver to invert the Jacobian using a singularity-robust inverse method such as damped least-squares [
2,
3]. Another option is to break up the inverse kinematics into tasks, which are assigned a priority for singularity avoidance [
12,
13,
14]. Thus, a singularity in the higher order task is prevented by altering the desired path of a lower priority task. This secondary task correction uses a task projection on the manipulability boundary to prevent the manipulability index from penetrating the boundary. In effect, the manipulability constraint is dynamically reallocated to become the highest priority task when it is active [
13].
2.1. Task Priority Inverse Kinematics
In the TPIK approach [
15], the task space,
x, is divided into subspaces,
, where
i denotes the order of importance. The joint velocities
are related to the task space velocities
by
where
is the Jacobian of the task subspace variable,
. Using this task decomposition eventually leads to the following recursive formulation for the inverse kinematics [
13,
16,
17]
where
is the right pseudoinverse of
.
The prioritized task inverse kinematics process for three tasks is shown in
Figure 4. The change in joint positions for first task,
, is obtained by multiplying the pseudoinverse of
by the desired change for Task 1. The effect of
on Task 2 is found by multiplying
by
, which is then subtracted from the desired change for Task 2 to give the modified change for the second task,
. This is then multiplied by the pseudoinverse of
to give the joint change for Task 2,
. Similarly, the effect of the total joint change on Task 3 is subtracted from the desired change for Task 3 to give the joint change for Task 3,
. Note that
strips out the range space of the Jacobians from the previous tasks to ensure that any solution for
cannot affect the previous tasks.
2.2. Singularity Avoidance by Task Projection
The task inverse kinematics process fails when a task Jacobian in Equation (
4) is not invertible. Near a singularity, the task reconstruction method is used to alter the path to go around the singularity [
13,
14]. The manipulability index,
, is defined as follows
which is a continuous, nonnegative scalar that equals zero only when the Jacobian is not full rank [
18]. Since
m is the product of the singular values of
J, it is also a measure of the distance from the singularity [
13]. If the singular value in any direction is 0, then the manipulability will also be 0.
A small variation in the manipulability index is computed from:
For
to be equal to 0, this implies that the task displacement must be orthogonal to the vector,
. In other words,
must be tangent to the surface defined by:
where
. Observing now that
must be normal to the surface, then the projection of the task on the singularity surface is as follows:
Thus,
is the component of the task change that avoids the singularity.
Figure 5 is an illustration of the reconstructed path as it intersects and then moves along the manipulability boundary
to avoid the singularity.
2.3. Task Priority with Task Projection
The task priority decomposition with the task projection incorporated for singularity avoidance is displayed in the block diagram shown in
Figure 6. This particular formulation implements singularity avoidance for Tasks 1 and 2 and no singularity avoidance for Task 3. The velocity decomposition for each task can be broken down into a three-step process represented by the different blocks: task correction (previous task adjustment), task reconstruction (singularity avoidance), and Jacobian pseudoinverse (joint adjustment). Variable data enter from the left and calculated values exit from the right. Dashed line inputs indicate position-dependent Jacobian and manipulability input data that can be calculated by a processor at a slower rate.
For example, the process is illustrated for Task i = 2 is illustrated with the aid of
Figure 7. The first step is to remove effect of previous task(s) from the current task using the following
The quantity in brackets is the change in joint positions
due to achieving Task 1. Therefore, multiplication by
yields the change in Task 2 due to application of Task 1.
The second step is to alter the path to circumvent a singularity:
The quantity in brackets is the component of Task 2 that is in the direction of the gradient of the singularity,
. If the dot product is negative, then the component is toward the singularity, and a portion of this is removed depending on how close it is to the singularity boundary. This behavior is achieved through the dynamic correction gain
(see
Appendix D.1).
The third step is to apply the Task 2 Jacobian pseudoinverse to the Task 2 command to obtain the change in joint positions to achieve Task 2:
where
is the Jacobian for Task 2 with the portion of it that would alter Task 1 removed.
2.4. Manipulability Gradients for Task Reconstruction
Denote the manipulability operator
for a Jacobian
J as
The derivative of measure of manipulability can be expressed with respect to the already-known quantities,
and
, plus the derivative of each element of
J with respect to
, which can be easily computed symbolically [
14,
19]:
where the right pseudoinverse of
J is given by
The computations can also be performed in any coordinate frame, which can significantly reduce mathematical operations as detailed in
Appendix C.
In the case of multiple tasks, the measure of manipulability for a given task,
, is given by
In the above formulation, the computation of
is not immediately obvious. Defining the augmented Jacobian
for Task i as
where
. The relationship between the task manipulability and the augmented task manipulability can be determined as follows [
14]:
where
. Taking the partial of Equation (
17) with respect to the configuration vector
q:
The partials of the manipulability for the augmented Jacobian
can be easily computed in closed symbolic form or numerically using again Equation (
13):
Since
via Equation (
15), Equation (
18) can be applied recursively to each task as outlined in Algorithm A3.
3. Program and Procedure
The basic procedure for TPIK with three tasks is illustrated in
Figure 8. The Jacobian pseudoinverse for each task is used to derive the least-squares solution of the joint angles to accomplish the task. The task decomposition into joint space is performed in numerical order so that all of the joint DOF are used to achieve the first task then the second task and finally the third task. If there are no singularities along the trajectory, then the order becomes irrelevant and the full task trajectory is achieved. If a singularity is encountered, then the task is projected on the singularity surface using the manipulability gradient. Since the Jacobians and manipulabilities are only position-dependent, they may be computed at a slower rate. After the change in joint angles is computed, the norm of the task error is compared with the threshold. If the error is within the threshold, then the final solution is achieved. If not, then another iteration is performed as long as the maximum number of iterations is not exceeded.
3.1. Position-Dependent Data Input (Slow Rate Loop)
The position-dependent data structure contains both Jacobian and manipulability calculations that only depend on the joint position q and can therefore be computed at a slower rate than velocity dependent terms.
3.1.1. Task Jacobians
The tasks are chosen from highest to lowest priority as follows: (1) the three components of tool position, (2) the y and z-components of the tool rotation, and (3) the x-component of tool rotation all in forearm frame 4. The task Jacobians are, hence, computed and assigned the following task priority:
The translation and rotation Jacobians,
4 and
4, are computed in frame 4 using the cross product method as outlined in
Appendix A.2.
The modified Jacobian,
, and manipulability,
, for each task
i are derived from the task Jacobians,
, using Equations (
4) and (
15):
Task 3:
Note that since
is a row vector, the product in Equation (30) is a scalar and therefore taking the determinant is unnecessary.
3.1.2. Manipulability Gradients
The augmented Jacobians
are constructed as:
Calculate the right pseudoinverses of the augmented Jacobians
:
and the augmented Jacobian manipulabilities
:
Note that since
is symmetric, the Cholesky Decomposition can be used to compute the inverse [
20]. It is much more efficient than singular value decomposition [
21], and it has the added benefit of returning its determinant which can be used to compute the manipulability. The task manipulabilities are computed as follows:
Note that although the manipulabilities have already been defined by Equations (24), (27), and (30), Equation (34) is a secondary method of calculation that can serve as an error check.
The gradient of the augmented Jacobian
with respect to each joint angle
results in a matrix the same dimension as
:
where
and
needed to compute the gradients in Equation (
35) are given in
Appendix C.
The gradients of the augmented Jacobian manipulability
with respect to joint angle
are calculated as follows:
These calculations are carried out numerically using the algorithm for the function
as outlined in
Appendix D.3. The augmented Jacobian manipulability gradient is then formulated by assembling the elements into a vector for
N joints as follows:
Finally, the task manipulability gradients are given by:
3.2. Velocity Solver (Fast Rate Loop)
The tasks are chosen from highest to lowest priority as follows: (1) the three components of tool position, (2) the y and z-components of the tool rotation, and (3) the x-component of tool rotation all in forearm frame 4. Thus, the algorithm will maintain tool position before it relinquishes control to tool orientation. Then, the tool rotation is broken down into the y–z plane that is controllable and the x-direction that is uncontrollable at the wrist pitch singularity with the higher priority given to the former.
3.2.1. Initialization
The input to the velocity solver is a twist in the base frame,
, which is the combined vector of linear and angular velocities multiplied by the sample period as follows:
where
represents a free vector in Cartesian space and
is an infinitesimal angle multiplied by a unit axis of rotation. Multiply the components of the twist by the rotation matrix from frame 0 to frame 4 to get the twist in frame 4:
Next, set the change in the each task position as follows:
3.2.2. Execute Task Decomposition
Initialize the joint position change to zero, :
Task 3:
with
defined in Equation (
A23). The change in joint position output from Task 3,
, is the cumulative change in joint position for a single iteration of the position solver. Note that no singularity avoidance is used for Task 3. Instead,
is phased out starting at the transition boundary and completely dropped at the manipulability boundary.
3.3. Joint Velocity Norm Limiter
The purpose of the JVNL is to limit the change in joint positions output by the position solver. While the velocity solver will result in continuous velocities, it can produce large changes in joint velocity during singularity avoidance. The norm limiter limits the magnitude of the joint position changes to help smooth that behavior.
The allowable change in the joint position norm per control cycle is calculated based the selected joint velocity norm limit
and the control cycle period
:
Let the change in the position solver output from the previous cycle be
:
This change is then clamped to the limit if it exceeds the above threshold as follows:
where
. Then, the clamped final output
is given by:
The previous joint position solver output is saved as
, and the JVNL outputs the norm limited joint position
.
4. Simulations
Both simulation and hardware tests were conducted on the Motoman MH250 in the vicinity of the three singularity configurations shown in
Figure 9 to demonstrate the performance of the algorithm in the singular regions. The code was implemented in C++ on an Ubuntu 20.04 virtual machine running on a MacBook Pro. The code utilized an OROCOS Real-Time Toolkit (RTT) and the Eigen C++ Template Library to facilitate matrix operations. Only the simulation results are presented here in order to omit any effects of the robot servocontroller on the resulting trajectory.
The following manipulability boundaries were used: , , and . The transition region widths were set to the same values: , , and . The distance from the wrist to the tool tip was set to 6 m. Since the tool length impacts the value of the translation manipulability, and may need to be scaled up or down appropriately (for example, set for 6 m). The minimum manipulability gradient norm threshold was , and the minimum manipulability change threshold was . These values are used in the filters for the task reconstruction in Equation (A23).
The CRL clamped the translation and rotation inputs at m and rad per iteration, respectively (equivalent to m/s and /s for three iterations). The control loop rate was set to 500 Hz for both the slow and fast rate loops. The joint velocity norm limit was set to rad/s. A maximum of 3 iterations was used in the position solver, and an error threshold of was set for each element of the twist vector to terminate the iterations.
4.1. Wrist Pitch Singularity
The starting configuration for this simulation is
shown in
Figure 9a, which is exactly at the wrist zero pitch singularity so that
. This is possible because the third task is dropped inside the Task 3 singularity boundary. In this configuration, only
can produce
translation and
rotation. Because the translation has a higher priority than rotation, a
translation command will, therefore, also cause a
rotation. The results for the manipulabilities and tool positions/velocities are shown in
Figure 10.
The tool was commanded to translate at 1 cm/s in the y-direction of the base frame as shown in
Figure 10c until the
-axis orientation error reached
. The commanded and “measured” (output) rotational tool velocities can be seen in
Figure 10b and
Figure 10d, respectively. Note the tool rotational velocity about the
-axis of
Figure 10d at 215–225 s, even though none was commanded.
The tool rotation was then commanded in the
direction starting at about 240 s until the orientation error reduced to
. The unwinding of the orientation error occurs at about 270 s when the Task 3 manipulability shown in
Figure 10a crosses the manipulability threshold at
and the wrist orientation about the
-axis (forearm) becomes controllable again.
4.2. Elbow Pitch Singularity
The starting configuration for this simulation is
shown in
Figure 9b with the elbow nearing its singular configuration of
and just outside the workspace boundary. In this configuration, both rotational manipulabilities are already within their transition boundaries of 0.70 and 0.30, respectively, as shown in
Figure 11a. The results for the manipulabilities and tool positions/velocities are shown in
Figure 11.
The tool was commanded to move at 0.5 cm/s in the
-direction, as seen in
Figure 11b,d until the orientation error started building up just before 350 s. At this point, the Task 2 manipulability hits its threshold at 0.30 and the desired orientation can no longer be maintained as shown in the measured rotational velocity in
Figure 11c.
At 365 s, the Task 1 manipulability boundary at
is reached and the tool
-
position error builds up as seen in
Figure 11b. The path is modified such that it now moves along the singularity surface and the tool never tries to penetrate the workspace boundary. At about 380 s, the commanded direction is reversed and the manipulator starts returning to a controllable state. The position error reduces to 0 m by 400 s, and the rotational error continues to unwind.
4.3. Wrist on Joint 1 Axis
The starting configuration for this simulation is
shown in
Figure 9c with wrist close to the joint 1 axis (note that
would put it on the axis). Because the Task 1 manipulability bound is enforced, the wrist will not be able to pass overhead through the shoulder yaw axis. The results for the manipulabilities and tool positions/velocities are shown in
Figure 12.
The tool velocity was commanded at 1 cm/s in the negative
-direction driving the wrist toward the
axis which is coincident with base frame
-axis as seen in
Figure 12b,c. Just after 130 s, the x-position begins to deviate from the commanded path as the Task 1 manipulability hits its threshold at 0.5 preventing the wrist from hitting the
-axis as seen in
Figure 12a.
When the position error reaches 0.05 m just after 150 s, the x-velocity command is stopped, and the negative y-command of 0.5 cm/s is issued as seen in
Figure 12b. This moves the tool away from the
-axis and singular configuration eventually increasing the Task 1 manipulability above its threshold of 0.5. By 170 s, the Task 1 manipulability rises above its threshold, and the x–z positions are able to follow the commanded values as seen in
Figure 12c.
5. Conclusions
A new inverse kinematics approach was developed for a six-axis manipulator that partitions the operational space into three subtasks: (1) tool position, (2) tool orientation plane orthogonal to wrist singularity, and (3) tool orientation in singular direction. The subtasks were given a priority for maintaining the desired path when the inverse kinematics encounters singularity constraints. The Task Reconstruction (TR) method enables the robot to move along a singularity-free path for the first pair of tasks with priority given to tool translation. The third task corresponds to the singular direction caused by wrist pitch and is dropped in the singular region to allow the wrist pitch to pass through the singularity. The application of this approach was demonstrated on the Motoman MH250 six-axis manipulator on a robot simulator running at 500 Hz.
While the TPIK method is not new, it has not been used in this way for singularity handling in six-axis manipulators. The main contributions of this approach include: (a) prioritization of tool position over tool orientation at singularities, (b) partitioning of the operational workspace to allow passage of the wrist through its singularity while preserving tool translation, and (c) smooth operation at the workspace boundary. Simulations validated the task prioritization of tool position over tool orientation in singular regions, and they also demonstrated smooth transition of the wrist through gimbal lock. The prioritization of tool position is especially important when operating in close proximity of surfaces so as not to cause inadvertent collisions.
A couple of disadvantages of the TPIK approach are (a) increased computational load for singularity avoidance and (b) high velocities at the singularity boundary. The increased computations can be offset by placing position-dependent computations such as the manipulability gradients in a slower, position-dependent loop. Moreover, the use of Cholesky Decomposition (over Singular Value Decomposition) on reduced dimension partitioned Jacobians represent a significant cost savings. Peak velocities are typically encountered during transitions on and off the singularity boundary due to the proximity to the singularity, which may still cause the Jacobians to be ill-conditioned. If desired, peak velocity can be reduced by increasing the singularity distance threshold, at the expense of reduced workspace. Future work could incorporate an external joint velocity/acceleration limiting algorithm to reduce this effect [
22].
The partitioned operational space scheme can also be extended to manipulators with kinematically redundancy, such as anthropomorphic arms with elbow swivel self-motion [
23,
24,
25] and 7-DOF manipulators mounted to mobile-bases [
14,
26]. The methodology was also successfully applied to an 8-DOF powered-exoskeleton where the kinematics were split into four operational tasks to provide smoother and safer human operation [
27]. In addition, this approach was extended to the 7-DOF Motoman SIA50D manipulator that used a third task to control the arm self-motion. A companion paper to the research described here is currently in progress.