A Novel Collision-Free Homotopy Path Planning for Planar Robotic Arms

Achieving the smart motion of any autonomous or semi-autonomous robot requires an efficient algorithm to determine a feasible collision-free path. In this paper, a novel collision-free path homotopy-based path-planning algorithm applied to planar robotic arms is presented. The algorithm utilizes homotopy continuation methods (HCMs) to solve the non-linear algebraic equations system (NAES) that models the robot’s workspace. The method was validated with three case studies with robotic arms in different configurations. For the first case, a robot arm with three links must enter a narrow corridor with two obstacles. For the second case, a six-link robot arm with a gripper is required to take an object inside a narrow corridor with two obstacles. For the third case, a twenty-link arm must take an object inside a maze-like environment. These case studies validated, by simulation, the versatility and capacity of the proposed path-planning algorithm. The results show that the CPU time is dozens of milliseconds with a memory consumption less than 4.5 kB for the first two cases. For the third case, the CPU time is around 2.7 s and the memory consumption around 18 kB. Finally, the method’s performance was further validated using the industrial robot arm CRS CataLyst-5 by Thermo Electron.


Introduction
Significant advances have been made in robotics with more powerful and versatile robots being developed. Currently, robots exhibit enhanced capabilities for performing autonomous and semi-autonomous tasks with a high degree of human interaction. Their applications have been expanded from the traditional ones used in industry and research environments to areas such as clinical surgery and rehabilitation therapy [1][2][3]. Moreover, the robotics field offer support functions such as automated navigation, warehouse management, and household management [2,[4][5][6][7][8][9].
The design of robotic arms has been part of the robotics evolution by incorporating not only new materials and mechanical structures, but also novel application-specific models. An example of this evolution is hyper-redundant robots; these have a mechanical structure capable of deforming continuously according to their degrees of freedom (DoF) to adapt to disorderly (unstructured) environments [10,11]; these robots resemble living organisms or their parts, such as snakes or elephant trunks; they are denoted as continuous manipulators and are widely applied in the medical area (for minimal invasive surgeries), for in-orbit servicing, grasping, and locomotion in unstructured environments [5,12,13]. However, working with this type of robot implies solving complex and computationally costly inverse kinematics and real-time collision-free path planning problems [10,11,14].
To perform its main task, every robot executes a sequence of movements. This action must be achieved safely, i.e., without colliding with any obstacle in the workspace. Commonly, this task is performed by a planning algorithm responsible for determining a collision-free path that allows the motion of the robot from an initial to a final configuration without colliding with any obstacle. Since obstacles may be static or moving, the algorithm may be recast as an off-line or on-line planner. On-line planning strategies generate the path to the goal during the movement, while off-line planners obtain the path to the goal before the movement begins [15]. Figure 1 shows the stages required for autonomous or semi-autonomous movement in robots [16]. The proposed work contributes to the advancement of collision-free path computations, represented in the blue block.  In the last few decades, several algorithm have been used to determine collision-free paths, and some of the most common are as follows: (a) sampling-based planning algorithms such as rapidly random trees (RRT) [16], probabilistic roadmap (PRM) [1,17], and the variants of each of them [16]; (b) graph-based algorithms such as visibility graph [18] and A* [19]; (c) heuristic-based algorithms such as ant colony [20] and genetic-based [3]; (d) deterministic-based methods, which include artificial potential fields (APFs) [21] and the homotopy-based path-planning method (HPPM) [22][23][24]. These algorithms and methods have been applied in mobile terrestrial robots, UAVs, car-like vehicles, and robotic manipulators [1,16,17,20,23,[25][26][27][28]. However, these algorithms and methods still have several drawbacks such as falling into local minima, high computational cost, or long times to obtain a solution path, and some of these do not guarantee a solution path. Some algorithms present difficulties working in complex environments with narrow corridors, a high number of obstacles, or a high number of DoFs. Other path-planning algorithms need a post-processing stage to smooth out the obtained path for implementation in a real robot [16,23,29,30].
Path planning for planar robots is an interesting topic in robotics due to its principle of operation. It is at the root of multi-joint serial manipulator's path planning because many industrial robots operate with this configuration, such as the SCARA robots. Recently, some works have focused on strategies to handle collision-free path planning. In [31], a path-planning method based on an obstacle-free workspace was proposed for collision-free movements of multi-joint serial manipulators. The method presented in this work uses Monte Carlo and rapidly exploring random tree (RRT), which has advantages in solving the planning problem of a three-joint planar robot arm with only one circular obstacle. Amit Jena et al. proposed in [32] an optimal planning technique using geodesics to achieve an accurate, as well as smooth trajectory for industrial robot manipulators. In this work, the authors validated its technique with a real SCARA robot; however, the workspace in the case study was obstacle-free. In [33], an optimum trajectory planning for a planar redundant manipulator was presented by minimizing the power consumption when its end-effector was commanded to move in its prescribed path. In this work, a model of the three-joint planar arm was used to validate the effectiveness of the methodology. The case studies in this work show the advantages of the planner to minimize the power consumption; however, only one polygonal obstacle is embedded in the workspace. Finally, a method for trajectory planning and control of planar robots with a passive rotational last joint was presented in [34]. This work validated the method for trajectory planning and control problems for the class of n-link planar robots with a passive rotational last joint. The case studies presented in this work were focused on showing the advantages of this method for trajectory planning and control; however, the presence of obstacles in the environment was not considered.
In this work, the operation principle of the path planning homotopic method (HPPM) is modified to deal with the planar robotic arm's constraints. Originally, the homotopy of continuation was formulated with the aim of solving non-linear systems of equations with multiple solutions. These systems are common in all areas that involve non-linear modeling of systems, such as physics, chemistry, electronics, robotics, fluid mechanics, etc. [23,24,[35][36][37][38][39]. Although homotopy has proven to be a very useful tool to find a solution in non-linear systems, recently, its application has focused on solving inverse kinematics calculations in parallel manipulators [35,40], in the calculation of path planning in mobile robots [23,24], and path planning based on the homotopy class with restrictions [41].
In this work, the novel use of the homotopic continuation method for collision-free path planning for planar robotic arms is presented. This involves the modeling of the planar robotic arm and the obstacles in the homotopic formulation to generate the collision-free path. The obtained path is expressed as a sequence of movements for the robotic to move from position A to position B while avoiding obstacles. The paper is organized as follows. Section 2 presents the homotopy-based path planning formulation. The proposed method applied to planar robotic arms with obstacles is presented in Sections 3 and 4. Three case studies show the performance of the proposed method in Section 5. Section 6 presents a scenario where the proposed method is validated in an industrial robotic arm. Finally, Section 7 presents conclusions and future work.

Path Planning Using Homotopy-Based Formulations
The homotopy-based path-planning method (HPPM) assumes that the environment constrainsthe robot, and the obstacles present are mathematically modeled and contained in a non-linear algebraic equations system (NAES) represented by (1).
The use of a homotopy continuation method (HCM) modifies the NAES by introducing an additional parameter known as the homotopy parameter λ, yielding a set of homotopy formulas, expressed by (2).
where X 0 is the initial point. The formulation in (5) is known as Newton's homotopy, and it has been used to determine a collision-free path, namely the homotopy path-planning method (HPPM) [22,23]. The HPPM models the robot and the obstacles in the workspace as a set of nonlinear algebraic equations. Singularities are created for obstacles so that they can be avoided [22,24]. This yields a system of non-linear equations that is solved by the HCM. The solution curve of H(F(X), λ), is used as the path that the robot will travel from the initial position to the final. An enhanced version of the HPPM (EHPPM) allows better control over the repulsion effect that is caused by the singularities placed in the workspace [22][23][24].
The HPPM has been successfully applied to mobile robots [23,24]. Figure 2 shows the application of the EHPPM to generate a collision-free path for a mobile robot, showing a workspace with a mobile robot and 11 circular obstacles. The initial position of the robot is at (x 0 , y 0 ) (red point), and the goal is at (a, b) (blue point), while the path to be followed by the robot is shown in blue. The EHPPM uses the auxiliary Equations (6) and (7) to find the solution.
where D 1 and D 2 are straight lines that intersect at the goal (gray lines in Figure 2), m 1 and m 2 are the values of their slopes, and (a, b) represents the ordered pair of the point at the intersection of the straight lines [22][23][24]. The EHPPM models the workspace with Equations (8) and (9): where W(x, y) represents the singularities that model the obstacles in the workspace and Q = W(a, b) removes the effect of singularities at the goal point (a, b) of the workspace [22][23][24]. When applying Newton's homotopy (5), the system of homotopic equations is (10).
where (x 0 , y 0 ) is the start point. The EHPPM can model the obstacles by two separate sets, namely a set of circles (circular obstacles) and another set of ellipsoidal approximations (ellipsoidal obstacles) [22][23][24]. As a result, W(x, y) can be represented by Equation (11).
where W C (x, y) represents the set of circular obstacles and W R (x, y) represents the set of ellipsoidal obstacles. On the one hand, the set of circular obstacles is defined by Equation (12).
where PC i is the repulsion parameter of each obstacle, k is the number of circular obstacles present in the workspace, and C i (x, y) represents a circular obstacle, modeled by Equation (13).
where (x i , y i ) is the center and rc i is the radius of the i-th circle.
On the other hand, the set of ellipsoidal obstacles is modeled by Equation (14).
where PR j is the repulsion parameter of each ellipsoidal obstacle, d is the number of ellipsoidal obstacles present in the workspace, and R j (x, y) represents the ellipsoidal obstacle modeled by the equation of an ellipse expressed in (15).
where (x j , y j ) is the center of the j-th ellipsoidal obstacle, α j and β j define the width and length, and η is an integer and defines the sharp of the vertex (in this work, η = 2).

Spherical-Path-Tracking Algorithm
The EHPPM uses the spherical tracking algorithm to follow the homotopy path at all times and avoids falling into discontinuities or closed curves [22][23][24]42]. This algorithm creates a hypersphere S of n dimensions, where the number of dimensions corresponds to the number of generated homotopic equations. The hypersphere S i has a radius r s with center O i located on the homotopic curve γ. The circumference of the sphere touches at least two points (O i−1 , O i+1 ) on the curve γ, as depicted in Figure 3.
Equation (16) describes the hypersphere for two homotopy functions.
where (c x , c y , c λ ) is the center and r s is the radius of the hypersphere at each step of the spherical tracking.
Representation of a hypersphere on the homotopic curve γ.

Predictor-Corrector Algorithm
The spherical path tracking of trajectories is complemented by the predictor-corrector algorithm, which helps follow the homotopic path without falling into discontinuities [22][23][24]42]. The predictor algorithm is used to generate the next point close to the homotopic trajectory γ such that the intersection between the hypersphere and the y curve is achieved; in this work, the corrector was implemented with Broyden's method [24,43], and the intersection between the hypersphere and the γ curve is achieved. Figure 4 shows the predictorcorrector algorithm where (x i , y i , λ i ) is the center of the hypersphere S i and r s represents the radius of the hypersphere. The predictor is the point (x j , y j , λ j ) = (x p , y p , λ p ), and it is used as the starting point for the corrector, finding the intersection of the hypersphere with the curve γ at j = 4. Now, the next center of the hypersphere is at (x j+1 , y j+1 , λ j+1 ).  This algorithm repeats and updates the center of each hypersphere until it reaches γ = 1. In this work, two predictive methods were implemented: Euler's predictor [23,24] and the vector predictor [42]. To start the homotopic path, Euler's predictor is used (only two hyperspheres), then the vector predictor is the one that continues with the path until reaching λ = 1; this is due to two reasons: by its formulation, the vector predictor always advances on the curve γ, and it requires a lower computational cost than Euler's predictor.

