You are on page 1of 3

Motion Control of Redundant Robots

with Generalised Inequality Constraints


Amirhossein Kazemipour∗ Maram Khatib∗ Khaled Al Khudir∗∗ Alessandro De Luca∗

Abstract—We present an improved version of the Saturation in limits at the saturation level, as opposed to what happens
the Null Space (SNS) algorithm for redundancy resolution at the in [10]. This is neither necessary nor optimal, and will often
velocity level. In addition to hard bounds on joint space motion, lead to high-frequency oscillations at the level of commands.
we consider also Cartesian box constraints that cannot be violated
at any time. The modified algorithm combines all bounds into In this paper, we propose several improvements to the SNS
a single augmented generalised vector and gives equal, highest algorithm at the velocity level introduced in [10]. First, both
priority to all inequality constraints. When needed, feasibility of joint and Cartesian inequality (box) constraints are treated
the original task is enforced by the SNS task scaling procedure. as hard bounds. Second, all inequalities are assigned the
Simulation results are reported for a 6R planar robot. same priority, i.e., enforced anyway independently of the end-
Index Terms—Motion control, Redundant robots, Inequality
constraints, Hard limits. effector (EE) task (or simply considered out of the SoT, in case
of multiple tasks). Finally, the modifications are made so as
I. I NTRODUCTION to preserve the automatic optimal task scaling of the original
SNS approach, which relaxes the primary task (keeping its ge-
Given a m-dimensional primary task to be performed by a ometric direction) only when no feasible solution would exist,
robot with n joints, with n > m (redundancy), a standard while guaranteeing satisfaction of all inequality constraints.
method to prevent violation of joint/Cartesian inequalities The resulting algorithm does not need parameter tuning and
during motion is to resort to some form of artificial poten- is faster than QP solvers.
tials [1], pushing away from their limits the joints and the
II. M ETHODOLOGY
control points on the robot body [2]. However, this method
is highly parameter-dependent and may introduce oscillations A. Generalised constraints
when activating/deactivating the avoidance task in proximity Consider a robot with n joints and r generic Cartesian
of the bounds [3]. To milden such undesired behavior, the control points distributed on the robot body, each of dimension
null-space projection term or the activation function can be di ∈ {1, 2, 3}, i = 1, . . . , r. We define an augmented vector
designed in an incremental way [4], [5]. Nonetheless, selection
T
of appropriate gains is still needed. Moreover, in case of a = q T pTcp,1 pTcp,2 . . . pTcp,r , (1)
multiple tasks, incorporating the avoidance behavior in the
original Stack of Tasks (SoT) will assign different priorities where q ∈ Rn denotes the joint variables and pcp,i ∈ Rdi
to each single constraint [4]–[7]. is the position of the i-th control point, i = 1, . . . , r. The
Other numerical approaches incorporate joint space and joint variables as well as the Cartesian control points will have
Cartesian motion limits as inequality constraints using some desired motion restrictions. Accordingly, we define the
parameter-free optimization, such as Quadratic Programming augmented matrix
(QP) [8], [9]. However, these methods are computationally T
T T T
slower than analytical solutions and do not lead to realizable A = I Jcp,1 Jcp,2 . . . Jcp,r , (2)
solutions when the original task(s) is not compatible with the
set of inequality constraints. The SNS algorithm introduced where I ∈ Rn×n is the identity matrix and Jcp,i ∈ Rdi ×n
in [10] links QP to the SoT approach and overcomes these is the Jacobian matrix of the i-th control point. Define the
challenges. In the original paper, joint motion limits were position and velocity limits for each joint, j = 1, . . . , n, as
considered as hard bounds (i.e., that cannot be relaxed in Qmin ≤ qj ≤ Qmax , Vjmin ≤ q̇j ≤ Vjmax , (3)
j j
a least-square sense) and treated out of the SoT. On the
other hand, Cartesian (avoidance) constraints were not handled and the limits for each control point, i = 1, . . . , r, as
as hard bounds. In [11], an approach has been proposed min max min max
to include joint and Cartesian inequality constraints in the Pcp,i ≤ pcp,i ≤ Pcp,i , Vcp,i ≤ ṗcp,i ≤ Vcp,i . (4)
SoT for torque-controlled manipulators. However, joint limits
At a generic time instant, the box constraints for the velocity
are always pre-assigned the highest priority over all other
of each component of (1) are given by
constraints. Moreover, all violated constraints are set to their ( )
∗ Dipartimento di Ingegneria Informatica, Automatica e Gestionale,
Qmin
j − qj min
Q̇min,j = max , Vj ,
Sapienza Università di Roma, Via Ariosto 25, 00185 Roma, Italy. Emails: T
amrkzp@gmail.com, khatib@diag.uniroma1.it, deluca@diag.uniroma1.it.  max (5)
Qj − qj max

