A Free Navigation of an AGV to a Non-Static Target with Obstacle Avoidance

: The industry is changing in order to improve the economy sector. This is the reason why technology is improving and developing new devices. The autonomous guided vehicle with free navigation is a new machine, which uses different techniques to move such as mapping, localization, path planning, and path following. In this paper, a path following is proposed. The path following is called moving to a point, which uses the proportional distance between the target and the autonomous guided vehicles (AGV) to calculate the velocity and direction. If some obstacles appear in the trajectory, however, the vehicle stops. Instead of stopping the machine, by using moving to a point logic, an obstacle avoidance function will be implemented. In this implementation, different parameters can be conﬁgured, such as: security distance, which determinates when the obstacle avoidance must correct the pose; and proportional values, which modify the velocity and steering commands. It is also compared to a dynamic window approach (DWA) obstacle avoidance solution. Additionally, the AGV navigates to a non-static target with a path following algorithm.


Problem Formulation
The aim is to take a commercial AGV from industrial application and use its technology to introduce an obstacle avoidance algorithm. This commercial AGV uses a LIDAR to take information from the surroundings, a programable logic controller (PLC) to control AGV periphery (motors, displays, lights, etc.) and an industrial personal computer (IPC) for the SLAM and path following algorithm. It is remarkable that the only programable hardware is the PLC, and it does not have enough capability to process huge calculations like optimization.
All hardware is connected via Ethernet to synchronize the information. The IPC sends speed ( → V agv ) and steering (γ) commands to the PLC, the PLC sends wheel-odometry information to the IPC, and LIDAR sends information to both the PLC and IPC. In the Industry, it is better to use known trajectories, which is why these vehicles use only path following algorithms. In general, these algorithms are very simple and cannot avoid an obstacle. Hence, it was decided to implement an obstacle avoidance term into the path following.
Furthermore, the AGV has to arrive at a conveyor transport and synchronize its speeds with the moving target. The collaborative robot that was assembled in the AGV then takes an object from conveyor transport and moves it to another point of the factory. The objective is not to stop the conveyor transport to take that product, in order to reduce production time.
The idea of this paper is to take moving to a point mathematical equations and adapt them to implement avoidance technique. Corke [19] studied a moving to a point path following algorithm, in which the problem of moving towards a goal point (x * , y * ) in the plane was analyzed. For this solution, the velocity of the robot considered in Equation (1) is controlled proportionally to the distance from the goal, as analysed in Equation (2).
To steer towards the goal, which is represented in Equation (3), it is considered that K h is the proportional controller, and the vehicle-relative angle is analyzed in Equation (4).
Therefore, in the current study, a new obstacle avoidance strategy is proposed to be implemented in the moving to a point technique. It is based on measurement between the vehicle and the obstacle. Table 1 summarizes all terms and parameters used in this work. Steering setpoint θ (rad) AGV Rotation (x * , y * , θ * ) (m, m, rad) Target POSE D obs (m) Distance to the obstacle D target (m) Distance between the AGV and target

γ)
Gap between AGV and goal for each trajectory dist(V agv , .

γ)
Distance to the obstacle for each trajectory vel(V agv , .

γ)
The speed of each trajectory POSE AGV position and orientation AGV Autonomous guided vehicle POA Proposed obstacle avoidance DWA Dynamic window approach

Implementation of Obstacle Avoidance
A new formulation is presented in this section, so the vehicle can autonomously correct the path avoiding the obstacle. Considering the measurement of the LIDAR, it is possible to obtain the distance between the AGV and the obstacle. According to Peng et al. [22], that distance is expressed in Equation (5).

Implementation of Obstacle Avoidance
A new formulation is presented in this section, so the vehicle can autonomously correct the path avoiding the obstacle. Considering the measurement of the LIDAR, it is possible to obtain the distance between the AGV and the obstacle. According to Peng et al. [22], that distance is expressed in Equation (5).

