Abstract
Autonomous waypoint tracking is a fundamental problem in mobile robotics, especially for differential-drive platforms with limited turning capabilities. Classical controllers assume that the robot can always geometrically align with the target. However, this fails in tight configurations where the required turning radius exceeds physical limits. To address this, a reverse-capable planner based on single-goal pursuit is proposed. The system uses a Finite State Machine (FSM) to initiate controlled reverse maneuvers and velocity modulation strategies to protect physical components.
1. Introduction
Navigating through complex and crowded environments is a common requirement for modern mobile robots. In the case of differential-drive and skid-steer platforms, the efficiency of path execution is strongly influenced by the vehicle’s physical motion limitations [1,2]. Standard path-tracking algorithms, such as “Pure Pursuit” [3] or “Stanley” controllers [4], are widely recognized as industry standards for forward motion tracking, but they show significant vulnerabilities when operating in limited environments. These algorithms especially struggle when the targeted waypoint is placed directly “behind” the robot’s current position, or when a smaller turning radius is required than the platform’s physical capabilities allow. In such cases, classical controllers are most likely to start aggressive or oscillatory maneuvers that place serious stress on the drivetrain and fail to reach the target [5,6].
This paper presents a reliable software solution implemented in the Robot Operating System 2 (ROS 2) [7] ecosystem to overcome these limitations. The project contains three main components with different functions: a dead-reckoning model for constant pose estimation, a Finite State Machine (FSM) for path logic and reverse maneuver management, and a visualization channel for detailed evaluation. The most important part of the three is a feasibility-check logic that mathematically evaluates the robot’s position to the target. If an impossible turn is detected, the framework autonomously interrupts forward motion, then engages a structured reversing sequence to re-align the vehicle with the waypoint. After it is lined up again, the platform resumes forward pursuit without drastic, oscillating maneuvers.
2. System Simulation and Pose Estimation
For precise waypoint tracking, the perception of the robot’s current position is highly important. With the purpose of simulating the vehicle’s movement and providing high-frequency pose data, a kinematic model was created and embedded as the TwistToTFNode in the ROS 2 framework.
2.1. Dead-Reckoning Kinematics
The node estimates the robot’s position by reading the linear velocity (v) and angular velocity (ω) from the /cmd_vel topic. A timer running at 20 Hz (0.05 s intervals) continuously adds these values to determine the robot’s translational and rotational movement over time. Based on standard discrete-time kinematic equations [8], the state variables (x, y, θ) are updated at each cycle. The resulting pose estimate is then used to generate the coordinate transform (TF) between the global map frame and the robot’s local base_link frame.
2.2. Safety Mechanisms and Coordinate Transformation
Signal drops can happen at any time, so to preserve stability and prevent unconstrained virtual motion, a timeout failsafe is built directly within the integration loop. If the node goes more than a full second without catching a new Twist message, it intervenes immediately. The code overrides the currently active velocities, hard resetting both v and ω to 0.0 to stabilize the platform.
To be compatible with ROS 2, the calculated yaw angle (θ) is transformed into a unit quaternion (qw, qx, qy, qz) utilizing Euler-to-quaternion functions. Broadcasting this conversion to the TF tree gives all subsequent planning nodes access to a synchronized, continuous pose estimation (Figure 1).
Figure 1.
Block diagram of the TwistToTFNode illustrating the dead-reckoning integration pipeline and the temporal failsafe mechanism.
3. Route Planning and FSM Control
The path execution logic is controlled by the FeasiblePlannerFSM node, which connects path tracking with complex maneuvering. Operating at a 0.05 s step interval, the node extracts the current robot position (rx, ry) and yaw angle from the TF buffer and decides the necessary control inputs to reach a set of predefined goal poses published on the pursuit goal topic.
3.1. Targeting and Feasibility Logic
The planner first calculates the Euclidean distance (d) to all the waypoints, then targets the closest one. After the distance falls below the tolerance of 0.10 m, the point will be flagged as reached and no longer between the desired destinations. Then the process starts again by finding the closest point.
The planner first checks whether the target can be reached by using forward movement. Before calculating velocity commands, the system computes the relative heading error (α), normalized between −π and π. To determine if a forward turn is physically possible, a dynamic maximum angle threshold (θmax) is computed based on the distance to the target (d) and the physical track width of the robot (0.63 m). If the absolute value of the heading error |α| is less than or equal to θmax, the path is deemed geometrically feasible. If the target is too close but requires a sharp turn, the threshold tightens, eventually causing the feasibility check to fail and triggering the FSM to shift into a reversing state to create more room to move (Figure 2).
Figure 2.
The flow of feasibility logic. The system calculates the threshold (θmax) based on distance and track width to determine if a reverse maneuver is necessary.
3.2. Finite State Machine (FSM) Architecture
Sudden turns and dead stops could damage the robot, so to address this issue, the planner utilizes a Finite State Machine (FSM) containing six distinct states (Figure 3):
- FORWARD: The default state. The robot navigates towards the target using proportional heading control. If the target becomes unfeasible due to a relative to a short distance, the FSM transitions to the delay phase.
- FORWARD_TO_REVERSE_DELAY: This state zeroes out all velocity commands and stops the platform for 0.5 s, allowing the physical motors to fully decelerate, preventing drivetrain damage.
- REVERSE_ACCEL: A 0.2 s acceleration window where the reverse speed ramps up to a preset cruising velocity (vreverse = −0.5 m/s).
- REVERSE_CRUISE: The robot drives backwards while continuing to calculate the feasibility of the target. Dead reckoning tracks the reverse travel distance. The system only exits this state when the target becomes mathematically feasible again AND the robot has reversed a minimum safety distance of 0.20 m (min_reverse_dist).
- REVERSE_SLOW_PHASE: A deceleration phase with a duration of 0.5 s. The reverse velocity decreases linearly with the elapsed time, ensuring a controlled stop of the backward movement.
- REVERSE_TO_FORWARD_DELAY: Another 0.5 s pause before the platform returns to the FORWARD state target pursuit.
Figure 3.
State transition diagram of the Finite State Machine detailing the controlled deceleration, reversing, and recovery sequence.
3.3. Velocity and Steering Control
While being in the FORWARD pursuit state, the vehicle’s speed is controlled based on its orientation to ease tight turning. If the angle error |α|of the platform’s current heading direction exceeds an angle_threshold of 15.0°, a multi-level deceleration logic is engaged based on the distance to the target.
- If d ≤ 0.25 m (slow_radius_inner), the speed is multiplied by a rigid factor of 0.35 (slow_factor_inner).
- If 0.25 m < d ≤ 0.5 m (slow_radius_outer), the speed scale is linearly interpolated between 0.35 and 0.65 (slow_factor_outer).
- Outside this radius, full forward speed (vforward = 0.5 m/s) is maintained.
Angular velocity (ω) is calculated to strictly adhere to the skid-steer mechanical limits. To provide smooth convergence, the final command is formed by a smooth mathematical function coupled with a proportional gain (Kp = 2.0). This bounding methodology acts as a linear proportional controller for small errors while smoothly saturating at maximum rotational speed for large errors, preventing actuator over-saturation and preserving mathematical stability.
4. Visualization and Trajectory Evaluation
To evaluate the planner’s performance and provide real-time debugging capabilities, a supplementary ROS 2 node, PathVisualizer, was developed. This node fulfills two primary roles: waypoint management and graphical rendering.
The node initializes with a specific set of complex coordinates designed to push the reverse FSM to its limits. By plotting tight transitions—such as moving from (1.80, 0.00) to (2.00, 0.20) and then sharply to (2.00, 1.60)—the path creates an impossible turning radius. Because forward-only navigation physically cannot clear this configuration, the robot is forced to execute a reverse maneuver.
The static goal list is published by the node as a PoseArray at 1 Hz, and at the same time, rendering RViz-compatible visual markers (MarkerArray) at 10 Hz. The visualizer generates a SPHERE_LIST marker, which highlights the exact target coordinates on the global map. The node continuously monitors the base_link transformation relative to the map frame and stores the historical coordinates in a dynamically expanding array. This historical path is then published as a continuous green LINE_STRIP marker, resulting in a trail of the vehicle’s exact executed trajectory (Figure 4).
Figure 4.
Visualized trajectory in RViz. Orange spheres represent the global waypoints, while the continuous green line demonstrates the actual path executed by the robot, including a reverse maneuver to navigate a tight configuration.
5. Conclusions
A reverse-capable route planner architecture is exhibited in this work, designed for differential-drive and skid-steer robots that must navigate through confined environments. The system successfully links the gap between pure mathematical pursuit models and physical kinematic limits using ROS 2 and a modular Python 3.10 architecture. The continuous dead-reckoning pose estimator, actively coupled with a multi-stage Finite State Machine, allows the vehicle to autonomously recognize unfeasible tight-turn scenarios, and instead of failing or executing damaging oscillations, the system gracefully decelerates, reverses to gain clearance, and resumes tracking. The built-in velocity and steering controls ensure the hardware’s physical condition. This hybrid route planner provides a reliable and practical solution for autonomous waypoint tracking.
Author Contributions
Conceptualization, I.M.; methodology, I.M. and K.R.; software, I.M.; validation, I.M. and K.R.; writing—original draft preparation, I.M.; writing—review and editing, K.R. All authors have read and agreed to the published version of the manuscript.
Funding
Project no. 2022-2.1.1-NL-2022-00012 has been implemented with the support provided by the Ministry of Culture and Innovation of Hungary from the National Research, Development and Innovation Fund, financed under the National Laboratories funding scheme.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
All source code, including the kinematic models, the FSM logic, and the visualization tools, are freely available in an open-source repository to support further research in mobile robotics control architectures. The public git repository can be found at this link: [https://github.com/I-Milan/Reverse_route_planner.git] (accessed on 22 September 2026).
Acknowledgments
During the preparation of this manuscript/study, the authors used the AI tool (large language model) for the purposes of language editing, grammar corrections, and stylistic improvements during the preparation of the text. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Balkcom, D.J.; Mason, M.T. Time optimal trajectories for bounded velocity differential drive vehicles. Int. J. Robot. Res. 2002, 21, 199–217. [Google Scholar] [CrossRef] [Scilit]
- Chitsaz, H.; LaValle, S.M.; Balkcom, D.J.; Mason, M.T. Minimum wheel-rotation paths for differential-drive mobile robots. Int. J. Robot. Res. 2009, 28, 66–80. [Google Scholar] [CrossRef] [Scilit]
- Coulter, R.C. Implementation of the Pure Pursuit Path Tracking Algorithm; Technical Report CMU-RI-TR-92-01; Carnegie Mellon University: Pittsburgh, PA, USA, 1992. [Google Scholar]
- Thrun, S.; Montemerlo, M.; Dahlkamp, H.; Stavens, D.; Aron, A.; Diebel, J.; Fong, P.; Gale, J.; Halpenny, M.; Hoffmann, G.; et al. Stanley: The robot that won the DARPA Grand Challenge. J. Field Robot. 2006, 23, 661–692. [Google Scholar] [CrossRef] [Scilit]
- Bhattacharya, S.; Murrieta-Cid, R.; Hutchinson, S. Path planning for a differential drive robot: Minimal length paths—A geometric approach. In Proceedings of the 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Sendai, Japan, 28 September–2 October 2004; pp. 2793–2798. [Google Scholar]
- Rodríguez-Molina, A.; Herroz-Herrera, A.; Aldape-Pérez, M.; Flores-Caballero, G.; Antón-Vargas, J.A. Dynamic path planning for the differential drive mobile robot based on online metaheuristic optimization. Mathematics 2022, 10, 3990. [Google Scholar] [CrossRef] [Scilit]
- Macenski, S.; Foote, T.; Gerkey, B.; Lalancette, C.; Woodall, W. Robot Operating System 2: Design, architecture, and uses in the wild. Sci. Robot. 2022, 7, eabm6074. [Google Scholar] [CrossRef] [Scilit]
- Siegwart, R.; Nourbakhsh, I.R.; Scaramuzza, D. Introduction to Autonomous Mobile Robots, 2nd ed.; MIT Press: Cambridge, MA, USA, 2011; pp. 45–65. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.