Proposed Scheme for Path Planning of Planar Arms
In this paper, a modified HPPM [22] is presented to obtain a collision-free path for planar robot arms. The proposal leaves aside the holonomic punctual robot and presents a novel scheme that has the ability to model redundant and hyper-redundant rigid planar robotic arms, with or without grippers, providing them with rigidity and orientation, and through the formulation of singular projections implemented, it guarantees the avoidance of obstacles. The proposed method is named the homotopy path-planning method for planar robotic arms (HPPM-PRA).
The inputs of the HPPM-PRA are the initial and final configuration of the planar robotic arm and the obstacle's position and size. The planar robotic arm configuration is described in terms of the angles of the links, as shown in Figure 5. The HPPM-PRA works on the configuration space (C-space), and in the proposed method, it is shown with the angles w of the bonds; therefore, the algebraic equations are described using w-angles, as well as the obstacles. To describe the obstacles in the C-space, it is proposed to project the obstacles from the Euclidean space (x, y) to the Cspace, by creating singularities just in the points where the links touch the perimeter of the obstacles. Therefore, the homotopy path avoids obstacles in the C-space.
Based on Figure 5, the formulas that determine the position of a two-link planar robot arm anchored to the point of origin (0, 0) are described by (18).
where L 1 and L 2 represent the length of the links and the angles w 1 and w 2 represent the position of links Es 1 and Es 2 . This process can be repeated for each link in the case of more than two links. In order to avoid obstacles, each link has to be divided into n singular points. These singular points exhibit a projection over the perimeter of each of the obstacles. Figure 6 shows an example of a workspace with a two-link robot arm (Es 1 , Es 2 ) and two circular obstacles (C 1 , C 2 ). The link Es 2 is divided into n singular points. Then, each singular point of Es 2 is represented by (19).
where q k helps calculate the position of each singular k-th point in the Euclidean space and represents the link's segments, as represented by Equation (20).
where k is the k-th segment and n is the number of segments. The formulation for circular obstacles C i (w) and ellipsoidal obstacles R j (w) is expressed in (21) and (22).
where C i is the i-th circular obstacle, R j represents the j-th ellipsoidal obstacle, c is the number of circular obstacles, and d is the number of ellipsoidal obstacles in the workspace. The coordinates of each singular point in each link are represented by (x k , y k ), while (x i , y i ) is the center of circular obstacle (C i (w 1 , w 2 )) and (x j , y j ) is the center of ellipsoidal obstacle (R j (w 1 , w 2 )). r i is the radius of each circular obstacle, and α j and β j are the base and height of the j-th ellipsoidal obstacle. To create rigid obstacles, n-singular points were used for each link by considering the size of the smallest obstacle in the workspace as a reference to set n. The formulation that represents the singularities created by the singular projections involving all the links is given by (23).
where P Ci represents the repulsion parameter of each circular obstacle, P Rj represents the repulsion parameter of each ellipsoidal obstacle, c represents the number of circular obstacles, d represents the number of ellipsoidal obstacles, v the number of links, and n the number of singular points of each link. The HPPM-PRA uses a system of auxiliary equations to set the final position of the robotic arm given by (24).
Here, v is the number of links in the robot arm and a is a set of arbitrary constants. By evaluating (24) at the goal position (w goal 1 , . . . , w goal v ) and selecting a 0,k to set each linear equation to zero, the system of equations for a planar robot arm becomes: where Q is a constant to guarantee that the solution of (25) is (w goal 1 , . . . , w goal v ). It is important to note that the equation l v was chosen to add the term W − Q; nonetheless, it is feasible to select another equation of (25).
where (w start 1 , . . . , w start v ) represents mathematically the starting point for the homotopy path and, physically, the initial position of the robotic arm. Equation (27) is proposed to implement the hyperspherical path-tracking algorithm that was stated in (16).
where (c 1 , c 2 , · · · , c v+1 ) is the center of the hypersphere and r s is the radius of the hypersphere. It is important to highlight that the first hypersphere's center (c 1 , c 2 , · · · , c v ) is equal to the starting point (w start 1 , . . . , w start v ) of the homotopy at λ = c v+1 = 0. However, it is also feasible to use a variable-radius scheme.
The system of equations to be solved for each step of the path-tracking algorithm is given in (28).
where the center of the hypersphere S i is updated at every i-th step of the path tracking, as explained in Section 2.2.

