Robot Path Smoothing Algorithm Based on Quintic Bezier Curve

In the field of autonomous systems, robot technology has become a cornerstone for enabling intelligent navigation in dynamic environments. As robots perform tasks ranging from industrial automation to service applications, they must integrate capabilities such as localization, perception, path planning, and control. A critical aspect of this integration is path smoothing, where a robot transforms a piecewise linear global path into a smooth, continuous trajectory that adheres to kinematic constraints and avoids obstacles. Traditional path planning algorithms, including graph-based methods like A* and sampling-based approaches such as RRT*, often generate paths composed of straight-line segments. While these paths are feasible, they require robots to execute sharp turns or in-place rotations, leading to inefficient motion and potential instability. To address this, we propose a novel path smoothing algorithm leveraging quintic Bezier curves, which ensures curvature continuity and safety through an optimization framework. This approach not only enhances the smoothness of the path but also aligns with advancements in robot technology by enabling more natural and efficient navigation.

The quintic Bezier curve is defined by six control points, allowing it to represent complex paths with high smoothness. For a parameter \( u \in [0,1] \), the curve segment \( \mathbf{S}_i(u) \) is expressed as:

$$ \mathbf{S}_i(u) = (1-u)^5 \mathbf{P}_0 + 5(1-u)^4 u \mathbf{P}_1 + 10(1-u)^3 u^2 \mathbf{P}_2 + 10(1-u)^2 u^3 \mathbf{P}_3 + 5(1-u) u^4 \mathbf{P}_4 + u^5 \mathbf{P}_5 $$

where \( \mathbf{P}_j \in \mathbb{R}^2 \) for \( j = 0, 1, \dots, 5 \) are the control points. This formulation ensures that the curve passes through the start and end points (\( \mathbf{P}_0 \) and \( \mathbf{P}_5 \)) and maintains continuity in position, tangent direction, and curvature at segment junctions. The convex hull property of Bezier curves guarantees that if all control points lie within a safe region, the entire curve will avoid obstacles, making it ideal for applications in robot technology where safety is paramount.

To formulate the path smoothing problem, we consider a global path consisting of \( M+1 \) waypoints \( \mathbf{w}_j \) for \( j = 0, \dots, M \). The smoothed path is represented by \( M \) segments of quintic Bezier curves, with the optimization variables being the control points of each segment. Let \( \mathbf{X}_i = [\mathbf{P}_0^i, \mathbf{P}_1^i, \dots, \mathbf{P}_5^i]^T \) for the \( i \)-th segment, and the full variable vector is \( \mathbf{X} = [\mathbf{X}_1^T, \mathbf{X}_2^T, \dots, \mathbf{X}_M^T]^T \), resulting in \( 12M \) variables. The objective function aims to minimize the integral of squared curvature and its derivative, promoting smoothness:

$$ J = \sum_{i=1}^{M} \int_0^{L_i} \left[ w_1 \left( \frac{d^2 \mathbf{S}_i}{dl^2} \right)^2 + w_2 \left( \frac{d^3 \mathbf{S}_i}{dl^3} \right)^2 \right] dl $$

where \( L_i \) is the length of the \( i \)-th segment, and \( w_1 \), \( w_2 \) are weight coefficients. By parameterizing with \( u_i = l / L_i \), this simplifies to a quadratic form in terms of the control points, facilitating efficient optimization. Linear equality constraints enforce continuity between segments:

$$ \mathbf{S}_i(1) = \mathbf{S}_{i+1}(0), \quad \mathbf{S}_i'(1) = \mathbf{S}_{i+1}'(0), \quad \mathbf{S}_i”(1) = \mathbf{S}_{i+1}”(0) $$

Safety constraints are imposed by ensuring that control points lie within rotated rectangles constructed around the original path segments. These rectangles are derived from the obstacle map and expanded to maximize free space. For a rectangle with vertices \( \mathbf{R}_0, \mathbf{R}_1, \mathbf{R}_2, \mathbf{R}_3 \), the linear inequalities for a control point \( \mathbf{P} = [p_x, p_y]^T \) are:

$$ \begin{bmatrix}
(R_{1y} – R_{0y}) & -(R_{1x} – R_{0x}) \\
(R_{2y} – R_{1y}) & -(R_{2x} – R_{1x}) \\
(R_{3y} – R_{2y}) & -(R_{3x} – R_{2x}) \\
(R_{0y} – R_{3y}) & -(R_{0x} – R_{3x})
\end{bmatrix}
\begin{bmatrix}
p_x \\
p_y
\end{bmatrix}
\leq
\begin{bmatrix}
R_{0x} R_{1y} – R_{1x} R_{0y} \\
R_{1x} R_{2y} – R_{2x} R_{1y} \\
R_{2x} R_{3y} – R_{3x} R_{2y} \\
R_{3x} R_{0y} – R_{0x} R_{3y}
\end{bmatrix} $$

This results in a quadratic programming (QP) problem:

$$ \min_{\mathbf{X}} \frac{1}{2} \mathbf{X}^T \mathbf{G} \mathbf{X} + \mathbf{g}^T \mathbf{X} \quad \text{subject to} \quad \mathbf{C}_E \mathbf{X} = \mathbf{c}_e, \quad \mathbf{C}_I \mathbf{X} \leq \mathbf{c}_i $$

where \( \mathbf{G} \) and \( \mathbf{g} \) define the quadratic objective, and \( \mathbf{C}_E \), \( \mathbf{c}_e \), \( \mathbf{C}_I \), \( \mathbf{c}_i \) represent linear equality and inequality constraints. To handle the dependency on segment lengths \( L_i \), we employ an iterative algorithm: initialize \( L_i \) as the straight-line distances between waypoints, solve the QP, update \( L_i \) based on the optimized curve lengths, and repeat until convergence. This approach efficiently finds a globally optimal solution, leveraging the convexity of the QP problem.

The integration of this smoothing algorithm into robot technology systems enhances navigation by producing paths that are both smooth and safe. For instance, in simulations using the Stageros simulator, the algorithm processes a piecewise linear path through a maze-like environment, generating a smoothed trajectory that avoids obstacles while maintaining continuous curvature. The iterative QP solver, implemented with tools like OSQP, converges rapidly, typically in under 10 milliseconds for problems with 84 variables, demonstrating its suitability for real-time applications in robot technology.

To evaluate performance, we compare the smoothed path with one generated by Autoware’s method, which uses dense discrete points and nonlinear optimization. Our Bezier-based approach ensures safety by constraining the path within obstacle-free zones, whereas Autoware’s method may not guarantee collision avoidance. The smoothness metric, defined as the sum of squared second differences of discrete points along the path, yields a value of 0.007 for our method versus 0.1 for the piecewise linear path, indicating a significant improvement. This underscores the role of advanced curve parameterization in advancing robot technology for autonomous navigation.

In summary, the quintic Bezier curve-based smoothing algorithm provides a robust solution for path optimization in robot technology. By formulating the problem as a convex QP and employing iterative refinement, it achieves high computational efficiency and path quality. Future work could extend this to dynamic environments or incorporate velocity profiles for holistic trajectory planning. As robot technology continues to evolve, such methods will be pivotal in enabling seamless and intelligent robot operations across diverse domains.

Comparison of Path Smoothing Methods
Method Smoothness Metric Safety Guarantee Computation Time (ms)
Piecewise Linear Path 0.1 No N/A
Autoware Smoothing 0.05 No ~50
Proposed Bezier Method 0.007 Yes <10

The algorithm’s pseudocode is summarized below, illustrating the iterative optimization process that underpins its efficiency in robot technology applications:

Iterative Quadratic Programming for Path Smoothing
Step Description
1 Input: Waypoints \( \mathbf{w}_i \) for \( i = 0, \dots, M \)
2 Initialize segment lengths \( L_i \) as straight-line distances
3 Set tolerance \( \text{diff\_tolerance} \), max iterations \( \text{iter\_max} \)
4 While \( \text{diff} > \text{diff\_tolerance} \) and \( \text{iter} < \text{iter\_max} \):
5 Solve QP to obtain new control points \( \mathbf{X}_{\text{new}} \)
6 Update \( L_i \) based on curve lengths from \( \mathbf{X}_{\text{new}} \)
7 Compute difference \( \text{diff} = \| \mathbf{X}_{\text{new}} – \mathbf{X} \| \)
8 Increment iteration counter
9 Output: Optimized control points \( \mathbf{X} \)

Through this work, we highlight how quintic Bezier curves can be harnessed to push the boundaries of robot technology, offering a practical and mathematically sound approach to path smoothing. The synergy between curve properties and optimization techniques exemplifies the innovation driving modern robot technology forward, ensuring that autonomous systems can navigate complex environments with precision and reliability.

Scroll to Top