and
represent the relative coordinates of the distance between the AGV and the nearest obstacle defined by in Figure 1. The output of the Equation (5) can be represented in a graph. Figure 2 shows how the LIDAR measurement changes when some obstacle appears in the AGV's way. To use that measurement information as a correction for the steering command, the graph must start at 0 value. By subtracting the LIDAR maximum measurement range to , the answer will change. This way, when the AGV is approaching the obstacle, the value becomes more negative. This expression is analysed in equation (8) and the solution is represented in Figure 3. x obs and y obs represent the relative coordinates of the distance between the AGV and the nearest obstacle defined by D obs in Figure 1. The output of the Equation (5) can be represented in a graph. Figure 2 shows how the LIDAR measurement changes when some obstacle appears in the AGV's way.

Implementation of Obstacle Avoidance
A new formulation is presented in this section, so the vehicle can autonomously correct the path avoiding the obstacle. Considering the measurement of the LIDAR, it is possible to obtain the distance between the AGV and the obstacle. According to Peng et al. [22], that distance is expressed in Equation (5).  represent the relative coordinates of the distance between the AGV and the nearest obstacle defined by in Figure 1. The output of the Equation (5) can be represented in a graph. Figure 2 shows how the LIDAR measurement changes when some obstacle appears in the AGV's way. To use that measurement information as a correction for the steering command, the graph must start at 0 value. By subtracting the LIDAR maximum measurement range to , the answer will change. This way, when the AGV is approaching the obstacle, the value becomes more negative. This expression is analysed in equation (8) and the solution is represented in Figure 3. To use that measurement information as a correction for the steering command, the graph must start at 0 value. By subtracting the LIDAR maximum measurement range to D obs , the answer will change. This way, when the AGV is approaching the obstacle, the value becomes more negative. This expression is analysed in equation (8) and the solution is represented in Figure 3.  In Equation (9), a safety distance term is introduced to prevent premature correction. This safety distance maintains the AGV direction until the object is between the AGV and that distance. In case of the object being far away, the obstacle avoidance stays in standby mode. In other words, it does not interfere with the moving to a point algorithm.
is a constant which adapts the intensity of the avoid function and is the safety implementation with a parameter, which changes the safety distance. This avoid function adapts the AGV direction to avoid the obstacle. Therefore, this term must interact with the value. Instead of implementing directly the avoidance correction, it has been considered to introduce some logic between the value and avoid value, using a sigmoid function as shown in Equation (10).
Regrouping all the equations, the Moving to a Point algorithm with obstacle avoidance can be summarized with Equation (11).
where , , and are constants, which modify the interaction with the Com function. is a proportional constant, which changes the measurement value to steering value. Until this point, the AGV can avoid an obstacle and it always turns to the right. In some cases, however, it is better to turn to the left so as not to lose too much time avoiding the obstacle. It can be done by analyzing the sign of the angles as represented in Equation (12).
The vehicle velocity can be modified considering the same logic. When the obstacle is close, the AGV must reduce its speed. Taking Equation (9) as reference, Equation (13) can be made, which considers a variation of speed changing by .
In addition, this function has to interact with the moving to a point velocity command, which is the reason why Equations (10) and (13) are combined to obtain Equation (14). In Equation (9), a safety distance term is introduced to prevent premature correction. This safety distance maintains the AGV direction until the object is between the AGV and that distance. In case of the object being far away, the obstacle avoidance stays in standby mode. In other words, it does not interfere with the moving to a point algorithm.
β is a constant which adapts the intensity of the avoid function and e α−D obs is the safety implementation with a α parameter, which changes the safety distance. This avoid function adapts the AGV direction to avoid the obstacle. Therefore, this term must interact with the γ value. Instead of implementing directly the avoidance correction, it has been considered to introduce some logic between the γ value and avoid value, using a sigmoid function as shown in Equation (10).
Regrouping all the equations, the Moving to a Point algorithm with obstacle avoidance can be summarized with Equation (11).
where δ, y, and ϕ are constants, which modify the interaction with the Com function. K h is a proportional constant, which changes the measurement value to steering value. Until this point, the AGV can avoid an obstacle and it always turns to the right. In some cases, however, it is better to turn to the left so as not to lose too much time avoiding the obstacle. It can be done by analyzing the sign of the angles as represented in Equation (12).
The vehicle velocity can be modified considering the same logic. When the obstacle is close, the AGV must reduce its speed. Taking Equation (9) as reference, Equation (13) can be made, which considers a variation of speed changing β by µ. In addition, this function has to interact with the moving to a point velocity command, which is the reason why Equations (10) and (13) are combined to obtain Equation (14).
where δ and ϕ are constants, which modify the interaction with Com function. Finally, K v is the proportional value that changes the measurement value to velocity value.