Workspace and C-Space
This section explains how to transform from the workspace to C-space and the relation to obstacles and the homotopic path computation process. On the one hand, the workspace is the graphical representation of the number and length of links, the initial and final position of the robotic arm (start, goal), and the number, position, and shape of obstacles in the real world. On the other hand, the C-space maps the allowed and forbidden configurations that the robot can perform without collisions in the workspace. The configurations are modeled in a space with as many dimensions as degrees of freedom the robot has. Figure 7a shows the workspace with a two-link planar robotic arm. The initial (start) and final (goal) positions of the robotic arm are represented by the solid red line and the blue asterisks, respectively. Figure 7b shows the C-space in terms of the angles w 1 and w 2 of the links.
The solid red dot marks the starting point (start), and the intersection of the auxiliary lines denotes the endpoint (goal) of the homotopic path (blue diamond). It can be noted that the circular obstacle in the Euclidean space is transformed into an elongated amorphous shape in the C-space, and this is due to the singular projections that exist between the link of the robotic arm and the obstacle; this shape was obtained by plotting (23) using the Maple 18 "implicitplot" command. It should be mentioned that for more than three dimensions, it is not easy to visualize the C-space.

HPPM-PRA Procedure Steps
The HPPM-PRA is a straightforward procedure that is easy to implement. This requires some basic steps:

1.
Capturing of the workspace. In this step, a camera or system to capture the environment is used to generate the geometrical representation of the robot's workspace. This procedure requires an image-processing algorithm; however, this is not a topic of this work; thus, the workspace is considered known a priori. Then, for this work, only circular obstacles (21) and ellipsoidal obstacles (22) are considered to represent the workspace in the case studies of Section 5.

2.
Setting the robot parameters. The number and length of the links and the start and end configurations are given to the HPPM-PRA.

3.
Repulsion parameter assignation. Assign the repulsion parameter to each obstacle of the workspace.

4.
Model workspace obstacles in the C-space. The singular projections (W) that represent the forbidden configurations (obstacle collision space) are employed to establish the Q value using (23).

5.
Generate the auxiliary equations. These are used to set the final configuration of the robotic arm. 6.
Generate non-linear equation system. This represents the entire problem and contains the characteristics of the robot and the workspace. 7.
Homotopy continuation formulation (Equation (26)). In this step, the original system of non-linear equations of the previous step is converted to a homotopic system. 8.
Hyperspherical tracking. The hyperspherical tracking algorithm is employed to calculate each point of the solution path. 9.
Robotic arm executing. Finally, the obtained homotopic path is followed by the robotic arm.  Algorithms 1-5 describe the stages that model the proposed method. Algorithm 1 describes the general procedure of the HPPM-PRA. This procedure requires the workspace configuration as the input and uses four algorithms that build the homotopy system (H). The homotopy system is solved by using the spherical path-tracking algorithm to generate the path for the planar robotic arm.
The function of Algorithm 2 is to transform the workspace to the C-space, and the information obtained (w start , w goal , a 0 ) is used by the following algorithms.
Algorithm 3 is responsible for obtaining the value of Q from the evaluation of the circular and ellipsoidal obstacles in the final position (w g oal). Furthermore, this algorithm is used in each step of the hyperspherical procedure to obtain the value of W.
Algorithm 4 builds, based on the auxiliary equations (l k (w 1 , . . . , w v )), the system of non-linear equations ( f 1 , . . . , f v ), which Algorithm 5 uses to generate the homotopic system (H). if (iteration < 2) then 10: Euler's predictor (H S ) Euler's predictor is used 11: else 12: Vector predictor (H S ) The vector predictor is used 13: end if 14: Broyden's method (H S ) The corrector method is used 15: The numeric homotopy path is stored 16: Update the center of the hypersphere (S i ) 17 Start position in C-space. 5: Goal position in C-space. 6: end for 7: for (j = 0; j < v; j++) do Calculation of the value of a 0 .  13: return (w start , w goal , a 0 ) Returns the values from the C-space 14: end function Algorithm 3 Get the value of (Q, W).
1: function GET Q(w goal ,C w ,R w ,P C ,L v ,c, v, n) 2: add obs [v] = 0,add[n] = 0, j, k, i Temporal variables. 3: for (j = 0; j < c; j++) do 4: for (k = 0; k < v; k++) do 5: for (i = 0; i < n; i++) do 6: x n (x k , y k ) are the coordinates of each singular point for a given link 8: The equation of the circular obstacle C(w) can be replaced by the equation of ellipsoidal obstacle R(w)

