# Smart Obstacle Avoidance Using a Danger Index for a Dynamic Environment
## 3 Experiment and Analysis
### Moving Obstacle  
For dynamic environment, we compare three methods to avoid the moving obstacle, i.e., DAPF, DVAPF and DIAPF. We show that these methods have different performance for faster and slow moving obstacles. The experimental parameters are shown in Table 2.  
The performance using the DAPF for avoiding the slow and fast obstacles are shown in Figures 7 and 8 respectively. For the slow obstacle, the DAPF has a period of oscillation when the obstacle is in front of the robot. For the fast obstacle, the situation is worse, i.e., the collision between the robot and the obstacle occurs. The DVAPF is better than the DAPF as shown in Figures 9 and 10, where we can see that the DVAPF prefers a path behind the moving obstacle. Using such a strategy, the robot and the dynamic obstacle will move in opposite directions when the obstacle enters the robot's local map if the dynamic obstacle is faster than the robot, and the robot will continue to move towards the target point when \(\alpha\in(-\pi,-\frac{\pi}{2})\cap(\frac{\pi}{2},\pi)\) or the obstacle leaves the robot's local map. If the moving obstacle is slower than the robot or their velocity is similar, the planned path can be inefficie \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \(k_{ro}\) & \(\varepsilon\) & \(\rho_{max}\) & \(\rho_{min}\) & \(v_{r}\) & \(v_{o}\) (fast) & \(v_{o}\) (slow) \\ \hline
1 & 2 & 1.2m & 0.3m & 0.2m/s & 0.3m/s & 0.1m/s \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The experimental parameters for moving obstacle avoidance  
Figure 6: Experimental results using APF (**a**,**c**) and proposed DAPF (**b**,**d**) in the static environment where the gray solid circles are obstacles, the circles that around obstacles means the influence range, the small green circle is the robot position, and the red curve is the planned path. The APF has the oscillation problem that occurs in the (**a**) and local minimum problem that occurs in the (**c**), whereas the DAPF solves such problems and achieves better results as shown in (**b**,**d**), respectively. in Figure 10, i.e., the robot enters the influence area of the obstacle since the robot's deflection angle is too small to avoid the obstacle. In contrast to the DVAPF and DAPF, the DIAPF has the best performance according to the experiment results as shown in Figures 11 and 12. From the experimental results, it can be seen that the DIAPF approach can make a prediction according to the state of the moving obstacle: if the obstacle velocity is similar or faster, the robot can plan a path behind the obstacle. If the obstacle velocity is slower, the robot can plan a path in front of the obstacle. This strategy makes the planned path more efficient. In addition, the distance influence factor plays a key role to increase the safety and effectiveness of the planned path, e.g., the distance influence factor can reduce the robot's deviation angle if the moving obstacle is far away, and can increase this angle if the moving obstacle is closer. Figure 8: The robot uses the DAPF approach to avoid a fast moving obstacle: (**a**) shows that the robot is before obstacle avoidance, and (**b**) shows that the robot collides with an obstacle. Figure 7: The robot uses the DAPF approach to avoid the slow moving obstacle: (**a**) shows the robot is before obstacle avoidance; (**b–e**) show that the robot is avoiding the obstacle, and (**f**) shows that the robot finishes obstacle avoidance. Figure 11: The robot uses the DIAPF approach to avoid a fast moving obstacle: (**a**) before avoiding; (**b**) avoiding the obstacle; and (**c**) finish avoiding. Figure 12: The robot uses the DIAPF approach to avoid a slow moving obstacle: (**a**) before avoiding; (**b**) avoiding the obstacle; and (**c**) finish avoiding. Figure 10: The robot uses the DVAPF approach to avoid a slow moving obstacle: (**a**) before avoiding; (**b**) avoiding the obstacle; (**c**) finish avoiding.