∗∗ School of Mechanical, Aerospace and Automotive Engineering, Coventry
University, CV1 5FB Coventry, UK. Email: khaled.alkhudir@coventry.ac.uk. Q̇max,j = min , Vj ,
T
Algorithm 1 SNS with generalised inequality constraints Algorithm 2 Optimal task scaling factor
q̇N ← 0, s∗ ← 0, P ← I, Alim ← null, ȧN ← null function GET TASK S CALING FACTOR(α, β)
2: repeat 2: for h ← 1 : n + Σr1 di do
limits violated ← FALSE Lh ← bmin,h − βh
4: q̇ ← q̇N + (J P )# (ẋ − J q̇N ) 4: Uh ← bmax,h − βh
ȧ ← A q̇ if αh < 0 ∧ Li < 0 then
if ∃ h ∈ 1 : n + Σr1 di : (ȧh < bmin,h ) ∨ (ȧh > bmax,h ) then

6: 6: if αh < Lh then
limits violated ← TRUE sh ← Lh /αh
8: α ← A (J P )# ẋ 8: else
β ← ȧ − α sh ← 1
10: getTaskScalingFactor(α, β) 10: end if
if {task scaling factor} > s∗ then else if αh > 0 ∧ Uh > 0 then
12: s∗ ← {task scaling factor} 12: if αh > Uh then
∗ ← q̇ , P ∗ ← P
q̇N sh ← Uh /αh
N
14: end if 14: else
k ← {the most critical constraint} sh ← 1
16: Alim ←  concatenate(Alim , Ak ) 16: end if
concatenate(ȧN , bmax,k ) if (ȧh > bmax,k ) else
ȧN ← 18: sh ← 0
concatenate(ȧN , bmin,k ) if (ȧh < bmin,k )
end if
18: P ← I − (Alim )# (Alim )
20: end for
if rank(JP ) < m then
∗ + (J P ∗ )# s∗ ẋ − J q̇ ∗
 return s
20: q̇ ← q̇N N 22: end function
limits violated ← FALSE
22: end if
end if
24: q̇N ← (Alim )# ȧN EE is required to track a 2D linear path (m = 2), see Fig. 1.
until limits violated = TRUE
26: q̇SN S ← q̇ Therefore, the primary EE velocity task is defined as
ẋ = ẋd + Kp (xd − xee ), (8)

and with the control gain matrix Kp = diag{50, 50} and the EE
position xee computed by the direct kinematics. The sampling
( )
min
min
Pcp,i − pcp,i min
Ṗcp,i = max , Vcp,i , time is T = 1 [ms] and the initial robot configuration (in [rad])
T
(6) is chosen as
max
Pcp,i − pcp,i
 
max max
 π π π π π π T
Ṗcp,i = min , Vcp,i , q0 = − − − − . (9)
T 6 6 6 3 6 6
where T is the sampling time. Accordingly, the generalised The limits (3) are equal and symmetric for all joints:
inequality constraints can be written as the augmentation of π
Qmax
j = −Qmin
j = [rad], Vjmax = −Vjmin = 1 [rad/s].
joint and Cartesian bounds in (5) and (6) as 2
(10)
min T , We consider r = 5 control points (each with di = 1)
min

Bmin = Q̇min,1 , . . . Q̇min,n , Ṗcp,1 , . . . Ṗcp,r
along the robot body, located at the joints j = 2, . . . , 6. The
max T .
max

Bmax = Q̇max,1 , . . . Q̇max,n , Ṗcp,1 , . . . Ṗcp,r corresponding limits (4) are equal for all points, and imposed
(7) only over the y-direction:
max,y min,y
B. Modified SNS algorithm Pcp,i = 1 [m], Pcp,i = −1.1 [m],
max,y min,y
(11)
Consider a single EE velocity task ẋd ∈ Rm , with n > m, Vcp,i = −Vcp,i = 0.8 [m/s].
and its Jacobian matrix J ∈ Rm×n , to be achieved under
The EE starts the motion very close to the desired path. As
the generalised hard constraints in (7). The pseudo-code of
shown in Fig. 2, the positional error converges immediately
the modified SNS method is presented in Algorithm 1. If the
and remains zero along the whole task. Accordingly, the
Cartesian inequality limits in (4) are discarded, the augmented
task scaling is active (s < 1) only for few milliseconds at
matrix (2) becomes A = I and it is easy to show that
beginning, to comply with the saturated joint and Cartesian
Algorithm 1 simplifies to the original SNS algorithm in [10].
velocity limits due to the initial error recovery —see Figs. 3
Note that at line 15, the most critical constraint corresponds
and 4. Later, the robot is able to perform the complete task
to the smallest scaling factor sk over all constraints. Also, at
perfectly while satisfying all inequality constraints (many of
line 19, when there is no way to perform the desired task
them in saturation). The few discontinuities in the commanded
under the hard inequality constrains, we apply an optimal task
joint velocity in Fig. 3 can be addressed by extending the
scaling factor as computed by Algorithm 2, similar to [10].
algorithm to the acceleration level and including suitable joint
III. R ESULTS acceleration limits in the set of constraints.