end for
5:

Case Studies
In this section, three case studies are presented, which show the capacity of the proposed method to obtain the path in planar robot arms. These studies evaluate the performance of the proposed method with the environment, which includes narrow corridors and circular and ellipsoidal obstacles. The implementation can be modified to any number of links, their length, and added grippers. For all the case studies shown in this section, the following color convention is used: circular obstacles (C u ) are purple; ellipsoidal obstacles (E u ) are gray; the gripper is brown; the initial position of the robot arm is red; the final position is blue; the homotopic path is shown in black. The proposed method was implemented using the C++ programming language, and the animations were performed in Maple software. All the case studies were executed on a personal computer with a Core i5-4210u@1.7GHz processor and 8 GB of RAM. Here, it is important to note that no special specialized package, library, or hardware was used to help reduce the computing time.

Case Study 1
In this case study, a three-link planar robot arm with two circular obstacles is presented as shown in Figure 9. To reach the final position, the robot arm must pass through a narrow corridor generated by the circular obstacles C 1 and C 2 . y x Figure 9. Workspace of a planar robot arm with three links and two circular obstacles. Table 1 shows the center, radius, and proposed repulsion parameter (P) of circular obstacles, the length of each link, and the proposed constants of auxiliary equations.
Constants of auxiliary equations l 1 : (a 0 = −5.03, a 1 = 1, a 2 = 3, a 3 = 2), Initial state of the robot arm links   Figure 11 shows the changes that each angle of movement w of the robotic arm has; the marked points are the nodes of the solution path shown in Figure 10. Figure 12 shows the change in joint angle movement, where it is observed that the greatest change obtained between each movement does not exceed 0.03 radians, confirming that the path obtained is smooth. It is important to note that the robotic arm touches the perimeter of the obstacles; nevertheless, it does not collide with them due to the safeguard radius (rt) [22,23], as depicted in Figure 13. This case study shows that the HPPM-PRA can obtain paths even in narrow corridors where probabilistic methods may fail. y x Figure 13. Representation of a safeguard radius (rt) of an obstacle in a workspace with a robotic arm.