AGV Kinematics Equations
In this case, a specific AGV was used, so it is necessary to specify the kinematics of that vehicle. In some cases, it is possible to use defined kinematics like Corke [19] proposed in his study. This special AGV has two motors in the front axle. The autonomous vehicle uses different speed values in each motor to steer. Both axles are connected mechanically by means of a pulley mechanism to reduce the steering radio.
The inputs of the kinematics block are the AGV velocity and direction. The output, however, is the vehicle POSE. The velocity reference (V agv ) is in the middle of the vehicle. When the AGV goes in a straight line, both motors (V i and V d ) have the same velocity. However, if the AGV takes a curve, the motors will have different velocities. where ′ and are constants, which modify the interaction with Com function. Finally, is the proportional value that changes the measurement value to velocity value.

AGV Kinematics Equations
In this case, a specific AGV was used, so it is necessary to specify the kinematics of that vehicle. In some cases, it is possible to use defined kinematics like Corke [19] proposed in his study. This special AGV has two motors in the front axle. The autonomous vehicle uses different speed values in each motor to steer. Both axles are connected mechanically by means of a pulley mechanism to reduce the steering radio.
The inputs of the kinematics block are the AGV velocity and direction. The output, however, is the vehicle POSE. The velocity reference ( ) is in the middle of the vehicle. When the AGV goes in a straight line, both motors ( ) have the same velocity. However, if the AGV takes a curve, the motors will have different velocities. Hence, taking Figure 4 as a reference, wheel speed can be represented in Equations (15) and (16): Where H is the distance between rotation point and , and b is the size of the wheel axle. Taking into account Equations (15) and (16), can be defined by motors velocities presented in Equation (17): The is split in and absolute coordinates.
and are related each other, since the vehicle is considered as a solid element and the velocity propagates along all the structure, as illustrated in Figure 5. Hence, taking Figure 4 as a reference, wheel speed can be represented in Equations (15) and (16): where H is the distance between rotation point and V c , and b is the size of the wheel axle. Taking into account Equations (15) and (16), . γ can be defined by motors velocities presented in Equation (17): The V AGV is split in .
x and . y absolute coordinates.
V C and V agv are related each other, since the vehicle is considered as a solid element and the velocity propagates along all the structure, as illustrated in Figure 5. The velocity represented in Figure 5 turns the vehicle and generates the rotation in the middle of the AGV. The rotation of the vehicle can be defined with Equations (21) and (22): Combining (21) and (22), Equation (23) is obtained.
Considering Equations (18)(19)(20) and (23), it is possible to define the vehicle dynamics in Equation where L is the wheelbase, is the AGV angle position in absolute coordinates, and is the value of the direction, which comes from the algorithm.

Implementation of Model
Once the dynamic block is ready, it is time to analyze this algorithm. Simulation software predicts what would happen in a "real" situation. The example scenario that comes with it has been modified and adapted to a more realistic surrounding.
The velocity V rot represented in Figure 5 turns the vehicle and generates the rotation in the middle of the AGV. The rotation of the vehicle can be defined with Equations (21) and (22): Combining (21) and (22), Equation (23) is obtained.
Considering Equations (18)(19)(20) and (23), it is possible to define the vehicle dynamics in Equation (24): where L is the wheelbase, θ is the AGV angle position in absolute coordinates, and γ is the value of the direction, which comes from the algorithm.

Implementation of Model
Once the dynamic block is ready, it is time to analyze this algorithm. Simulation software predicts what would happen in a "real" situation. The example scenario that comes with it has been modified and adapted to a more realistic surrounding. The velocity represented in Figure 5 turns the vehicle and generates the rotation in the middle of the AGV. The rotation of the vehicle can be defined with Equations (21) and (22): Combining (21) and (22), Equation (23) is obtained.
Considering Equations (18)(19)(20) and (23), it is possible to define the vehicle dynamics in Equation (24): where L is the wheelbase, is the AGV angle position in absolute coordinates, and is the value of the direction, which comes from the algorithm.

