# Path Planning of Intelligent Mobile Robots with an Improved RRT Algorithm
## 2 Improved RRT Path Planning Algorithm
### Improved RRT Algorithm Framework Model  
The improved RRT-KF algorithm is built on the traditional RRT algorithm, making it more efficient in searching across various environments by incorporating strategies such as steering angle change, redundant point removal based on Kalman filtering, collision detection, and path smoothing using Bezier curves. Starting from the initial point, the algorithm finds the nearest point and then expands toward a random point. At this stage, the steering angle change strategy adjusts the step size and direction during expansion to avoid the phenomenon of nodes growing in reverse, dynamically adjusting the steering angle to increase the algorithm's flexibility and prevent the algorithm from stalling. During the node growth process, collision detection is used to ensure that the planned path does not pass through obstacles, and the steering angle change strategy helps accurately and quickly lock onto the forward direction. During path generation, unnecessary points may appear between nodes, affecting the path length and efficiency. Based on traditional redundant point removal, Kalman filtering is used to observe and predict the future target position of nodes, determining whether a node is redundant and removing it accordingly. With the smoothing effect of the second-order Bezier curve, the final node can reach the target point along a smooth path, providing a theoretical foundation for the practical application of this algorithm. The pseudocode of the algorithm is shown in Algorithm 1.  
```
1.RRT-KF (\(x_{start},x_{goal}\))
2.tree \(\leftarrow\) [node(start)]
3.nearest\({}_{node}\)\(\leftarrow\) find (tree,\(rand_{node}\)) // Finding the nearest node
4.new\({}_{node}\)\(\leftarrow\) VariableSteering (nearest\({}_{node},rand_{node}\), \(\tau\)) // Steering angle change strategy
5.if not collision check (nearest\({}_{node}\)-pos, new\({}_{node}\)-pos) // Collision detection
6.update Kalman filter (new\({}_{node}\))
7.float distance = calculateDistance (nodes[i], nodes[j]) // The distance is measured based on the observation matrix \(H\)
8.if (distance \(<\) threshholdDistance) delete node (nodes, nodeCount)
9.nodes[i] = nodes[i+1]
10.nodeCount -- // Redundant point elimination based on Kalman filter
11.tree.append (new\({}_{node}\))
12.if distance (new\({}_{node}\)-pos, \(x_{goal}\)) \(<\) GOAL RADIUS
13.path \(\leftarrow\) extract path (new\({}_{node}\))
14.smoothed path \(\leftarrow\) beziersmoothing (path) // Bezier curve path smoothing
15.return SmoothedPath
```  
**Algorithm 1**Improved RRT-KF Algorithm  
Figure 5: The smoothing process of a second-order Bezier curve. (**a**) t = 0.182 s; (**b**) t = 0.479 s; (**c**) t = 0.708 s; (**d**) t = 1.000 s. The black solid line and the red solid line represent the curves before and after smoothing, respectively, while the green solid line represents the smoothing process.  
In the above algorithm, given the starting point is \(x_{start}\) and the target point is \(x_{goal}\), the algorithm begins by searching for nearby child node \(nearest_{node}\) from \(x_{start}\). Using child node \(nearest_{node}\) as the parent node, the algorithm compares the angle between nodes \(rand_{node}\) and \(new_{node}\) to determine if a collision has occurred through the pose. The Kalman filter state of the node is updated, and the distance of the node is checked to see if it lies within the observation values, thus removing redundant points. Finally, the path is smoothed using a Bezier curve, and the SmoothedPath is returned.