# Efficient Path Planning Based on Dynamic Bridging Rapidly Exploring Random Tree
## 4 Methodology
### Path Smoothing
#### 4.3.1 Curvature Calculation  
It is known that the tangent vector or normal deflection angle of the curve's start and end equals the integral of the curvature length. For the polyline in Figure 4 below, the normal vector only changes at each vertex, so our goal is to find out the curvature at each vertex, but the change in the normal vector at the vertex jumps, as shown in Figure 4; the gray arrow denotes the discernible change in the vertex on the line segment, recording the turning angle of the curve.  
The path-smoothing strategy employs a local optimization-based approach to recalibrate pivotal points in the path, minimizing its curvature. Its initial task is to scrutinize the produced preliminary path and identify possible redundant nodes and discontinuous parts. Eradicating these nodes can diminish the path's complexity while preserving essential nodes that ensure the path's feasibility.  
An initial step involves assessing the local curvature between various nodes to generate our \(x_{new}\); if the local curvature is below our preset value, then the node is deemed promising. The curvature at the vertices of a folded line is approximated by applying the Gauss-Bonnet theorem. For a simple closed curve in the plane, the total curvature and the sum of the angles at all vertices are equal to \(2\pi\). Applying this principle to the folded line model, the folded line is regarded as a polygon consisting of straight-line segments, with a corner \(\alpha_{i}\) defined at each vertex, which can be found by calculating the angle between the vectors of the two neighboring sides.  
Figure 4: Normal changes at vertices record the turning angle.  
The length of its arc is 0, a drawing from the Gauss-Bonnet theorem, the simple loop formed by curves on the plane satisfies the equation:  
\[\sum_{0}^{k}\int_{i}^{i+1}kds+\sum_{0}^{k}\theta_{i}=2\pi \tag{1}\]  
where, \(k\) is the curvature function and \(\theta_{i}\) is the angle of turn at vertex \(i\). For a single simple closed curve, it is:  
\[\oint kds=2\pi \tag{2}\]  
If this simple closed curve is discretized into a polyline, it still satisfies the Gauss-Bonnet theorem, that is, the sum of the turning angles of all vertices is \(2\pi\):  
\[\sum_{1}^{n}\alpha_{i}=2\pi \tag{3}\]  
where \(\alpha_{i}\) is the corner at vertex \(i\), and \(n\) is the total number of vertices, which represents the integral of mean curvature to arc length on a segment of the real curve, namely:  
\[\alpha_{i}=\int k_{i}ds=k_{i}A_{i} \tag{4}\]  
Among these terms, \(k_{i}\) is the curvature at the vertex, and \(A_{i}\) is the arc length of the curve. Consequently, once the arc length \(A_{i}\) is discerned, \(k_{i}\) can be determined. A reasonable \(A_{i}\) value is the sum of half of the two edges of a vertex, as shown in the following Figure 5:  
Leading to a specific result:  
\[k_{i}=\frac{\alpha_{i}}{A_{i}}=\frac{2\alpha_{i}}{l_{i1}+l_{i2}} \tag{5}\]  
where, \(k_{i}\) is the local curvature at vertex \(i\), \(\alpha_{i}\) is the angle formed by the two neighboring edges, and \(A_{i}\) is the length of the path from vertex \(i\) to the next vertex, i.e., the sum of the halves of the two edges.