Implementation of Model
Once the dynamic block is ready, it is time to analyze this algorithm. Simulation software predicts what would happen in a "real" situation. The example scenario that comes with it has been modified and adapted to a more realistic surrounding. It is possible to add sensors to analyze the area in this program. In this case, a LIDAR sensor has been implemented to take measurements from the surroundings. This sensor has 51 lines distributed from -π/2 rad to π/2 rad and there is a measurement for each line. Hence, the centre line of the LIDAR is located at 0 rad and it is the line 26. Figure 6 shows how the lines change the color from blue to green, when the LIDAR detects some object.
There are two important blocks to interact with that library in Figure 7. One is to represent the vehicle movement and the other one is to take measurements that form the area. It is possible to add sensors to analyze the area in this program. In this case, a LIDAR sensor has been implemented to take measurements from the surroundings. This sensor has 51 lines distributed from -π/2 rad to π/2 rad and there is a measurement for each line. Hence, the centre line of the LIDAR is located at 0 rad and it is the line 26. Figure 6 shows how the lines change the color from blue to green, when the LIDAR detects some object.
There are two important blocks to interact with that library. One is to represent the vehicle movement and the other one is to take measurements that form the area.  Figure 8 shows the test area, which has three walls, two obstacles, and a moving point. This moving point is the target for the AGV and it is a non-static point.  Figure 9 shows the AGV trajectory after executing the simulation. It can be appreciated how the vehicle avoids the objects and selects where to turn depending on the obstacle localization.   Figure 8 shows the test area, which has three walls, two obstacles, and a moving point. This moving point is the target for the AGV and it is a non-static point. It is possible to add sensors to analyze the area in this program. In this case, a LIDAR sensor has been implemented to take measurements from the surroundings. This sensor has 51 lines distributed from -π/2 rad to π/2 rad and there is a measurement for each line. Hence, the centre line of the LIDAR is located at 0 rad and it is the line 26. Figure 6 shows how the lines change the color from blue to green, when the LIDAR detects some object.

Results
There are two important blocks to interact with that library. One is to represent the vehicle movement and the other one is to take measurements that form the area.  Figure 8 shows the test area, which has three walls, two obstacles, and a moving point. This moving point is the target for the AGV and it is a non-static point.  Figure 9 shows the AGV trajectory after executing the simulation. It can be appreciated how the vehicle avoids the objects and selects where to turn depending on the obstacle localization.   Figure 9 shows the AGV trajectory after executing the simulation. It can be appreciated how the vehicle avoids the objects and selects where to turn depending on the obstacle localization. It is possible to add sensors to analyze the area in this program. In this case, a LIDAR sensor has been implemented to take measurements from the surroundings. This sensor has 51 lines distributed from -π/2 rad to π/2 rad and there is a measurement for each line. Hence, the centre line of the LIDAR is located at 0 rad and it is the line 26. Figure 6 shows how the lines change the color from blue to green, when the LIDAR detects some object.

