## 4 Results and Discussion
While RRTs are highly effective for path planning in static or known environments, they lack the inherent ability to enforce real-time safety constraints, making them less suitable for dynamic or uncertain scenarios. The key distinction between CBF-QP and RRT lies in their primary objectives. CBF-QP prioritizes safety and stability by rigorously enforcing constraints that ensure the system operates within safe bounds. This makes it particularly well suited for autonomous systems operating in dynamic environments, where safety is a critical concern. On the other hand, RRT focuses on path discovery and exploration, making it ideal for applications where the primary challenge is navigating complex, high-dimensional spaces. The performance improvements demonstrated by CBF-QP, as shown in Table 1, highlight its advantages over RRT in terms of settling time, rise time, and steady-state error. These metrics reflect the system's ability to achieve faster and more accurate responses while maintaining stability and safety. The significant reduction in steady-state error, in particular, underscores the precision of the CBF-QP approach in achieving desired trajectories and avoiding deviations caused by external disturbances. Generally, the CBF-QP approach offers a robust and efficient solution for enhancing the performance of WMRs in dynamic environments. By leveraging the strengths of CBFs in enforcing safety constraints and quadratic programming in optimizing control inputs, this approach outperforms traditional methods like RRT in critical performance metrics. While RRT remains a powerful tool for path planning in complex environments, CBF-QP provides a more comprehensive framework for ensuring safety and stability in real-time applications, making it a preferred choice for autonomous systems operating in dynamic and uncertain settings. Table 2 highlights the significant performance improvements achieved by the control barrier function quadratic programming (CBF-QP) approach compared to adaptive model predictive control (AMPC) for wheeled mobile robots (WMRs). The results demonstrate substantial enhancements across key metrics: the WMR's position and velocity improved by 42% and 54%, respectively, while the control effort gain saw a remarkable improvement of 90%. Furthermore, the rise time for position improved by 58%, for velocity by 61%, and for control effort gain by 92%. Additionally, the steady-state error for position improved by 98%, for velocity by 99%, and for control effort gain by 94% when using CBF-QP over AMPC. These improvements underscore the superior efficiency and precision of the CBF-QP approach in optimizing the performance of WMRs. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{\begin{tabular}{c} **Specification** \\ **of WMR** \\ \end{tabular} } & \multicolumn{3}{c}{**WMR with CBF-QP**} & \multicolumn{3}{c}{\begin{tabular}{c} **WMR with Rapidly Exploring** \\ **Random Tree (RRT)**[26] \\ \end{tabular} } & \multicolumn{3}{c}{**\% Change in CBF-QP over RRT**} \\ \cline{2-10}  & \begin{tabular}{c} **Settling** \\ **Time (s)** \\ \end{tabular} & \begin{tabular}{c} **Rise** \\ **Time (s)** \\ \end{tabular} & \begin{tabular}{c} **Error** \\ **(s)** \\ \end{tabular} & \begin{tabular}{c} **Settling** \\ **Time (s)** \\ \end{tabular} & \begin{tabular}{c} **Size Time** \\ \end{tabular} & \begin{tabular}{c} **Error** \\ **(s)** \\ \end{tabular} & \begin{tabular}{c} **Settling** \\ **Time (s)** \\ \end{tabular} & \
\begin{tabular}{c} **Rise Time** \\ \end{tabular} &
\begin{tabular}{c} **Error** \\ **(s)** \\ \end{tabular} \\ \hline Position (m) & 0.98 & 0.67 & 0.005 & 1.1 & 1.02 & 0.02 & 11\% & 34\% & 75\% \\ \hline Velocity (m/s) & 0.88 & 0.66 & 0.003 & 1.2 & 1.05 & 0.5 & 27\% & 37\% & 99\% \\ \hline Control gain (J) & 10 & 9 & 0.05 & 20 & 22 & 0.7 & 50\% & 59\% & 93\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparisons of CBF and RRT.