Case Study 2
For this case study, a robot arm with six links (of the same length) and a gripper is depicted. The robotic arm starts from a rest position where the gripper is closed and moves to grip a circular object (C 1 ) that is between the ellipsoidal obstacles (E 1 , E 2 ), as depicted in Figure 14. Table 2 shows the configuration parameters for this case study. y x Figure 14. Case Study 2 shows a planar robotic arm with six links and a gripper, two ellipsoidal obstacles, and a circular obstacle.

Obstacle
Type of Obstacle x c y c r c α c β c P   Figure 15 shows how the robotic arm moves from the initial position to the final position to grip the circular object. The robotic arm goes through the narrow corridor whilst the gripper opens gradually to hold the object; the HPPM-PRA considers the robotic arm and gripper as a unified structure during simulation. In this case study, a simple gripper was proposed, but it can be modeled in different ways, depending on the specific needs.  Figure 16 shows the angle w of each joint for the full path; the points marked in Figure 16 correspond to the images in Figure 15. Figure 17 shows the change in joint angle movement, where it is observed that the greatest change obtained between each movement does not exceed 0.03 radians for the full path, so the path is smooth.

Case Study 3
This case study aims to show the suitability of the proposed method applied to a hyperredundant robot. For this, a twenty-link hyper-redundant robot arm is used. Figure 18 depicts the scenario proposed for this case study. The robot arm must evade the circular obstacle C 2 , continue to move through the path formed by objects E 1 -E 5 , and finally, grab the circular object (C 1 ). In this scenario, a gripper is no longer necessary, since the robotic arm can grab the object with its links; this is an advantage of the hyper-redundant arms [10,11]. y x Figure 18. Workspace of a planar robotic arm with twenty link, five ellipsoidal obstacles, and one circular obstacle. Figure 19 presents the sequence of robot arm simulation of the study case 3. In this picture, each position corresponds to a marked point in Figure 20. Figure 20 shows the evolution of the angles w along the path obtained for Case Study 3.   Figure 20 shows the evolution of the angles w along the path obtained for this. It can be seen that it exhibits a smooth displacement throughout the points that correspond to the images in Figure 21. The smoothness of the path can be validated by the nature of the homotopy continuation methods, which generate a continuous solution curve. Figure 21 shows the change in joint angle movement, where it is observed that the greatest change obtained between each movement does not exceed 0.02 radians for the full path, so the path is smooth.   Table 3 shows the simulation parameters. The successful implementation of the HPPM-PRA on hyper-redundant robot arms to compute a collision-free path opens the possibility for the method to be applied to various areas of science such as medicine and exploration, among others [5,10,[12][13][14]44,45]. Table 4 shows the computation time, memory consumption, total number of hyperspheres used to trace the homotopy path, radius of the hyperspheres, and characteristics of the workspace (number of links, the amount and type of obstacles).   It can be seen that the computation time and memory consumption increase as the number of links and obstacles increases. The ellipsoidal obstacles have a higher computational cost than the circular obstacles. This is because the numerical problems that path tracking faces are due to the exponent of the ellipsoid formulation. The number of hyperspheres shown in Table 4 indicates the total movements made by the robotic arm to complete the task, so the proposed method obtains smooth paths for all case studies; this can be validated with Figures 11, 12, 16, 17, 20 and 21. The nature of homotopy is to create smooth paths to solve the NAES; therefore, the paths obtained with the proposed method will be smooth. The radius of the hypersphere was assigned as 0.02 with the purpose of standardizing the value, but this can be changed for any case study. It is suggested to use a value between 0.001 and 0.04; the smaller the size, the greater the total number of hyperspheres to be obtained is and vice versa.
Case Study 1 was the one that obtained the best results in CPU time, hyperspheres, and memory consumption. This is because the complexity of this workspace is minor since it only has two obstacles and an arm with three links. For Case Study 2 and Case Study 3, the computation time and memory consumption increased because of the greater number of obstacles and links and the presence of ellipsoidal obstacles.
In the first two case studies, the computation time was less than 65 milliseconds and the memory consumption was less than 5 KB; this means that the proposed method can be implemented in embedded systems with limited memory. The memory consumption in all cases was less than 20 KB, demonstrating the low memory consumption of the proposed method. In contrast, the state-of-the-art hyper-redundant robotic arms, such as the one proposed in Case Study 3, require high-performance equipment with outstanding processor and memory consumption. They even use mathematical strategies to obtain favorable results [10,11,14], not to mention that, sometimes, they cannot find the path or only work with specific scenarios.