Results
There are two important blocks to interact with that library. One is to represent the vehicle movement and the other one is to take measurements that form the area.  Figure 8 shows the test area, which has three walls, two obstacles, and a moving point. This moving point is the target for the AGV and it is a non-static point.    In addition, the AGV can follow a moving goal using the moving to a point algorithm. As expected, there is some error because this path following algorithm uses a proportional function. Therefore, some error occurs when it has a non-static goal. Figure 10 shows the error between the moving point and the AGV. The error has been calculated as 0.4 m. This gap can be modified by adapting the K v parameter. In addition, the AGV can follow a moving goal using the moving to a point algorithm. As expected, there is some error because this path following algorithm uses a proportional function. Therefore, some error occurs when it has a non-static goal. Figure 10 shows the error between the moving point and the AGV. The error has been calculated as 0.4 m. This gap can be modified by adapting the parameter. After avoiding the obstacles, the system has some damping until it is stabilized. This damping can be modified adapting the value. If the value of increases, the AGV moves faster and can steer quicker. Figure 11 illustrates the trajectory of the AGV with different values. Apart from modifying the direction of the vehicle, the velocity is reduced to be more precise in the avoidance maneuver. This speed variation is represented in Figure 12. The avoiding algorithm calculates a velocity correction (red line) and this correction is implemented on the moving to a point velocity term (blue Line). After avoiding the obstacle, the safety term stops actuating. In 20 sample times, the avoidance stops correcting the speed. After avoiding the obstacles, the system has some damping until it is stabilized. This damping can be modified adapting the K h value. If the value of K h increases, the AGV moves faster and can steer quicker. Figure 11 illustrates the trajectory of the AGV with different K h values. In addition, the AGV can follow a moving goal using the moving to a point algorithm. As expected, there is some error because this path following algorithm uses a proportional function. Therefore, some error occurs when it has a non-static goal. Figure 10 shows the error between the moving point and the AGV. The error has been calculated as 0.4 m. This gap can be modified by adapting the parameter. Figure 10. Following error.

Results
After avoiding the obstacles, the system has some damping until it is stabilized. This damping can be modified adapting the ℎ value. If the value of ℎ increases, the AGV moves faster and can steer quicker. Figure 11 illustrates the trajectory of the AGV with different ℎ values. Apart from modifying the direction of the vehicle, the velocity is reduced to be more precise in the avoidance maneuver. This speed variation is represented in Figure 12. The avoiding algorithm calculates a velocity correction (red line) and this correction is implemented on the moving to a point velocity term (blue Line). After avoiding the obstacle, the safety term stops actuating. In 20 sample times, the avoidance stops correcting the speed. Apart from modifying the direction of the vehicle, the velocity is reduced to be more precise in the avoidance maneuver. This speed variation is represented in Figure 12. The avoiding algorithm calculates a velocity correction (red line) and this correction is implemented on the moving to a point velocity term (blue Line). After avoiding the obstacle, the safety term stops actuating. In 20 sample times, the avoidance stops correcting the speed. Electronics 2018, 7, x FOR PEER REVIEW 10 of 17 Figure 12. Velocity Adaption.

Dynamic Window Approach Comparison
The next step after testing the avoidance algorithm consists of comparing it with a classic motion planning solution. A well-known dynamic window approach (DWA) [13] algorithm is used. DWA is divided into two parts: The first part is search space, in which the different possible V agv and ̇ are considered. This section is subdivided into three steps: circular trajectories, where it is calculated a two-dimensional velocity(V agv , γ̇) space, admissible velocities to restrict the admissible velocities ensuring safe trajectories, and dynamic window, which analyses only those velocities that can be reached on a short time interval considering robot acceleration limitations.
The second part is an optimization. The optimization is represented by Equation (25): G(V agv , γ̇) = σ D (α D · heading(V agv , γ̇) + β D · dist(V agv , γ̇) + γ D · vel(V agv , γ̇)) Moreover, this second part is also subdivided into three steps: target heading, which is a measure of progress toward the goal, clearance, which is the distance to the closest obstacle, and velocity, which is considered the forward velocity of the robot.
Before starting the simulation of both algorithms, there are some aspects that can be appreciated without any execution. On the one hand, DWA uses an optimization term and normally these equations require a high computational capability. For the AGV that is used in our application, it is impossible to execute and process this optimization over a short period of time. That is the reason for the development of POA. Otherwise, with DWA it is possible to generate a proper trajectory, as it always selects the best path according to the space conditions. Furthermore, POA does not consider the vehicle kinematics, hence it makes a simpler calculation to avoid the obstacle. In order words, POA does not calculate a trajectory, it just modifies the path following command to change the direction and velocity when some obstacle appears in front of the vehicle. As a result, when some object is detected, the speed will be reduced to avoid it safely. DWA, however, always selects a trajectory considering the top speed value and minor acceleration loss.
On the other hand, in both cases adjustable gains are used to optimize the algorithms, making it more flexible to adapt to different surroundings or kinematics conditions. In addition, DWA can select which side turns the vehicle, in order to avoid the obstacle using the trajectory optimization. POA, such as the other algorithm, makes the same action. Otherwise, it uses Equation (12) to determinate which side turns the AGV.
In order to perform an easy comparison between both algorithms, a new simple scenario has been designed. There are three elements in the scenario: an object, a moving obstacle, and the static goal position. With the moving obstacle, it is possible to analyze human-robot collaboration. This moving obstacle is considered to be a human and the AGV must avoid the collision.

