Research article 08 Feb 2022
Research article  08 Feb 2022
Evolutionary multiobjective trajectory optimization for a redundant robot in Cartesian space considering obstacle avoidance
 ^{1}School of Mechanical Engineering, Hefei University of Technology, Hefei 230009, China
 ^{2}Department of Mechanical Engineering, Kyushu University, Fukuoka 8190395, Japan
 ^{3}School of Mechanical Engineering, Zhejiang University, Hangzhou 310007, China
 ^{1}School of Mechanical Engineering, Hefei University of Technology, Hefei 230009, China
 ^{2}Department of Mechanical Engineering, Kyushu University, Fukuoka 8190395, Japan
 ^{3}School of Mechanical Engineering, Zhejiang University, Hangzhou 310007, China
Correspondence: Yong Liu (xcliuyong@hfut.edu.cn)
Hide author detailsCorrespondence: Yong Liu (xcliuyong@hfut.edu.cn)
A method of endeffector trajectory planning in Cartesian space based on multiobjective optimization is proposed in this paper to solve the collision problem during the motion of the redundant manipulator. First, a cosine polynomial function is used to interpolate the trajectory of the end effector, enabling it to reach the desired pose at a specific time. Then, the joint trajectory of the manipulator is solved by inverse kinematics, and the null space term is introduced as the joint limit constraint in the inverse kinematics equation. During the operation of the manipulator, the collision detection algorithm is employed to calculate the distance between the obstacle and each arm in real time. Finally, a multiobjective, multioptimization model of trajectory that considers the obstacle avoidance, joint velocity, joint jerk and energy consumption is established and optimized with a multiobjective particle swarm optimization algorithm. The simulation results demonstrate that the proposed method can effectively accomplish the trajectory planning task and avoid obstacles; the joint trajectories obtained are smooth and meet the limit constraints; the joint jerk and energy consumption are well suppressed.
In many of today's vastly complex and difficult manufacturing applications, manipulators may have more degrees of freedom (DOFs) than essential due to the need of executing intended complicated jobs like human arms. Specifically, the end effector of redundant manipulator should satisfy a desired trajectory while its body avoids colliding with obstacles in the environment, contributing to finishing the job. The extremely crucial obstacle avoidance problem is that robotic manipulators are required to move from an initial pose to a specified final objective without colliding with any obstacles in the workspace.
To solve the trajectory planning problem considering obstacle avoidance, many researchers have focused on different methods. For example, Ma and Liang (2020) proposed an obstacle avoidance algorithm for a 6DOF manipulator based on a sixthdegree polynomial, with limitations to the redundant manipulator. For the obstacleavoiding motion of the end effector of the redundant robot, Shen et al. (2014) presented an obstacle avoidance algorithm based on the transition between the primary and the secondary tasks to acquire a smooth and continuous trajectory. Dalla and Pathak (2017) put forward a methodology that a limited number of joints are actuated and a curveconstrained link trajectory tracking is developed to control hyperredundant space robots. However, these are only for planar robots. Shi et al. (2019) constructed a visual servoing system, which obtained the image errors by the ORB feature points and constructed a virtual repulsion torque to avoid obstacles.
In addition to the above methods, more researchers handle the obstacle avoidance problem by introducing the concept of potential field to construct the artificial potential field. Safeea et al. (2020) redefined the obstacle avoidance problem as a secondorder optimization problem and constructed the potential function that is minimized by Newton's method to realize realtime trajectory calculation in joint space. It lacks the intuitiveness and efficiency compared with Cartesian space trajectory planning. Wang et al. (2018) realized trajectory planning and obstacle avoidance through the improved artificial potential field method with the consideration of both position and posture of manipulator end effectors. Park et al. (2020) employed a Jacobian matrixbased numerical method and an improved potential field method to achieve path planning and obstacle avoidance, both in redundant and nonredundant conditions.
The abovementioned trajectory planning methods focus more on obstacle avoidance than kinematics or dynamics optimization. Nowadays, an optimized path should be found for robot motion regarding minimum time (Bourbonnais et al., 2015), minimum distance (Salaris et al., 2010), and minimum energy (Arakelian et al., 2011) given the robot optimization problem in obstacle avoidance planning. This suggests that multiple objective functions should be simultaneously optimized to obtain a suitable trajectory. Based on the above articles, some criteria for evaluating manipulator trajectory can be obtained:

Trajectories need to be predictable, accurate, and effective to both compute and execute.

Trajectories need to ensure that the joints of the robotic arm do not appear singular.