Implementation of the Proposed Method in the CRS Catalyst-5 Robot
The proposed method was validated through its implementation on a real robotic arm model, CRS CataLyst-5. The method so far only works with planar robot arms; thus, the movement of the CRS-CataLyst-5 robot was limited to two axes.
To carry out the implementation, the test was divided into two stages: 1.
First, the workspace to be solved was established. A three-link robot arm with normalized dimensions regarding the CRS CataLyst-5 robot was used. The circular obstacles had a tolerance radius rt, which guaranteed no collision of the robot arm with the obstacle (foam balls). For this case, two goals (goal1 and goal2) were set and are depicted in Figure 22 by the line formed by gray boxes and the blue line formed by asterisks, respectively. The movements of the robot arm are semi-transparent. The robot arm first reaches Goal 1 (the first homotopic path has been followed). Then, the endpoint of this path is used as the starting position to obtain the second homotopic path and reach Goal 2. In this way, a single path is obtained capable of avoiding obstacles and meeting both goals. The computation time and memory consumption were 2 milliseconds and 0.924 KB, respectively. The sequence of movements is executed by the robotic arm, as shown in Figure 22a.

2.
The second stage of this process is to adjust the numeric homotopy path data to the correct instructions for the CRS CataLyst-5 arm to follow the path. The CRS-CataLyst-5 robot has five degrees of freedom, a teach pendant, and a controller for interpreting and processing the instructions sent by the computer through its Robcomm3 software to generate the movements of the robot [46,47]. Figure 22b depicts the robotic arm workspace. From Figure 23 (implementation), the sequence of movements of Figure 22a (simulation) is corroborated.