Dynamic Window Approach Comparison
The next step after testing the avoidance algorithm consists of comparing it with a classic motion planning solution. A well-known dynamic window approach (DWA) [13] algorithm is used. DWA is divided into two parts: The first part is search space, in which the different possible V agv and . γ are considered. This section is subdivided into three steps: circular trajectories, where it is calculated a two-dimensional velocity (V agv , . γ) space, admissible velocities to restrict the admissible velocities ensuring safe trajectories, and dynamic window, which analyses only those velocities that can be reached on a short time interval considering robot acceleration limitations.
The second part is an optimization. The optimization is represented by Equation (25): Moreover, this second part is also subdivided into three steps: target heading, which is a measure of progress toward the goal, clearance, which is the distance to the closest obstacle, and velocity, which is considered the forward velocity of the robot.
Before starting the simulation of both algorithms, there are some aspects that can be appreciated without any execution. On the one hand, DWA uses an optimization term and normally these equations require a high computational capability. For the AGV that is used in our application, it is impossible to execute and process this optimization over a short period of time. That is the reason for the development of POA. Otherwise, with DWA it is possible to generate a proper trajectory, as it always selects the best path according to the space conditions. Furthermore, POA does not consider the vehicle kinematics, hence it makes a simpler calculation to avoid the obstacle. In order words, POA does not calculate a trajectory, it just modifies the path following command to change the direction and velocity when some obstacle appears in front of the vehicle. As a result, when some object is detected, the speed will be reduced to avoid it safely. DWA, however, always selects a trajectory considering the top speed value and minor acceleration loss.
On the other hand, in both cases adjustable gains are used to optimize the algorithms, making it more flexible to adapt to different surroundings or kinematics conditions. In addition, DWA can select which side turns the vehicle, in order to avoid the obstacle using the trajectory optimization. POA, such as the other algorithm, makes the same action. Otherwise, it uses Equation (12) to determinate which side turns the AGV.
In order to perform an easy comparison between both algorithms, a new simple scenario has been designed (see Figure 13). There are three elements in the scenario: an object, a moving obstacle, and the static goal position. With the moving obstacle, it is possible to analyze human-robot collaboration. This moving obstacle is considered to be a human and the AGV must avoid the collision. Electronics 2018, 7, x FOR PEER REVIEW 11 of 17 Figure 13 Comparison scenario.
Using Table 2 variables, the result of both algorithm executions is shown in Figure 14. Where the black * represents the static obstacle, the red * draws goal point, the pink * represents the moving obstacle, the pink dashed line shows moving obstacle trajectory, green lines represent DWA possible trajectories, and blue lines represent the algorithm trajectory.  For this particular example, the DWA algorithm had more problems to avoid the moving obstacle than POA. DWA, with Table 3 optimization constant values, cannot fit an optimal trajectory Using Table 2 variables, the result of both algorithm executions is shown in Figure 14. Where the black * represents the static obstacle, the red * draws goal point, the pink * represents the moving obstacle, the pink dashed line shows moving obstacle trajectory, green lines represent DWA possible trajectories, and blue lines represent the algorithm trajectory.  Using Table 2 variables, the result of both algorithm executions is shown in Figure 14. Where the black * represents the static obstacle, the red * draws goal point, the pink * represents the moving obstacle, the pink dashed line shows moving obstacle trajectory, green lines represent DWA possible trajectories, and blue lines represent the algorithm trajectory.  For this particular example, the DWA algorithm had more problems to avoid the moving obstacle than POA. DWA, with Table 3 optimization constant values, cannot fit an optimal trajectory For this particular example, the DWA algorithm had more problems to avoid the moving obstacle than POA. DWA, with Table 3 optimization constant values, cannot fit an optimal trajectory to avoid the moving obstacle. To have a better idea of how the algorithms act with the mobile object, Figure 15 represents different time instants of the AGV trajectory. In the end, the algorithm does not avoid the moving obstacle, until the obstacle is a particular distance away from the AGV. Hence, it would be a problem if the vehicle did not have enough D obs .
Electronics 2018, 7, x FOR PEER REVIEW 12 of 17 to avoid the moving obstacle. To have a better idea of how the algorithms act with the mobile object, Figure 15 represents different time instants of the AGV trajectory. In the end, the algorithm does not avoid the moving obstacle, until the obstacle is a particular distance away from the AGV. Hence, it would be a problem if the vehicle did not have enough .  Figure 16 shows the avoidance progress for POA. The POA algorithm tries to avoid the moving obstacle until the sign of Equation (12) changes. When that sign changes, the AGV continues to the goal without any problem.  Figure 16 shows the avoidance progress for POA. The POA algorithm tries to avoid the moving obstacle until the sign of Equation (12) changes. When that sign changes, the AGV continues to the goal without any problem.  Figure 16 shows the avoidance progress for POA. The POA algorithm tries to avoid the moving obstacle until the sign of Equation (12) changes. When that sign changes, the AGV continues to the goal without any problem. In order to stop simulating, new different starting points for the AGV are implemented. This makes it possible to analyze and compare what happens with the vehicle on different cases. Apart from this, DWA configurable constants are changed to reduce the speed window size. = 2.0 is used, in order to reduce the effect that is shown in Figure 15, in which the AGV needed more to avoid the obstacle.  In order to stop simulating, new different starting points for the AGV are implemented. This makes it possible to analyze and compare what happens with the vehicle on different cases. Apart from this, DWA configurable constants are changed to reduce the speed window size. γ D = 2.0 is used, in order to reduce the effect that is shown in Figure 15, in which the AGV needed more D obs to avoid the obstacle.  In Table 3 different simulation results are shown, and it is necessary to consider that speed arriving at goal is the speed value at 1 s before arriving to the goal. Additionally, a static object is implemented, which is an x = 8 and y = 9 position, and a moving point, which starts in x = 0 and y = 20 position and ends in x = 40 and y = −20 position with 0.92 m/s constant speed. In addition, the goal is located in an x = 20 y = 20 position. All of these parameters also are used in the Figure 14 simulation.
Looking at Table 3, in general, DWA needs more space to avoid the obstacles with this configuration. That is why the value of D obs is larger than POA. Hence, the odometry in DWA is going to be higher, because both parameters are proportional.
If total time is compared, however, the situation changes. POA uses more time to arrive at the goal position. When AGV is approximating the goal, it will reduce the speed more dramatically, as represented by the speed arriving at goal column. In the end, the difference between both approximation speeds is around 0.46 m/s. Otherwise, POA has the best mean speed and the difference between both mean speeds is about 0.07 m/s, which is negligible.
To give a general idea about algorithms failure, Figure 17, which represents the worst trajectory of POA in comparison with DWA, and Figure 18, which analyzes the worst trajectory of DWA in comparison with POA, are shown. To consider which is the worst trajectory, the largest odometry was analyzed, due to AGV diverting more from the ideal path, which is a straight line from the starting point to the goal.
between both mean speeds is about 0.07 m/s, which is negligible.
To give a general idea about algorithms failure, Figure 17, which represents the worst trajectory of POA in comparison with DWA, and Figure 18, which analyzes the worst trajectory of DWA in comparison with POA, are shown. To consider which is the worst trajectory, the largest odometry was analyzed, due to AGV diverting more from the ideal path, which is a straight line from the starting point to the goal. In Figure 17, POA had a greater difficulty deciding where to avoid the moving obstacle. AGV tried to follow it until the obstacle was so far away that the vehicle stopped detecting it. A similar occurrence is observed in Figure 18. Instead of POA failing to avoid the obstacle, this time DWA failed. The dynamic window did not have enough space to pass the obstacle and it waited until having enough distance to avoid it. In both cases, the algorithms have a bad reaction with the moving obstacle, hence for future work it could be possible to analyze the space and detect moving obstacles. In case that some moving obstacle appears, the AGV stops and wait until the obstacle disappears. In Figure 17, POA had a greater difficulty deciding where to avoid the moving obstacle. AGV tried to follow it until the obstacle was so far away that the vehicle stopped detecting it. A similar occurrence is observed in Figure 18. Instead of POA failing to avoid the obstacle, this time DWA failed. The dynamic window did not have enough space to pass the obstacle and it waited until having enough distance to avoid it. In both cases, the algorithms have a bad reaction with the moving obstacle, hence for future work it could be possible to analyze the space and detect moving obstacles. In case that some moving obstacle appears, the AGV stops and wait until the obstacle disappears. Overall, both algorithms work in the same conditions, though depending on the algorithm configuration the answer of the simulation can change. There are some cases in which the DWA trajectories are worst, and other times the POA's paths are not good enough. Generally, DWA approximates the goal with a higher speed and, depending on the application, this speed must be controlled to safely arrive. POA, however, gives less space between the AGV and object. In the end, this could be a problem if the AGV moves around humans.