Verification for the proposed algorithm is done through IV. C ONCLUSION


MATLAB simulations, using a 6R planar robot arm (n = 6) We have proposed major enhancements to the basic SNS
and considering joint and Cartesian inequality constraints. The algorithm at the velocity level for redundant robots. Cartesian
1.5

1
1
0.5
0
0
-1
-0.5
0 2 4 6 8 10
-1

-1.5
0 1 2 3 4 5 6
1
Fig. 1: Initial (black) and final (gray) configurations of the 6R
planar arm. The red circles represent the robot joints (and the 0
EE tip). The desired EE path is the blue line, to be traced from
right to left. The dashed red lines are the Cartesian position -1
limits. The dashed green lines show the path of control points 0 2 4 6 8 10
during task execution.
Fig. 3: Evolution of the joints during task execution. The
0.1
dotted red lines are the bounds on the joint motion.
0
-0.1
0 2 4 6 8 10
1

0.5
1
0
0.5
-0.5
0
0 2 4 6 8 10 -1
0 1 2 3 4 5 6 7 8 9 10

Fig. 2: EE positional errors and related task scaling factor.

inequality constraints are included and treated as hard limits, 1


while preserving all the nice features of the original method.
0.5
The modified algorithm can be extended to include multiple
tasks having different priorities. Moreover, it can be imple- 0

mented also at the acceleration level, which is beneficial for -0.5


involving dynamic properties in the resolution of redundancy
-1
and is suitable for torque-controlled systems. 0 1 2 3 4 5 6 7 8 9 10

R EFERENCES
[1] O. Khatib, “Real-time obstacle avoidance for manipulators and mobile Fig. 4: Evolution of the control points along the y-direction.
robots,” in Autonomous Robot Vehicles (I. Cox and G. Wilfong, eds.), The dotted red lines are the Cartesian bounds on the motion
pp. 396–404, Springer, 1986. of the control points.
[2] M. Khatib, K. Al Khudir, and A. De Luca, “Task priority matrix at the
acceleration level: Collision avoidance under relaxed constraints,” IEEE
Robotics and Automation Lett., vol. 5, no. 3, pp. 4970–4977, 2020. [8] A. Escande, N. Mansard, and P.-B. Wieber, “Hierarchical quadratic
[3] M. Khatib, K. Al Khudir, and A. De Luca, “Task priority matrix under programming: Fast online humanoid-robot motion generation,” Int. J.
hard joint constraints,” in Proc. 2nd Italian Conf. on Robotics and of Robotics Research, vol. 33, no. 7, pp. 1006–1028, 2014.
Intelligent Machines, pp. 173–174, 2020. [9] E. M. Hoffman, A. Laurenzi, L. Muratore, N. G. Tsagarakis, and
[4] N. Mansard, O. Khatib, and A. Kheddar, “A unified approach to integrate D. G. Caldwell, “Multi-priority Cartesian impedance control based on
unilateral constraints in the stack of tasks,” IEEE Trans. on Robotics, quadratic programming optimization,” in Proc. IEEE Int. Conf. on
vol. 25, no. 3, pp. 670–685, 2009. Robotics and Automation, pp. 309–315, 2018.
[5] E. Simetti and G. Casalino, “A novel practical technique to integrate [10] F. Flacco, A. De Luca, and O. Khatib, “Control of redundant robots
inequality control objectives and task transitions in priority based under hard joint constraints: Saturation in the null space,” IEEE Trans.
control,” J. of Intelligent & Robotic Systems, vol. 84, no. 1, pp. 877–902, on Robotics, vol. 31, no. 3, pp. 637–654, 2015.
2016. [11] J. D. M. Osorio, F. Allmendinger, M. D. Fiore, U. E. Zimmermann, and
[6] L. Sentis and O. Khatib, “Synthesis of whole-body behaviors through T. Ortmaier, “Physical human-robot interaction under joint and cartesian
hierarchical control of behavioral primitives,” Int. J. of Humanoid constraints,” in Proc. 19th Int. Conf. on Advanced Robotics, pp. 185–
Robotics, vol. 2, no. 4, pp. 505–518, 2005. 191, 2019.
[7] L. Sentis and O. Khatib, “A whole-body control framework for hu-
manoids operating in human environments,” in Proc. IEEE Int. Conf.
on Robotics and Automation, pp. 2641–2648, 2006.

You might also like