1. Introduction
In addition to being able to operate side by side with humans, one of the remarkable skills of collaborative robots (also known as cobots) is their ability to be programmed by hand guiding.
Hand guiding is the process of making the robot compliant with external forces by the human operator, thus setting the desired via points by manually moving the end-effector into the corresponding poses [
1]. Via points are employed to specify geometric primitives, such as line segments, circular arcs or splines, that constitute the trajectories to be executed by the robot. When compared to other robot teaching methods, such as jogging through teach pendant, or offline programming, hand guiding is an easier and faster procedure [
2], and it is advantageous especially when production flexibility is a major concern. There are several ways to refer to hand-guided programming; e.g.,kinesthetic teaching, manual guidance [
3], force guidance [
4], lead-through programming [
5], or walk-through programming [
6]. In [
7], a manual guidance approach is used in a human–robot cooperative system, and is applied to the transportation and assembly of workpieces in a production line. Ref. [
8] proposes a precision hand-guiding approach of industrial manipulators with obstacle avoidance capability. A sensorless hand-guiding method based on torque control is designed, and tested on a 6 degrees of freedom (d.o.f.) manipulator, in [
9]. Ref. [
10] describes a precision hand-guiding approach based on the end-effector force/torque measurements, and a compensation of the tool weight/inertia.
Given the Cartesian space trajectories resulting from the hand guiding taught via points, the next step is to achieve suitable joint trajectories as results of inverse kinematics (IK) [
11,
12]. In the case of 6 d.o.f.manipulators, or more precisely, when the robot has the exact number of degrees of freedom required to accomplish a given task, there is one-to-one matching between the end-effector pose and the joint angles (up to a finite number of different configurations [
13], of which, in the case of hand guiding, exactly one is prescribed). However, in the case of redundant manipulators (which have more degrees of freedom than those strictly required to execute the task) the same end-effector pose might be reached by an infinite number of joint trajectories. A challenge, in this setting, is that of choosing one among those joint trajectories, simultaneously exploiting the additional degrees of freedom in order to accomplish secondary objectives, e.g.,collision avoidance, singularity avoidance, or satisfaction of joint constraints (see [
14] for a thorough review of the redundancy resolution methods). On the other hand, for some practical applications, such as the one shown in
Section 2, it is also necessary to avoid unpredictable configurations at a taught end-effector pose. In other words, the redundancy resolution algorithm should not lead to the desired Cartesian trajectory by means of joint configurations different from the taught ones.
To the authors’ knowledge, in manual guidance applications, there is no general approach to exploit the redundancy and ensure, at the same time, that the taught end-effector poses are achieved at the taught joint configurations. Indeed, typically, hand-guiding approaches are mainly focused on Cartesian trajectory tracking only [
8,
10,
15,
16,
17]. A related, but different, concept is that of cyclicity, namely the property of obtaining the same joint configurations when a certain task is repeatedly executed by a redundant manipulator [
18,
19,
20,
21,
22]. However, we deal with a stricter requirement: the joint configurations must not only be the same when the task is repeatedly executed, but, in addition, the joint trajectories must cross the taught configurations.
The contribution of the present paper is twofold: (1) we show that the kinematic inversion of a particular redundant manipulator (specifically, a cobot mounted on a cart) can be decoupled into the computation of a singularity-aware cart motion law, followed by a standard kinematic inversion for the robot (the mentioned computation can ultimately be reduced to a particular path planning problem); (2) we propose a variational approach to compute the singularity-aware cart motion law. The proposed approach, which has been validated in simulation, can be generalized to a more complex scenario, where more than one linear axis is added to the overall kinematic chain. The problem considered in the present paper has significant importance in the industrial practice. Indeed, in flexible manufacturing systems, kinesthetic teaching is extremely useful, since it avoids time-consuming offline programming that is not convenient for small-batch or even one-of-a-kind production [
23,
24,
25]. When employing kinesthetic teaching, the operator himself takes into account several secondary (but important) tasks, e.g., obstacle avoidance, proper approach to the workpiece, constraints due to cables and many more. Those constraints are handled by a proper choice of the via points, under the implicit assumption that the via point will be reached with a robot configuration which is the same configuration of the robot at time of teaching that via point. However, when the overall system is redundant, such an assumption does not hold any more, but the secondary tasks still need to be accomplished. The present work addresses this problem, allowing the operator to rely on a one-to-one correspondence between taught via points and joint configurations. The remainder of the manuscript is organized as follows.
Section 2 describes the problem addressed, and also provides a useful formalism for the subsequent sections. In
Section 3, the proposed solution is formally presented.
Section 4 shows numerical simulations of the proposed approach performed on a 6 d.o.f. robotic arm mounted on a linear-axis cart. Finally, conclusions and future works are discussed in
Section 5.
2. Cart-Mounted Cobot, Redundancy and Shoulder Singularity
A motivating application for the present work is the robotic soldering of large workpieces. Hand guiding is particularly advantageous to this end, because it allows us to program soldering trajectories (which are frequently composed of straight lines and/or circular arcs) with just a few manually taught points. This benefit is even more evident in flexible production systems, in which small, or even unitary, lots of items are processed. Clearly, the offline programming time–effort in this case is greater than the time taken by the human operator to manually guide the robot.
In the following, we consider a 6 d.o.f manipulator mounted on a cart, such as the one depicted in
Figure 1. Hand-guiding programming can be employed on such a system, provided that the jogging involves the cart as well.
The cart, besides extending the effective workspace of the manipulator (allowing us to process larger workpieces), introduces an additional prismatic joint in the kinematic chain, thus leading to an overall redundant robotic system. Such a redundancy raises two issues, related to each other, namely (1) the actual joint configurations at the taught via points, and (2) the shoulder singularity avoidance, hereafter described in detail.
2.1. Actual Joint Configurations
The taught via points must be reached at the corresponding taught joint configuration. A practical reason for this requirement is the need to mix Cartesian and joint-space motions; for instance, a taught configuration may be the starting configuration of a joint-space motion primitive (such as a homing movement). However, when employing a standard redundancy resolution algorithm [
14], there is no guarantee that the actual taught joint configuration will be reached.
A straightforward way to circumvent the problem is to set the cart trajectory beforehand (for instance, by imposing a linear-in-time motion law that crosses the taught cart configurations), thus losing a degree of freedom. The remaining 6 are then exploited, via inverse kinematics, to get the desired end-effector motion. Since, in that case, the actual kinematic inversion operates on a non-redundant system, the unpredictable configurations are avoided. Meanwhile, the ability of redundant robots to avoid the singularity is lost. In particular, in the following, we focus our attention on avoiding shoulder singularity conditions.
2.2. Shoulder Singularity Avoidance
As is well known, singularity is an essential problem related to the kinematics of robotic arms [
26,
27,
28,
29,
30,
31]. Using
q and
p to denote the joints, and the end-effector pose variables, respectively, the differential kinematics are described by
where
is the Jacobian matrix at configuration
q. The configurations leading to rank drops of
are termed
kinematic singularities. Such an algebraic characterization has a physical counterpart: those configurations correspond to reduced mobility of the end-effector, i.e., some operational space velocities
cannot be achieved, no matter how the joint velocity
is chosen. Moreover, in the neighbourhood of a singularity, small velocities in the operational space may lead to large velocities in the joint space. An in-depth treatment of the subject is outside the scope of the present work (the reader is referred to Chapter 3 of [
13]). Here, we only point out that (i) we are facing the
shoulder singularity problem, which is a particular kind of
arm singularity [
13] and, (ii) in the case of redundant manipulators, several techniques exist [
14] to exploit the redundancy in order to avoid the problems caused by the kinematic singularities.
Shoulder singularity occurs when the wrist of a manipulator is located on the rotational axis of the base [
13] (i.e.,the first joint), and may easily occur when the robot is mounted, as in
Figure 1, and the workpiece lies below the robot.
From a practical standpoint, not only singular, but also near-singular configurations must be avoided, meaning that the robot flange must stay clear of the cylindrical avoidance zone, highlighted in yellow in
Figure 1. Hereinafter, we will refer to the above zone as the
non-admissible volume.
A possible approach to avoid singularities without relying on manipulator redundancy is through variational path planning (VPP) [
32], which consists of constructing a path functional, and optimizing this functional over all possible paths using standard methods of variational calculus.
2.3. Problem Statement
In the present paper, we face the following problem. Given a set of N taught poses , and a set of corresponding joint configurations , both constructed during the hand-guiding procedure, the goal of the sought redundancy resolution algorithm is to simultaneously fulfill the following requirements:
More specifically, let
and
be two subsequent taught configurations, corresponding to the poses
and
, respectively, and let
, with
, be the desired motion law from the pose
to the pose
. Denoting by
the forward kinematics function of the overall system, and assuming
, the aim is to find a joint motion law
, such that:
The authors are not aware of current solutions to that problem. In the following sections, two redundancy resolution schemes will be compared to the proposed approach, to show that neither of the two is able to accomplish the goals expressed by (
2).
3. Proposed Approach
Consider the cart-mounted manipulator depicted in
Figure 1 (for the sake of illustration, we report an inverted-mounted robot, but the proposed approach is valid for any other mounting choice).
We use
to denote the configuration of the overall system at time
t, where
is the cart position, while
and
are the joint angles of the manipulator, at time
t. Let the set
denote the non-admissible cylindrical volume of radius
, corresponding to the configuration
. Likewise, let the point
be the origin of the flange reference frame. If the pose of the flange is represented by the tuple
with respect to a certain fixed reference frame, then
P will be represented by
with respect to the same frame. Then, to avoid singularity, the condition to be enforced (by a proper choice of
) is:
where
and
are the initial and the final time of the desired motion law, respectively. However, according to the shoulder singularity condition described in
Section 2.2, it is easy to recognize that
depends on the cart position
only:
while
P is completely specified as a function of time:
since it is nothing more than the translational part of the flange desired motion law. Then, condition (
3) becomes
As a consequence, setting
,
(i.e.,the cart motion law) beforehand, such that (
4) is satisfied, is sufficient to obtain a singularity-free trajectory.
We now introduce a fixed reference frame whose
x-axis matches with the cart direction axis. The
z-axis is aligned with the axis of the first manipulator joint (i.e.,the non-admissible cylinder axes in
Figure 1), and the
y-axis is such that the overall reference frame is right-handed.
We use
to denote the coordinates of the projection of the flange Cartesian point
onto the plane
(i.e.,the plane containing
x and
y), and by
the coordinates of the cart in the same plane. Then, the singularity avoidance condition (
4) is equivalent to the imposition of
outside the circle centered in
with radius
:
For any fixed
, and the corresponding
, the previous inequality is satisfied for
where
and
are the real roots of the polynomial:
If the roots are non-real, then the inequality is satisfied for all , i.e.,for any cart position.
We assume that the desired Cartesian motion law
is continuous (this is not a restriction, since a basic requirement for a motion law is continuity with respect to time), then
is continuous as well; consequently, the coefficients of (
6) are continuous with respect to time. Thus, the roots
and
describe two continuous curves in
t that, in accordance with (
6), define for each
t a (possibly empty) non-admissible interval for
.
Figure 2 reports an example of such curves and the resulting non-admissible region (in light orange). Any cart motion law
from
to
that does not intersect the non-admissible region, e.g.,the green curve in
Figure 2, guarantees the satisfaction of (
5). On the contrary, any cart motion law intersecting the non-admissible region will result in a singular or near-singular configuration for some
t (i.e.,violation of (
5)); thus, it is itself non-admissible. The red straight line in
Figure 2 (corresponding to a linear-in-time motion of the cart from
to
) is an example of such non-admissible motion laws.
The above considerations allow us to conclude that the singularity avoidance can be achieved by establishing a proper motion law of the cart, which in turn amounts to finding a curve from
to
that does not intersect with the non-admissible region. Such a problem can be interpreted as constrained (the constraint is due to the fact that the trajectory cannot go backward in time) path planning with obstacle avoidance, which can be solved with many tools [
33,
34]. In the following, we employ a variational approach.
Specifically, we consider the following functional, which associates a non-negative cost with each function
:
where
H is a density function, and
is a parameter that weights the contribution of the regularization term, which penalizes irregular motion laws.
H is null in the admissible region, and positive in the non-admissible region, increasing as the argument moves toward the center of the region. Then, we formulate the following minimization problem:
We solve a discretized version of (
8) iteratively, starting from a linear-in-time initial guess. The minimizer
is the sought cart motion law, provided that the first term of (
7) is null. In practice, the minimization problem does not need to be solved (i.e.,it is not necessary to reach a minimum), but it is sufficient to find a
, such that
.
In two cases, there is no admissible cart motion law. With reference to
Figure 2, the first (trivial) case occurs when
, and/or
, lie within the non-admissible region. Clearly, in that case, any curve joining the points will intersect the non-admissible region. The other case occurs whenever
, while
(or vice versa), and the polynomial (
6) has real roots for all
. Both situations can be easily detected at time of formulating the discretized problem, but cannot be circumvented. In both cases, indeed, the start and/or the final configuration are not compatible with the desired motion law, meaning that the latter can only be achieved entering the non-admissible region. In other words, the singularity or near/singularity is unavoidable. Possible solutions are (1) Modifying the initial and/or final configuration; (2) Shrinking the non-admissible volume. The former requires the operator’s intervention.
As soon as the cart motion law has been computed, a standard IK algorithm (the resolved rate motion control [
13]) is applied to a modified pose motion law
, precisely:
where
operates a translation of the pose
p of an amount
along the
x-axis. Such a kinematic inversion operates on a fixed robot model, whose configuration is fully specified by
(i.e.,the cart is ignored); thus, there is no redundancy to account for.
A neat overview of the steps to be performed in order to experimentally implement the proposed approach can be found in Algorithm 1. In Algorithm 2, on the other hand, we provide the operations flow to be performed in order to determine the optimal cart motion law.
Algorithm 1 Variational approach description: the main steps. |
Collect N end-effector poses and the corresponding joint configurations Set the end-effector motion law Find the optimal cart motion law, minimizing Equation ( 10) ▹ See Algorithm 2 Apply a standard IK algorithm to the motion law described by Equation ( 9) Merge the cart motion law and the IK solution and apply it to the robot
|
Algorithm 2 Find the optimal cart motion law. |
Require: |
N end-effector poses the corresponding joint configurations the motion law , from to , with the non-admissible cylinder radius the discretization time step
|
Ensure: the optimal cart motion law |
▹ cart motion as empty array for to do ▹ project the poses ← ▹ project the cart position ←, ▹ check the solution feasibility at and
if and ) then else end if if then ▹ discr. time instants in current interval ▹ minimize cost function Equation ( 10) in interval ▹ cart motion law in interval ▹ collect cart motion law
else end if end for return
|
3.1. On the Convergence to a Feasible Solution
As far as the convergence to a feasible solution is concerned, we point out that in its discrete formulation (see
Section 4), the algorithm is guaranteed to converge to a (possibly local) minimum of the functional, but there is no guarantee that the minimum leads to a feasible trajectory, since it may correspond to a
. The parameter
, and the shape of the non-admissible region in the plane
, determine the number and the shape of the local minima of the functional. As a consequence, a crucial role is played by the initial guess, which may lead to different local minima. In this respect, a strategy that might be preferable to selecting a linear initial guess (which may cross the non-admissible region) is that of choosing an admissible-by-construction, albeit possibly irregular, trajectory using the functional
F as a regularizer. The density can then be removed from
F, and
employed as a constraint.
A numerical example of such a strategy is reported in the next section.
4. Simulations
The performed experiments have been deployed on an iMac Pro (2017) with a 3.2 GHz Intel Xeon W 8-core processor and using Matlab 2021b, and consist of moving the flange of a Universal Robots UR10 manipulator, which has 6 d.o.f., from pose to pose (the first three components of each pose represent the coordinates x, y, and z in , while the last three elements are the Euler angles in , expressing the following order of rotation: z-axis, y-axis, x-axis) along a straight line, in which the cart moves from to , and the remaining joints from to . The non-admissible cylinder has a radius .
The functional employed for testing the proposed
variational approach is a discretized version of (
7):
where
M is the number of discrete time steps considered (for simplicity, applying a properly chosen time discretization step
to every time interval
), and
is the regularization weight. For the trajectory reported in
Figure 3, lasting 200 s,
N was chosen to be 5068, and
was set equal to
.
The density
H increases linearly from 0 to 1 when moving toward the center of the non-admissible interval
, as shown in
Figure 4.
The minimization is performed iteratively, in a gradient descent fashion, starting from a linear-in-time (non-admissible) initial guess, represented in blue in
Figure 3. In the same figure, some other intermediate candidate solutions are represented. The entire minimization procedure requires 53,707 iterations, and lasts ∼7.95 s to find the optimal solution on the previously defined hardware and software. The resulting cart motion law is represented in
Figure 5a.
The proposed approach is compared with two other techniques.
The first one is the trivial approach consisting of attributing an arbitrary motion law to the cart, from
to
, followed by IK applied to the modified pose motion law (
9). In particular, we choose a linear-in-time motion, represented in
Figure 5b, and we will refer to it as a
linear approach. Such a method does not guarantee the avoidance of singular and near-singular configurations, as it is clear from
Figure 5b, where the cart trajectory crosses the non-admissible region.
The second technique is a well-known redundancy resolution scheme [
14] that exploits redundancy to locally maximize an objective function
. Henceforth, we will refer to it as the
redundant approach. Omitting the time dependency for easy notation, with
denoting the Jacobian at configuration
q, and
denoting its pseudo-inverse, the redundancy resolution scheme is:
where the operator
projects the gradient of
onto the null space of the Jacobian (thus, it does not affect the task). We implemented a discretized version of (
11) [
35], and employed the following objective function:
corresponding to the requirement of keeping each joint angle
close to the mid value of a certain range
. Indirectly, such an objective function enforces singularity avoidance, since the chosen ranges are such that mid values are well away from the singular and near-singular configurations. This is apparent from
Figure 5c, where the cart trajectory does not intersect the non-admissible region.
In the performed experiment, we consider , and .
In
Figure 6,
Figure 7 and
Figure 8, we can observe the joints trajectories achieved using each of the three compared approaches against their respective target values (dashed lines).
In the linear case (
Figure 6), we can observe unacceptable joint behavior due to the crossing of the non-admissible volume, as previously shown in
Figure 5b. These results highlight the inefficacy of the linear method in addressing the two problems presented in
Section 2.1 and
Section 2.2.
In the redundant case, despite being able to keep the cart outside the singularity zone (
Figure 5c), the desired joint values are not reached, as clearly shown in
Figure 7. Therefore, even if the redundant approach allows us to address the problem stated in
Section 2.2, it fails the challenge outlined in
Section 2.1.
The proposed variational approach, in contrast with the other two approaches above, is effective at both avoiding shoulder singularity (
Figure 5c) and reaching target joints (
Figure 8).
Finally, in
Figure 9, we report the candidate solutions at different iterations when employing the strategy mentioned in
Section 3.1, i.e.,starting from an admissible-by-construction initial guess. Specifically, the initial guess is discontinuous motion, in which the cart moves in one step from its initial position to the maximum of the allowed range (1000 mm), and at the end goes back to the final value in a single step. Clearly, such a motion law is unacceptable, but the functional acts a regularized and the final solution is the same as before.