Conclusions and Future Work
In this work, a novel method for collision-free path planning for robotic arms using homotopy continuation methods was presented. This proposal is flexible since it is capable of working in the simulation with different characteristics of the robotic arm, such as different link lengths, an arbitrary number of links, or adding grippers. Moreover, the homotopy path-planning method for planar robotic arms (HPPM-PRA) can work with circular and ellipsoidal obstacles. Obstacle avoidance is achieved by strategically adding mathematical singular points to the links. The behavior of the evasion is controlled by the repulsion parameter assigned to each obstacle, which allows obtaining a path that approaches or moves away from each obstacle when searching for the goal position.
The HPPM-PRA was tested in three different scenarios to validate the capability of the method to work with different robot arms. The results of the case studies showed 20 KB of maximum memory expended in the implementations. These results validate the low memory consumption of the HPPM-PRA. A remarkable result of the HPPM-PRA is that it can reach a goal while avoiding obstacles and crossing narrow corridors using low computational resources, which is a complex task for probabilistic methods. The HPPM-PRA method was validated with a CRS CataLyst-5 robot for practical implementations. For this, it was necessary to consider a normalized workspace and the limitations of the software and hardware of the CRS CataLyst-5 robot.
The HPPM-PRA represents a novel proposal for the homotopy continuation methods [22][23][24][35][36][37][38][39][40][41][42][43]48,49] because it faces the problem of path planning by representing the configuration space (C-space) of the robot arm by using a system of algebraic equations and strategically allocated singularities, which are fundamental during the process of circumventing the obstacles. The proof of concept proved to be effective for implementation on real robots and prepares the way for implementation on scrolling robots in 3D configuration spaces. However, the extension of this project to 3D environments is left as future work, since the representation of the configuration space must be modified in the HPPM formulation by using the Denavit-Hartenberg representation.