## 2 Methods
### Path Connection  
The proposal adopts a two-stage approach for path point sampling and path connection. In the initial sampling stage, Sobol sampling is used throughout the sampling space. After the initial sampling, the Euclidean distance is used as the cost for the initial path connection. In the secondary sampling stage, the sampling is performed around the paths connected in the initial stage, and the secondary path connection uses both Euclidean  
Figure 4: Secondary sampling diagram.  
distance and a geometric perceptual singularity metric as costs. Different connection radii are set for the two stages of path connection.  
The pseudocode for the secondary path expansion is presented in Algorithm 4. The algorithm begins with the initialization phase, where all points in set \(V\) except \(X_{init}\) are placed into the unvisited set V\({}_{unvisited}\) (line 2), \(X_{init}\) is placed into V\({}_{open}\) (line 3), and V\({}_{close}\) is initialized as an empty set (line 4). The initial frontier point z is set to \(X_{init}\) (line 5), and points within the connection radius \(R2\) of the frontier point \(z\) are noted as \(N_{2}\) (line 6). While the current frontier point \(z\) is not the goal point \(x_{goal}\), for a point \(x\) in \(N_{z}\), the set \(N_{x}\) represents the points within the connection radius R2 (lines 7-9). The points in \(N_{x}\) that belong to V\({}_{open}\) are noted as \(N_{y}\) (line 10), and then the point \(y_{min}\) in \(N_{y}\) with the minimum cost to expand is found (line 11). If the attempted connection path between \(y_{min}\) and \(x\) is collision-free (line 12), the connection between \(y_{min}\) and \(x\) is added to the tree \(T\) (line 13), and the cumulative cost \(c(x)\) is updated based on the minimum cost from \(y_{min}\) to \(x\) (line 16). If node \(x\) successfully connects, it is moved to the open list V\({}_{open}\), while node \(y\) is moved into V\({}_{close}\) (lines 19-20). If V\({}_{open}\) is empty, indicating there are no more points available for expansion, the stop_expansion flag is returned (line 22). Finally, the frontier point \(z\) is changed in preparation for the next expansion (line 23). After completing all loops, the path set \(\Pi\), search tree \(T\), and the success flag are returned.  
```
1:functionSecondary Expansion(\(V\), \(x_{init}\), \(x_{goal}\), \(R2\))
2:\(V_{unvisited}\)\(\leftarrow\)\(V\backslash\{x_{init}\}\)
3:\(V_{open}\)\(\leftarrow\)[\(x_{init}\)]
4:\(V_{dual}\)\(\leftarrow\)\(\mathcal{O}\)
5:\(z\)\(\leftarrow\)\(x_{init}\)
6:\(N_{z}\)\(\leftarrow\)\(\textit{Near}(V\backslash\{z\},z,\,R2)\)
7:while (\(z\
eq x_{goal}\)) do
8:for\(x\in N_{z}\)do
9:\(N_{x}\)\(\leftarrow\)Near(\(V\backslash\{x\}\))
10:\(N_{y}\)\(\leftarrow\)\(N_{z}\cap V_{open}\)
11:\(\textit{y}_{init}\)\(\leftarrow\)\(\textit{starting}_{N_{y}}\)\(\left[c(y)+Cost(y,x)\right]\)
12:if\(\textit{CollisionFree}(y_{init},x)\)then
13:\(T\)\(\leftarrow\)\(T\cup\{(y_{init},x)\}\)
14:\(V_{open,new}\)\(\leftarrow\)\(V_{open,new}\cup\{x\}\)
15:\(V_{unvisited}\)\(\leftarrow\)\(V_{unvisited}\backslash\{x\}\)
16:\(c(x)\)\(=\)\(c(y_{init})+cost(y_{init},x)+\textit{s}gcost(x)\)
17:endif
18:endfor
19:\(V_{open}\)\(\leftarrow\)[\(V_{open}\)\(\cup\)\(V_{open,new}\)]\(\backslash\{z\}\)
20:\(V_{closed}\)\(\leftarrow\)\(V_{closed}\cup\{z\}\)
21:if\(V_{open}=\emptyset\)then
22:return\(\textit{stop}_{expansion}\)
23:endif
24:\(z\)\(\leftarrow\)\(\textit{argmin}_{c(y)}\)\(\backslash\)\(\textit{y}_{open}\)\(\backslash\)
25:endwhile
26:return\(\Pi\), \(T\), \(success\)
27:endfunction
```  
**Algorithm 4** Secondary Expansion