1: CYCLE WHILE 1

2: Determination of new required vector xd ∈Rm from the matrix of planned path P∈Rr�<sup>2</sup>

3: CYCLE WHILE 2

4: Computation of Jacobian matrix J (damped least squares method)

5: Determination of actual end-effector position in the task space x∈Rm with actual generalized variables q∈ Rn

6: Computation of general equation q\_ ¼ J �1 WJ þ Jc �1 WcJc þ Jl �1 WlJl þ Ws �<sup>1</sup> J TWx\_ 7: q ¼ qprevious þ qdt \_ 8: qprevious ¼ q 9: IF xd ¼ x THEN END CYCLE WHILE 2 ELSE CYCLE WHILE 2 continues END IF 10: END CYCLE WHILE 2 11: END CYCLE WHILE 1

**Figure 11.** *Simulation of 20-link manipulator in free environment.*

**Figure 12.** *Simulation of 20-link manipulator in constrained environment.*

#### *Kinematics of Serial Manipulators DOI: http://dx.doi.org/10.5772/intechopen.93138*

In **Figure 11** can be seen the simulation of motion of a 20-link manipulator, which moves in free environment without any obstacles. This case also does not consider any joint limit avoidance task. The aim is to move the end-effector of manipulator by predefined path (green color).

**Figure 12** depicts a different situation. A 20-link manipulator moves according to predefined path between four obstacles. The solver also assumes joint limit avoidance task for all 20 joints. From this figure can be seen the difference in "selfmotion" in joint space, while it does not affect the motion of end-effector in task space. The end-effector always tracks the same path (by neglecting end-effector orientation).

The second case is significantly difficult from the view of computational complexity in comparison with the case without any constraints in motion.