Trajectories should be found for a manipulator with respect to minimum time, minimum distance, and minimum energy.
Many researchers used an evolutionary algorithm to address multiobjective planning problems considering obstacle avoidance. For example, Saravanan et al. (2008) optimized two evolutionary algorithms of an elite nondominant sorting genetic algorithm (NSGAII) and differential evolution (DE) to handle the multiobjective problem and achieved the predetermined goal in the PUMA560 robot. Han et al. (2013) realized the obstacle avoidance path planning optimization of the robot arm in the environment with single or multiple obstacles based on genetic algorithms with execution time, space distance, and trajectory length as the optimization parameters. However, most of the above researchers have weighted each constraint as an objective function, making the result very dependent on the setting of the weight factor. Some researchers transform multiobjective problems into quadratic programming (QP) problems. Chen and Zhang (2017) proposed a hybrid multiobjective scheme including the specified primary task for the end effector, obstacle avoidance, jointphysical limits avoidance, and repetitive motion of redundant robot manipulators and transformed it into a dynamic quadratic program (DQP) problem. Zhang et al. (2020) studied two schemes of hybrid endeffector posemaintaining and obstaclelimits avoidance (PMOLA) for redundant robot motion planning based on QP framework to solve the endeffector drift problem in the planar task. Other researchers obtained the Pareto front in multiobjective problems, as well as the nondominant solution. Guigue et al. (2010) employed the discrete dynamic programming (DDP) approximation method to obtain an approximate solution of the Pareto optimal set to handle multiobjective robotic trajectory planning problems. Marcos et al. (2012) combined a closedloop pseudoinverse method with a multiobjective genetic algorithm to control the joint position and choose a solution from the Pareto solution set. Although these researchers solved the multiobjective problem, they did not add energy consumption constraint to the multiobjective problem for obtaining a superior solution with more energysaving or less joint jerk.
Besides, many researchers have improved the particle swarm optimization (PSO) algorithm to acquire the optimized trajectory of the robotic arm. Cao et al. (2016) adopted a hybrid algorithm combing crossover and mutation particle swarm optimization (CMPSO) with the interior point method (IPM) to determine the minimumlength motion path of robot end effector and the best movement posture of the robot arm. Lin (2014) proposed a kmeans clustering method based on PSO to address the nearoptimal solution of the minimumjerk joint trajectory, making it easy to obtain the optimized trajectory control law. Kucuk (2017) developed an optimal trajectory generation algorithm (OTGA) for generating smooth motion trajectories with minimum time with the PSO algorithm. Under the diversification of robot optimization goals, some researchers used a multiobjective particle swarm optimization (MOPSO) algorithm (Coello Coello and Lechuga, 2002) to solve multiobjective optimization problems. For instance, Yan et al. (2020) presented multiobjective configuration optimization for the maximum maneuverability and minimum base disturbance in the precontact stage of dualarm space robot by MOPSO. Liu and Zhang (2021) proposed an improved external archives selfsearching multiobjective particle swarm optimization (EASSMOPSO) algorithm to handle the multiobjective trajectory optimization problem.
In this paper, regarding obstacle avoidance, the change rate of joint torque, joint angular velocity, and energy consumption are minimized using the path planning method based on a multiobjective optimization algorithm. The main contributions of this paper are highlighted as follows.

A cosine polynomial function is used to interpolate the trajectory of the end effector, enabling it to reach the desired pose at a specific time, and the null space term is introduced as the joint limit constraint in the inverse kinematics equation.

During the operation of the manipulator, a collision detection algorithm is employed to calculate the distance between the obstacle and each arm in real time.