Conclusions
The solution proposed in this paper can highly improve a simple path following algorithm behavior. It gives more intelligence to the AGV, a result of the obstacle avoidance parameters. Moreover, it introduces more flexibility to the algorithm, because there are some variables which change the performance. Additionally, POA uses a simple equation to implement on a PLC, which is the only hardware available on the selected AGV. This hardware limitation is an important feature, because not all equipment supports large calculation capabilities, such as DWA, which uses an optimization function to select the best trajectory.
The optimization function gives the opportunity to analyze some trajectories and then select the Overall, both algorithms work in the same conditions, though depending on the algorithm configuration the answer of the simulation can change. There are some cases in which the DWA trajectories are worst, and other times the POA's paths are not good enough. Generally, DWA approximates the goal with a higher speed and, depending on the application, this speed must be controlled to safely arrive. POA, however, gives less space between the AGV and object. In the end, this could be a problem if the AGV moves around humans.

Conclusions
The solution proposed in this paper can highly improve a simple path following algorithm behavior. It gives more intelligence to the AGV, a result of the obstacle avoidance parameters. Moreover, it introduces more flexibility to the algorithm, because there are some variables which change the performance. Additionally, POA uses a simple equation to implement on a PLC, which is the only hardware available on the selected AGV. This hardware limitation is an important feature, because not all equipment supports large calculation capabilities, such as DWA, which uses an optimization function to select the best trajectory.
The optimization function gives the opportunity to analyze some trajectories and then select the best one. However, POA just modifies the path following trajectory depending on the gap between the AGV and obstacle. In other words, the algorithm does not optimize the trajectory.
In addition, POA has a good performance compared with traditional DWA algorithms. Both have similar behavior in avoiding the static obstacle. Furthermore, both can select which side turns the vehicle, in order to avoid the obstacle. DWA, however, tries to divert more from the obstacle, hence the AGV needs more space to avoid the obstacle. To solve this divergent, the algorithm always tries to go at maximum speed and it arrives faster than POA.
Apart from that, there is a considerable arriving speed value difference between both algorithms. For this application, the AGV must be able to cooperate with humans. Hence it would be safer for the AGV to arrive to the goal with less speed. Otherwise humans may interpret the fast approach as harmful. There is another similar situation, in which the vehicle is avoiding the human and it maintains a gap during the maneuver as an avoidance strategy.
It is remarkable that both algorithms can avoid a moving obstacle. Otherwise, they would need to be improved to avoid these kinds of obstacles. In future work, they could be improved using dynamic parameter values to change algorithm behavior depending on the situation. In some cases, it would be better to reduce AGV speed and wait until the obstacle disappears, while in other ones it would be possible to increase the speed to reduce commute time. In other situations, it could be possible to maintain a gap with the obstacle, for example, when the AGV has to avoid a box which is in its way. Moreover, it is important to control how much the AGV diverts from the obstacle, depending on the scenario this feature must be controlled. In industrial areas, for example, there is not much space to avoid the obstacle.