# A Vision-Based Approach for Autonomous Motion in Cluttered Environments
## 4 Experiment and Results
### Path-Generation Comparison  
In this section, we use a simulation environment to test our proposed path-generation algorithm. The simulation environment has a size of \(10\) m \(\times\)\(10\) m, and the starting point and ending point are \((1\) m,\(1\) m\()\) and \((9\) m,\(9\) m\()\) respectively. In order to test the adaptability of the algorithm to obstacles of different shapes, four square and circular obstacles were designed respectively in the simulation environment. The A\({}^{\star}\) algorithm and Path Smooth algorithm were applied as comparison algorithms since these two algorithms are widely used in robot motion planning. Therefore, in the experiment, we used A\({}^{\star}\) algorithm, Path Smooth algorithm and our proposed algorithm to generate paths and compared their performance.  
The experiments were run on a laptop computer with an intel i5-5200u processor and 8 GB RAM. In the two sets of experiments, we run the three algorithms 100 times, and recorded the average distance and the shortest distance between the path and the obstacle, the maximum turning angle of the path, the length of the path, and the planning time. The average value of 100 runs was calculated for each indicator. The paths generated by the three path-generation algorithms in the two environments are shown in Figures 8 and 9, respectively. The average values of each indicator are summarized in Tables 1 and 2, respectively.  
Figure 8: The paths generated by our proposed path-generation algorithm (green), the Path Smooth algorithm (red), and the A* algorithm (blue) in the first experiment.  
\begin{table}
\begin{tabular}{l l l l} \hline
**Performance** & **A*** & **Path Smooth** & **Ours** \\ \hline Mean distance (m) & 0.64 & 0.83 & **2.69** \\ Min distance (m) & 0.1 & 0.0 & **0.67** \\ Smooth (\({}^{\circ}\)) & 45 & **10.0** & 11.4 \\ Path length (m) & **13.06** & 12.88 & 14.32 \\ Planning time (ms) & **0.60** & 0.10 & 7.36 \\ \hline \end{tabular}
\end{table}
Table 1: The performance index of the generated path in the first experiment.  
Figure 9: The paths generated by our proposed path-generation algorithm (blue), the Path Smooth algorithm (red), and the A* algorithm (green) in the second experiment.  
As seen, the path generated by the A* algorithm has several large corners and is close to the obstacles, which is not suitable for the robot to execute. Apparently, the path obtained from the Path Smooth algorithm collides with obstacles, which has a safety problem. In contrast, the path generated by our algorithm is smooth and keeps a safe distance from obstacles, showing the most comprehensive properties.  
Tables 1 and 2 display the performance indicators of the paths generated by three algorithms. As can be seen, the average distance and minimum distance of the path generated by our proposed algorithm are significantly larger than the A* and Path Smooth algorithms. Therefore, this path is more secure. In terms of smoothness, the smoothness of our proposed algorithm is obviously better than that of the A* algorithm and comparable to that of the Path Smooth algorithm. Additionally, the path generated by our proposed algorithm has a longer path than that of the A* and Path Smooth algorithms. The average time of our algorithm to generate a path is longer than that of the Path Smooth algorithm because of the requirement of calculating the SDF value of the path point. However, the planning time is still at the millisecond level, which can meet the real-time requirements of the robot system. Therefore, our algorithm can generate a path with better comprehensive properties in real time.