The trajectory optimization model of redundant manipulator was established to consider obstacle avoidance, joint velocity, joint jerk and energy consumption, and the optimized trajectories were obtained by a multiobjective particle swarm optimization algorithm.
The remaining paper is organized as follows. In Sect. 2, the end trajectory of the robotic arm is interpolated using the cosine fifthdegree polynomial, allowing the end to reach the specified pose at the specified time. Then, the joint trajectory of the robotic arm is reversed through inverse kinematics. Section 3 presents the collision detection algorithm used in this paper. Afterward, the multiobjective optimization problem equations are described in Sect. 4. The obstacle avoidance trajectory planning based on multiobjective optimization is introduced in Sect. 5. Simulation results are analyzed in Sect. 6. Finally, conclusions are drawn in Sect. 7.
2.1 Trajectory parameterization of end effector in Cartesian space
A fiveorder cosine polynomial is adopted to describe the trajectory to ensure the position, orientation, velocity, and acceleration of the end effector change smoothly and continuously. With this method, the motion of the end effector follows a helical curve in Cartesian space (Zghal et al., 1990). The pose of the end effector is taken to compose a sixdimensional generalized coordinate vector ${\mathit{X}}_{\mathrm{e}}={\left[{X}_{\mathrm{1}}\left(t\right),\mathrm{\dots},{X}_{\mathrm{6}}\left(t\right)\right]}^{\mathrm{T}}$ as the status variable of the system. The trajectory is parameterized as
where X_{j0} denotes the initial pose of end effector, and λ, T and φ are trajectory parameters, $j=\mathrm{1},\mathrm{\dots},\mathrm{6}$.
By taking the differential of the equation above, the generalized velocity and acceleration of the end effector can be expressed as
where K_{j}(t) can be described as follows:
The boundary conditions of the trajectory planning problem are
where t_{0} and t_{f} represent the initial and final time, respectively; X_{jf} refers to the desired pose of end effector.
By substituting Eq. (4) into Eqs. (1) and (2), the following relationship can be obtained:
where ψ and D_{j} can be described as
According to Eq. (5), polynomial coefficients can be determined with parameters T_{j} and φ_{j}.
Then trajectories of end effector that satisfy the constraints can be obtained with the following parameters vector:
2.2 Joint motion planning for redundant manipulator
The subject of this paper is a nDOF redundant manipulator. Assuming the dimension of task space is m(m≤6), a redundant manipulator satisfies n>m. The joint velocity vector of redundant manipulator is
where x_{e}∈ℝ^{m} indicates the pose of end effector in Cartesian space; q∈ℝ^{n} denotes joint angle vector; $\mathbf{J}\in {\mathbb{R}}^{n\times m}$ represents the Jacobian matrix of manipulator; $\mathbf{I}\in {\mathbb{R}}^{n\times n}$ refer to unit matrix; $\dot{\mathbf{\Phi}}\in {\mathbb{R}}^{n}$ stands for an arbitrary ndimensional vector; $(\mathbf{I}{\mathbf{J}}^{+}\mathbf{J})\in {\mathbb{R}}^{n\times n}$ designates the null space projection matrix; ${\mathbf{J}}^{+}\in {\mathbb{R}}^{n\times m}$ means the generalized inverse of the Jacobian matrix, which is defined by
For redundant manipulators, a specific trajectory of end effector can be obtained by multiple joint trajectories. Hence, the joint trajectory should be selected to ensure that the motion of the manipulator follows specific constraints. Null space (Zghal et al., 1990) term is introduced in this paper to enable the joint motion to satisfy joint limit constraints. The joint limit constraint function is established as
where q_{i} donates the angle of joint i; q_{imax} and q_{imin} represent upper and lower limits of joint i, respectively.
According to the gradient projection method, the joint angle limit constraints are resolved by substituting k∇H(q) for $\dot{\mathbf{\Phi}}$ in Eq. (8) as
where the gradient vector ∇H(q) is given by
∇H(q) reaches minimum value when ${q}_{i}=({q}_{i\mathrm{min}}+{q}_{i\mathrm{max}})/\mathrm{2}$; ∇H(q) approaches to infinity when q_{i}=q_{imin} or q_{i}=q_{imax}.
A collision detection algorithm should be established to achieve obstacle avoidance. A redundant manipulator is explored in this paper. Most of the links are like cuboids or cylinders. Moreover, obstacles are irregular geometric objects. The collision detection between the manipulator and obstacles is extremely complicated. Thus, sphere and cylindrical envelopes are applied in this paper to describe the manipulator links, joints, and obstacles.
3.1 The description of space geometry relation
Considering that obstacles in threedimensional space generally have irregular geometric shapes and various kinds, it is difficult to extract their boundary contours. Thus, regular body envelopment is adopted in this paper to simplify the obstacle model, so as to simplify the complexity of obstacle modeling. For example, the cylindrical envelopment model and sphere envelopment model are employed for slender rod and rounded objects, respectively. This modeling method expands the range of obstacles while guaranteeing the reliability of the collision detection algorithm.
The obstacle uses a sphere envelope, as illustrated in Fig. 1. The radius of the sphere is r_{S}. The cylindrical envelope is used for the links of the manipulator while the sphere envelope and cylindrical envelope are adopted to describe the joint. In this paper, a 7DOF redundant manipulator (Fig. 5) is studied. As exhibited in Fig. 2. The two typical cases are described as follows.

For case I, when axes of adjacent links are vertical, straight connecting links (link i−1 and link i) are enveloped by cylinders whose axes are coplanar. The intersection points P_{i} of cylindrical axes are centers of joint envelope spheres. The radius of the cylinder for the link i is r_{i}; the radius of the sphere for the joint i is ${r}_{i}^{j}\ge \sqrt{{r}_{i}^{\mathrm{2}}+{r}_{i\mathrm{1}}^{\mathrm{2}}}$. Hence, the distance between links and obstacles can be substituted as the distance from a line segment to a point in 3dimensional space.

For case II, when axes of adjacent links are parallel, joint i and link i−1 are enveloped in the same way as case I considering the joint with offset. Hence, ${r}_{i}^{j}\ge \sqrt{{r}_{\mathrm{joint}}^{\mathrm{2}}+{r}_{i\mathrm{1}}^{\mathrm{2}}}$, where r_{joint} indicates the radius of envelope cylinder for joint i. Two cylinders whose axes are coplanar and a sphere whose center is located in the intersection point (P_{i}) of the axes are applied to envelop it.
3.2 Collision detection algorithm
The space geometry (Guan et al., 2015) relations between manipulator's links and obstacle are divided into three classes, as exhibited in Fig. 3. Whether the links and obstacle collide depends on d_{i}, it denotes the minimum distance between the obstacle and manipulator's link/joint. If d_{i}>0, the obstacle is avoided; otherwise, it collides with the manipulator. Therefore, the collision detection problem between cylinder and sphere can be reduced to the calculation of the shortest distance between a point and line segment in 3D space.
Assume the length of link i is L_{i}. Centers of the bottom are P_{i} and P_{i+1}. A vertical line of segment P_{i}P_{i+1} is drawn through P_{0}, and P_{vi} indicates the point of intersection to the cylindrical axis.
Based on the space geometry relation, the collision detection algorithm (Cheng et al., 1993) to achieve obstacle avoidance path planning for redundant manipulators is summarized as follows.
Step 1. Based on forwarding kinematics, the coordinates P_{i} of all nodes and joints are calculated with the current configuration and geometrical sizes of the manipulator.
The relative translation and rotation between link i coordinate and link i−1 coordinate can be described with a homogeneous transformation matrix ${T}_{i\mathrm{1}}^{i}$. The kinematics equation of n degree of freedom manipulators can be expressed as
Step 2. P_{i}P_{vi} is defined as the projection vector of P_{i}P_{0} on P_{i}P_{i+1}, and the scale factor λ is calculated:
The threedimensional coordinates of the perpendicular foot P_{vi} can be obtained with ${P}_{vi}={P}_{i}+\mathit{\lambda}({P}_{i+\mathrm{1}}{P}_{i})$.
Step 3. The minimal distance from the links/joints to the obstacles is calculated. There are three possible positions of perpendicular foot P_{vi} related to P_{i}P_{i+1}:

For class I, P_{vi} is on P_{i}P_{i+1} when $\le \mathit{\lambda}\le \mathrm{1}$.

For class II, P_{vi} is on the reverse extension of P_{i}P_{i+1} when λ<0.

For class III, P_{vi} is on the extension of P_{i}P_{i+1} when λ>1.
Therefore, the minimum distance between P_{0} and P_{i}P_{i+1} is
Step 4. If $min\mathit{\{}{d}_{\mathrm{1}},{d}_{\mathrm{2}},\mathrm{\dots},{d}_{n}\mathit{\}}<\mathrm{0}$, a collision occurs. Then, the collision information is outputted. According to the collision condition, obstacles can be avoided if $min\mathit{\{}{d}_{\mathrm{1}},{d}_{\mathrm{2}},\mathrm{\dots},{d}_{n}\mathit{\}}>\mathrm{0}$.
In this study, minimization of total energy, joint jerks, and avoidance of obstacles are considered together to build a multicriterion cost function. Singularity involved in null space and joint limits is considered a constraint.
4.1 Establishment of objective functions

For a given trajectory of the end effector, the smaller the joint velocity is, the less likely the joint angle mutation occurs. Therefore, the optimization of joint angular velocity has the effect of avoiding singularity. Meanwhile, the null space term is used to constrain the joint limit when solving inverse kinematics. Since the collision detection algorithm is also the kinematic solution of the manipulator in essence, the obstacle avoidance term is taken as a penalty function in this paper to fuse with the joint angular velocity optimization objective. The specific expression is
$$\begin{array}{}\text{(16)}& \mathrm{obt}=\left\{\begin{array}{l}{\mathit{\lambda}}_{\mathrm{1}}\cdot max\left\{{d}_{\mathrm{1}},{d}_{\mathrm{2}},\mathrm{\dots},{d}_{n}\right\},\\ min\mathit{\{}{d}_{\mathrm{1}},{d}_{\mathrm{2}},\mathrm{\dots},{d}_{n}\mathit{\}}>\mathrm{0}\\ {\mathit{\lambda}}_{\mathrm{2}},min\mathit{\{}{d}_{\mathrm{1}},{d}_{\mathrm{2}},\mathrm{\dots},{d}_{n}\mathit{\}}<\mathrm{0}\end{array}\right.,\end{array}$$where obt denotes obstacle avoidance term; λ_{1} and λ_{2} are scale factors.
Combining with Eq. (11), the kinematic optimization term can be expressed as
$$\begin{array}{}\text{(17)}& {f}_{\mathrm{1}}=min{\sum}_{i=\mathrm{1}}^{n}\left(\left{\dot{q}}_{i}\right\right)+\mathrm{obt}.\end{array}$$Due to the scale factors, joint angular velocity is the major term when obstacles are avoided. Besides, the objective function is larger when the links failed to avoid the obstacle. This is convenient for choosing feasible solutions in the process of trajectory optimization.

For redundant manipulators, the frequent changes in the joint jerk would cause a great impact. Reducing the joint jerk can indirectly limit the change rate of joint torque and thus make the movement of the manipulator more stable. This effectively reduces the execution error of the manipulator and resonance caused by the movement and wear on the joint mechanism. The jerk is the third derivative of the joint angle regarding time, and its optimization objective function is
$$\begin{array}{}\text{(18)}& {f}_{\mathrm{2}}=min{\sum}_{i=\mathrm{1}}^{n}\left(\leftq{{}^{\prime \prime \prime}}_{i}\right\right).\end{array}$$ 
Total energy consumption may significantly increase when the manipulator is trying to find an obstacle avoidance trajectory with a small joint jerk. This may result in frequent acceleration and deceleration, which should also be avoided in the manipulator's motion. The optimization objective function is
$$\begin{array}{}\text{(19)}& {f}_{\mathrm{3}}={\sum}_{i=\mathrm{1}}^{n}{\int}_{{t}_{\mathrm{0}}}^{{t}_{\mathrm{f}}}\left[{\dot{q}}_{i}\right(t\left){\mathit{\tau}}_{i}\right(t){]}^{\mathrm{2}}\mathrm{d}t,\end{array}$$where τ_{i} denotes the torque of joint i. Joint torque is calculated by the following dynamics equations (Saramago and Junior, 2000).
$$\begin{array}{}\text{(20)}& \begin{array}{rl}{\mathit{\tau}}_{i}& ={\sum}_{j=\mathrm{1}}^{n}{D}_{ij}\left(q\right){\ddot{q}}_{j}\\ & +{\sum}_{j=\mathrm{1}}^{n}{\sum}_{k=\mathrm{1}}^{n}{C}_{ijk}\left(q\right){\dot{q}}_{j}{\dot{q}}_{k}\\ & +{g}_{i}\left(q\right),i=\mathrm{1},\mathrm{\dots},n,\end{array}\end{array}$$where ${C}_{ijk}=\frac{\partial {D}_{ij}}{\partial {q}_{k}}\frac{\partial {D}_{jk}}{\mathrm{2}\partial {q}_{i}}$; ${\sum}_{j=\mathrm{1}}^{n}{D}_{ij}\left(q\right){\ddot{q}}_{j}$ indicates the acceleration term; D_{ij} represents inertial system matrix. ${\sum}_{j=\mathrm{1}}^{n}{\sum}_{k=\mathrm{1}}^{n}{C}_{ijk}\left(q\right){\dot{q}}_{j}{\dot{q}}_{k}$ stands for quadratic velocity term; C_{ijk} refers to Coriolis and centripetal forces matrix; g_{i}(q) designates a configurationdependent term that depends on the gravity.
4.2 Description of multiobjective trajectory planning problem
The trajectory of the manipulator's end effector is only decided by (T_{j}φ_{j}) according to Eqs. (3) and (5). Different trajectories can be obtained by changing the values of (T_{j}φ_{j}) in the cosine polynomial when initial conditions are given. Hence, T_{j} and φ_{j} are selected as the decision variables in the following optimization. The range of them is defined as the feasible region:
For redundant manipulators, the core of the multiobjective trajectory planning problem is to determine the decision vector ξ that will optimize the following objective vector:
ξ is defined in Eq. (7), which generates the trajectory of the end effector in Cartesian space. The objective vector $\mathit{F}=[{f}_{\mathrm{1}},{f}_{\mathrm{2}},{f}_{\mathrm{3}}{]}^{\mathrm{T}}$ is composed of the objective functions' values.
The constraints in the optimization problem include the initial and final.
During the trajectory planning process, the joint limit constraints are
q_{i}(t) is angle of joint i at time t.
It is difficult to find a global minimum solution for multiobjective optimization problems (MOPs). In MOP (Liu et al., 2015), a vector ξ dominates ${\mathit{\xi}}^{\ast}(\mathit{\xi}\succ {\mathit{\xi}}^{\ast})$ when the following Pareto dominance principle is satisfied.
The solution satisfying Eq. (24) is defined as a nondominated solution of Eq. (22).
Respecting the given multiobjective trajectory optimization problem, the Pareto optimal solution set S is defined as
The mapping of S is a threedimensional surface called Pareto front. Therefore, discovering as many nondominated solutions as possible to cover all features of MOP is the key to solving the proposed trajectory planning problem.
MOPSO algorithm is adopted to solve the multiobjective trajectory optimization problem. This algorithm employs an external repository of particles as guidance to guide the evolution of the whole population toward the Pareto front. Only nondominated solutions can be stored in the repository according to the following process.
The velocity formula of particle's flight consists of not only the position and velocity of the current particle (P[k], V[k]) but also the best position that all the particles ever had in the repository (R[h]):
$\mathit{\chi}=\mathrm{2}/(\mathrm{}\mathrm{2}\mathit{\varphi}\sqrt{\mathit{\varphi}(\mathit{\varphi}\mathrm{4})}\mathrm{})$ represents the constriction factor; $\mathit{\varphi}={C}_{\mathrm{1}}+{C}_{\mathrm{2}}$, where C_{1} and C_{2} refer to the learning factors regulating the step size of the particles flying to P_{best} (the best position a particle has ever explored) and the best position that all the particles ever had, respectively; R_{1} and R_{2} indicate independent random numbers in the range [0,1].
Combining with the trajectory planning algorithm and MOPSO mentioned above, the obstacle avoidance trajectory optimization can be concluded as follows.

The population containing n_{P} particles is initialized, and the range of decision variables is defined as [T_{min},T_{max}] and [φ_{min},φ_{max}]. Decision variables ξ are randomly generated, and the trajectory of the end effector is calculated by Eq. (1).

The joint trajectories are solved according to inverse kinematics, and then the values of three objective functions are obtained following kinematics and dynamics calculation results.

The repository is initialized, and its maximum allowable number is restricted to n_{R}. Next, the positions of particles that represent nondominated decision vectors in the initial population are stored. Then, the best positions that the particles have had are initialized.

While the maximum number of I_{max} has not been reached, evolutionary computations are performed to update and maintain the repository. The velocities of particles are calculated using Eq. (26), and the position of each particle is updated. Besides, particles that failed to avoid the obstacle are eliminated. The reserved solutions are added into the repository according to the process as shown in Fig. 4. The loop counter is incremented until the maximum number is reached.

The nondominated solutions are obtained from the repository. The particles constitute the set of nondominant solution S in this paper.
In this paper, a 7DOF redundant manipulator is adopted to simulate the approached algorithm. The parameters are exhibited in Fig. 5. Mass parameters are provided in Table 1.
The initial configuration of the manipulator is ${\mathit{q}}_{\mathrm{ini}}=[\mathrm{0},\mathrm{0},\mathrm{0},\mathrm{0},\mathrm{0},\mathrm{0},\mathrm{0}{}^{\circ}]$. The corresponding pose of the end effector is ${\mathit{X}}_{\mathrm{ini}}=[\mathrm{0.5},\mathrm{0.2},\mathrm{4.6}\phantom{\rule{0.125em}{0ex}}\mathrm{m},\mathrm{0},\mathrm{0},\mathrm{0}{}^{\circ}]$. The desired pose of the end effector is ${\mathit{X}}_{\mathrm{des}}=[\mathrm{1.50},\mathrm{1.20},\mathrm{3.60}\phantom{\rule{0.125em}{0ex}}\mathrm{m},\mathrm{78},\mathrm{73},\mathrm{90}{}^{\circ}]$. The total time of motion is t_{f}=40 s. The upper and lower limits of joint $i(i=\mathrm{1},\mathrm{2},\mathrm{\dots},\mathrm{7})$ are ${q}_{i\mathrm{min}}=\mathrm{100}$ and ${q}_{i\mathrm{max}}=\mathrm{100}{}^{\circ}$, respectively. The radius of link i is r_{i}=0.1 m. The radius of joint envelope sphere is ${r}_{i}^{j}=\mathrm{0.1}$ m. The obstacle is a sphere whose radius is r_{S}=0.2 m. The center of the obstacle is located in ${\mathit{Z}}_{\mathrm{0}}=[\mathrm{0.5},\mathrm{0.3},\mathrm{1.25}\phantom{\rule{0.125em}{0ex}}\mathrm{m}]$. Scale factors in Eq. (16) are λ_{1}=0.01 and λ_{2}=10. The parameters of MOPSO are set as $[{\mathit{\lambda}}_{min\mathrm{1}}^{\prime},{\mathit{\lambda}}_{max\mathrm{1}}^{\prime}]=[+\mathrm{10}\times {\mathrm{10}}^{\mathrm{2}},+\mathrm{10}\times {\mathrm{10}}^{\mathrm{3}}]$, $[{\mathit{\lambda}}_{min\mathrm{2}}^{\prime},{\mathit{\lambda}}_{max\mathrm{2}}^{\prime}]=[\mathit{\pi},+\mathit{\pi}]$, n_{P}=1000; n_{R}=1500; ${C}_{\mathrm{1}}={C}_{\mathrm{2}}=\mathrm{2.05}$.
Figure 6 illustrates the minimum value of three objective functions during the iteration, which demonstrates the excellent astringency and stability of the proposed algorithm. The Pareto front is exhibited in Fig. 7. The particles are divided into two categories owing to the penalty function. Red particles satisfy the obstacle avoidance constraint while blue ones do not. Although the screening process can be executed to remove all blue solutions in each iteration, they are reserved to demonstrate the effectiveness of trajectory optimization for obstacle avoidance in this paper. According to the obstacle avoidance constraint, all the remaining nondominant solutions successfully avoid the obstacle after the particles that fail to avoid the obstacle are removed. This reflects that the proposed algorithm has a good performance in obstacle avoidance.
The first objective function is merely adopted to avoid singularity and obstacles. It will not affect the other physical performance of the redundant manipulator. Therefore, only f_{2} and f_{3} are considered in the solution selection. The extreme values of cost functions are ${f}_{\mathrm{2}}^{\mathrm{min}}=\mathrm{0.06}\mathit{\%}{f}_{\mathrm{2}}^{\mathrm{max}}$ and ${f}_{\mathrm{3}}^{\mathrm{min}}=\mathrm{13.41}\mathit{\%}{f}_{\mathrm{3}}^{\mathrm{max}}$, the specific values are ${f}_{\mathrm{2}}^{\mathrm{min}}=\mathrm{0.05}\phantom{\rule{0.125em}{0ex}}$, ${f}_{\mathrm{2}}^{\mathrm{max}}=\mathrm{76.22}$, ${f}_{\mathrm{3}}^{\mathrm{min}}=\mathrm{2.79}\times {\mathrm{10}}^{\mathrm{4}}$ and ${f}_{\mathrm{3}}^{\mathrm{max}}=\mathrm{2.08}\times {\mathrm{10}}^{\mathrm{5}}$. The jerks and energy costs corresponding to different end trajectories significantly vary, verifying the necessity of trajectory optimization.
Given no optimal solution to the multiobjective optimization problem, all the solutions are nondominant. In this paper, the nondominant solutions corresponding to the minimum values of f_{2} and f_{3} are selected for comparative analysis. It is assumed that the nondominant solutions are S_{2} and S_{3}. The decision vectors and objective vectors of S_{2} and S_{3} are presented in Table 2.
The minimum distances d_{i} between the center of obstacles and the manipulator's links are illustrated in Fig. 8. The minimum distances for S_{2} and S_{3} are 0.0597 and 0.0014 m, respectively. The trajectory obtained in S_{2} and S_{3} successfully avoided the obstacle. The configuration change of the manipulator and its geometric relationship with the obstacle are displayed in Fig. 9. The position and orientation change in the end effector are shown in Fig. 10. The manipulator reached the desired pose with different changing processes.
The change in joint angular over time is exhibited in Fig. 11. Since the joint angular velocity is one of the optimization objectives, no mutation of joint angle occurs. The change in joint angle is smooth. Moreover, the variation range of joint angle is also inhibited with the suppression of joint angular velocity. For solution S_{3}, the joint angle of link i is still suppressed due to the nullspace term, though it approaches the limitation at 24 s. Figure 12 provides the change in joint angular velocities. For S_{3}, the joint angular velocity changes abruptly when the joint angle approaches the joint limit, forcing the joint angle of the manipulator to return to the range of the joint limit. This also validates the effectiveness of the nullspace term as the joint angle constraint in this paper. The shaking process endured for 2 s and finally stabilized. Besides, lower energy cost always demands higher joint jerk, according to Fig. 7. It takes more energy to achieve a smooth angular velocity change, which reduces the impact on the joint mechanisms for redundant manipulators.
In this paper, a method of obstacle avoidance trajectory planning based on a multiobjective optimization algorithm in Cartesian space is proposed to avoid obstacles during the redundant manipulator's motion. On the premise that the end effector reaches the desired position and orientation at a specific time, obstacle avoidance can be achieved successfully, and joint jerk and energy consumption can also be inhibited. The results are described as follows.

The cosine polynomial function was employed to realize the task requirements of the end effector reaching the desired pose at a specific time. Then, the inverse kinematics and null space inverse solution were introduced to meet the joint angle limit constraint.

The multinomial weighted objective function is established in a combination of joint velocity and obstacle avoidance function. By optimizing the proposed function, the manipulator avoids not only the obstacle, but also the joint singularity.

Multiobjective particle swarm optimization was performed to optimize joint jerk and energy consumption simultaneously. The clear physical meaning of the objective functions is beneficial for the selection of nondominant solutions.
The trajectory optimization method proposed in this paper possesses the strong flexibility and diversity. Obstacle avoidance trajectories can be obtained by inputting the initial and expected pose of the end effector. Several nondominant solutions can be provided for selection. Therefore, this method has an acceptable prospect in engineering applications. However, the collision detection in this paper was implemented based on static obstacles, with all known environment variables. Thus, how to realize dynamic obstacle avoidance in an unknown environment needs to be investigated in the future.
The data are available upon request from the corresponding author.
YL, XL, PJ, and ZD planned the campaign; PJ, ZD, BS, and ZW wrote code and performed the simulations; XL, XH, YL, and ZW analyzed the data; XL, BS, XH, and PJ wrote the manuscript draft; YL, XL, ZW, and ZD reviewed and edited the manuscript.
The contact author has declared that neither they nor their coauthors have any competing interests.
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This research has been supported by the National Natural Science Foundation of China (grant no. 52175013) and the Fundamental Research Funds for the Central Universities (grant no. JZ2020HGTB0034).
This paper was edited by Zi Bin and reviewed by three anonymous referees.
Arakelian, V., Baron, J.P. L., and Mottu, P.: Torque minimisation of the 2DOF serial manipulators based on minimum energy consideration and optimum mass redistribution, Mechatronics, 21, 310–314, https://doi.org/10.1016/j.mechatronics.2010.11.009, 2011.
Bourbonnais, F., Bigras, P., and Bonev, I. A.: MinimumTime Trajectory Planning and Control of a PickandPlace FiveBar Parallel Robot, IEEE/ASME T. Mech., 20, 740–749, https://doi.org/10.1109/TMECH.2014.2318999, 2015.
Cao, H., Sun, S., Zhang, K., and Tang, Z.: Visualized trajectory planning of flexible redundant robotic arm using a novel hybrid algorithm, Optik, 127, 9974–9983, https://doi.org/10.1016/j.ijleo.2016.07.078, 2016.
Chen, D. and Zhang, Y.: A Hybrid MultiObjective Scheme Applied to Redundant Robot Manipulators, IEEE T. Autom. Sci. Eng., 14, 1337–1350, https://doi.org/10.1109/TASE.2015.2474157, 2017.
Cheng, F. T., Chen, T. H., Wang, Y. S., and Sun, Y. Y.: Obstacle avoidance for redundant manipulators using the compact QP method, Proceedings IEEE International Conference on Robotics and Automation (Cat. No. 93CH32474), Atlanta, GA, USA, 2–6 May 1993, 263, 262–269, https://doi.org/10.1109/ROBOT.1993.292186, 1993.
Coello Coello, C. A. and Lechuga, M. S.: MOPSO: a proposal for multiple objective particle swarm optimization, Proceedings of the 2002 Congress on Evolutionary Computation, CEC'02 (Cat. No. 02TH8600), Honolulu, HI, USA, 12–17 May 2002, 1052, 1051–1056, https://doi.org/10.1109/CEC.2002.1004388, 2002.
Dalla, V. K. and Pathak, P. M.: Curveconstrained collisionfree trajectory control of hyperredundant planar space robot, P. I. Mech. Eng. IJ. Sys., 231, 282–298, https://doi.org/10.1177/0959651817698350, 2017.
Guan, W., Weng, Z. X., and Zhang, J.: Obstacle avoidance path planning for manipulator based on variablestep artificial potential method, 27th Chinese Control and Decision Conference (CCDC), Qingdao, China, 23–25 May 2015, 4325–4329, https://doi.org/10.1109/CCDC.2015.7162690, 2015.
Guigue, A., Ahmadi, M., Langlois, R., and Hayes, M. J. D.: Pareto Optimality and Multiobjective Trajectory Planning for a 7DOF Redundant Manipulator, IEEE T. Robot., 26, 1094–1099, https://doi.org/10.1109/TRO.2010.2068650, 2010.
Han, T., Wu, H.Y., Du, Z.J., and Zheng, X.J.: Research on path planning for manipulator to avoid realtime obstacle based on genetic algorithms, Appl. Res. Comput., 30, 1373–1376, https://doi.org/10.3969/j.issn.10013695.2013.05.023, 2013.
Kucuk, S.: Optimal trajectory generation algorithm for serial and parallel manipulators, Robot. Cim.Int. Manuf., 48, 219–232, https://doi.org/10.1016/j.rcim.2017.04.006, 2017.
Lin, H.I.: A Fast and Unified Method to Find a MinimumJerk Robot Joint Trajectory Using Particle Swarm Optimization, J. Intell. Robot. Syst., 75, 379–392, https://doi.org/10.1007/s1084601399828, 2014.
Liu, Y. and Zhang, X.: Trajectory optimization for manipulators based on external archives selfsearching multiobjective particle swarm optimization, P. I. Mech. Eng. CJ. Mec., 0954406221997486, https://doi.org/10.1177/0954406221997486, 2021.
Liu, Y., Jia, Q., Chen, G., Sun, H., and Peng, J.: MultiObjective Trajectory Planning of FFSM Carrying a Heavy Payload, Int. J. Adv. Robot. Syst., 12, 118 pp., https://doi.org/10.5772/61235, 2015.
Ma, Y. and Liang, Y.: An Obstacle Avoidance Algorithm for Manipulators Based on SixOrder Polynomial Trajectory Planning, Journal of Northwestern Polytechnical University, 38, 392–400, https://doi.org/10.3969/j.issn.10002758.2020.02.021, 2020.
Marcos, M. D. G., Tenreiro Machado, J. A., and AzevedoPerdicoúlis, T. P.: A multiobjective approach for the motion planning of redundant manipulators, Appl. Soft. Comput., 12, 589–599, https://doi.org/10.1016/j.asoc.2011.11.006, 2012.
Park, S.O., Lee, M. C., and Kim, J.: Trajectory Planning with Collision Avoidance for Redundant Robots Using Jacobian and Artificial Potential Fieldbased Realtime Inverse Kinematics, Int. J. Control Autom., 18, 2095–2107, https://doi.org/10.1007/s1255501900767, 2020.
Safeea, M., Bearee, R., and Neto, P.: Collision Avoidance of Redundant Robotic Manipulators Using Newton's Method, J. Intell. Robot. Syst., 99, 673–681, https://doi.org/10.1007/s10846020011593, 2020.
Salaris, P., Fontanelli, D., Pallottino, L., and Bicchi, A.: Shortest Paths for a Robot With Nonholonomic and FieldofView Constraints, IEEE T. Robot., 26, 269–281, https://doi.org/10.1109/TRO.2009.2039379, 2010.
Saramago, S. F. P. and Junior, V. S.: Optimal trajectory planning of robot manipulators in the presence of moving obstacles, Mech. Mach. Theory, 35, 1079–1094, https://doi.org/10.1016/S0094114X(99)000622, 2000.
Saravanan, R., Ramabalan, S., and Balamurugan, C.: Evolutionary collisionfree optimal trajectory planning for intelligent robots, Int. J. Adv. Manuf. Tech., 36, 1234–1251, https://doi.org/10.1007/s001700070935x, 2008.
Shen, H., Wu, H., Chen, B., Ding, L., and Yang, X.: Obstacle Avoidance Algorithm for Redundant Robots Based on Transition between the Primary and Secondary Tasks, Robot, 36, 425–429, https://doi.org/10.13973/j.cnki.robot.2014.0425, 2014.
Shi, H., Chen, J., Pan, W., Hwang, K., and Cho, Y.: Collision Avoidance for Redundant Robots in PositionBased Visual Servoing, IEEE Syst. J., 13, 3479–3489, https://doi.org/10.1109/JSYST.2018.2865503, 2019.
Wang, W. R., Zhu, M. C., Wang, X. M., He, S., He, J. P., and Xu, Z. B.: An improved artificial potential field method of trajectory planning and obstacle avoidance for redundant manipulators, Int. J. Adv. Robot. Syst., 15, 1729881418799562, https://doi.org/10.1177/1729881418799562, 2018.
Yan, L., Xu, W., Hu, Z., and Liang, B.: Multiobjective configuration optimization for coordinated capture of dualarm space robot, Acta Astronaut., 167, 189–200, https://doi.org/10.1016/j.actaastro.2019.11.002, 2020.
Zghal, H., Dubey, R. V., and Euler, J. A.: Efficient gradient projection optimization for manipulators with multiple degrees of redundancy, P. IEEE Int. C. Robot. Auto., Cincinnati, OH, USA, 13–18 May 1990, 1002, 1006–1011, https://doi.org/10.1109/ROBOT.1990.126123, 1990.
Zhang, Z., Chen, S., Zhu, X., and Yan, Z.: Two Hybrid EndEffector PostureMaintaining and ObstacleLimits Avoidance Schemes for Redundant Robot Manipulators, IEEE T. Ind. Inform., 16, 754–763, https://doi.org/10.1109/TII.2019.2922694, 2020.
 Abstract
 Introduction
 Trajectory planning of redundant manipulator
 Collision detection algorithm
 Description of multiobjective trajectory planning problem
 Trajectory planning based on multiobjective optimization
 Simulation results and analysis
 Conclusions
 Data availability
 Author contributions
 Competing interests
 Disclaimer
 Financial support
 Review statement
 References
 Abstract
 Introduction
 Trajectory planning of redundant manipulator
 Collision detection algorithm
 Description of multiobjective trajectory planning problem
 Trajectory planning based on multiobjective optimization
 Simulation results and analysis
 Conclusions
 Data availability
 Author contributions
 Competing interests
 Disclaimer
 Financial support
 Review statement
 References