## 3 Proposed APF-IRRT\({}^{*}\) Algorithm
### APF Algorithm  
The APF algorithm is a kind of virtual force field method. Its basic idea is to build virtual potential fields in state space C so that the point, which represents the mobile robot, is attracted by the target point \(x_{tar}\), and is repelled by the obstacle \(x_{obs}\) in C.  
Let \(x_{t}=(x_{t}^{x},x_{t}^{y})\) and \(x_{goal}=(x_{tar}^{x},x_{tar}^{y})\) be the current position and target point, respectively. The attractive field, which guides the robot to the target point, is defined as  
\[U_{att}(x)=\frac{1}{2}k_{att}d^{2}(x_{t},\ x_{tar}), \tag{5}\]  
where \(k_{att}\) and \(d(x_{t},x_{tar})\) are the attractive coefficient and Euclidean distance between \(x_{t}\) and \(x_{tar}\), respectively. It is a special attractive field which will be stronger when it is further away from the target point. Especially, \(U_{att}(x)\to 0\), if \(d(x_{t},x_{tar})=0\).  
Figure 2: The iterative effect of I-RRT\({}^{*}\) algorithm.  
The attractive force \(F_{att}(x)\) can be expressed as the negative gradient of \(U_{att}(x)\),  
\[F_{att}(x)=-\
abla\ U_{att}(x)=k_{att}d(x_{t},x_{tar}) \tag{6}\]  
The direction of \(F_{att}(x)\) passes through \(x_{t}\) and \(x_{tar}\) to the target point.  
Similarly, the repulsive field and repulsive force, which keep the robot away from obstacles, can be expressed as  
\[U_{rep}(x)=\left\{\begin{matrix}\frac{1}{2}k_{rep}\Big{(}\frac{1}{d(x_{t},x_{ obs})}-\frac{1}{d_{0}}\Big{)}^{2}&if\ d(x_{t},x_{obs})\leq d_{0}\\ 0,&if\ d(x_{t},x_{obs})>d_{0}\end{matrix}\right. \tag{7}\]  
and  
\[F_{rep}(x)=\left\{\begin{matrix}k_{rep}\frac{1}{d(x_{t},x_{obs})^{2}}\Big{(} \frac{1}{d(x_{t},x_{obs})}-\frac{1}{d_{0}}\Big{)}&if\ d(x_{t},x_{obs})\leq d_{0 }\\ 0,&if\ d(x_{t},x_{obs})>d_{0}\end{matrix}\right., \tag{8}\]  
where \(k_{rep}\) is the repulsive coefficient, \(d(x_{t},x_{obs})\) is the Euclidean distance between \(x_{t}\) and \(x_{obs}\), \(d_{0}\) is the range of influence of obstacle and \(U_{rep}(x)\rightarrow\infty\) when \(d(x_{t},x_{obs})=0\). The direction of \(F_{rep}(x)\) passes through \(x_{t}\) and \(x_{obs}\) from the target point.  
The total potential \(U(x)\) is the sum of an attractive \(U_{att}(x)\) and a repulsive potential \(U_{rep}(x)\) as  
\[U_{total}(x)=U_{att}(x)+U_{rep}(x), \tag{9}\]  
whose negative gradient \(-\
abla\ U_{total}(x)\) indicates the most promising local direction of motion.  
Having the APF method has the advantages of less calculation, low complexity and good real-time performance; the APF method has been widely used in path planning for mobile robots. However, it easily falls into the target non-reachable and local minima problems due to the lack of prior information about the environment. To this end, the APF method usually combines with other algorithms to overcome these disadvantages. In this article, we propose a hybrid algorithm by combining IRRT* and the APF method by introducing the APF method into the search tree expansion stage of IRRT* algorithm. The APF method greatly improves the guidance for the algorithm, which further shortens the path length and the search time. Furthermore, due to the real-time process of the APF method, the proposed algorithm can be used not only in static environments, but also in dynamic environments.