DFL-QP Unicycle

A Relaxed Quadratic-Program-based Framework for Trajectory Tracking of Unicycle Robots with Singularity Avoidance

A time-invariant relaxed dynamic-feedback-linearization controller for unicycle robots that tracks trajectories through zero velocity and direction reversal.

Hamza Tariq, Usman Ali, and Adeel Akhtar

Hamza Tariq and Adeel Akhtar are with the Department of Mechanical and Industrial Engineering, New Jersey Institute of Technology, Newark, NJ, USA.
Usman Ali is with the School of Engineering and Sustainable Development, De Montfort University, Leicester, UK.
DFL-QP TurtleBot3 trajectory tracking animation
ROS 2--Gazebo simulation of the proposed DFL-QP controller on a TurtleBot3 Waffle robot. The controller remains well defined through zero-velocity stop-and-reverse maneuvers.

Abstract

Dynamic feedback linearization (DFL) is a classical technique for trajectory tracking of unicycle-type mobile robots, but the resulting controller becomes singular when the linear velocity vanishes. This makes standard DFL-based controllers unsuitable for stop-and-reverse maneuvers. This paper proposes a quadratic-programming-based optimal control framework that avoids this singularity while establishing local Lipschitz continuity of the resulting feedback law. The proposed method reformulates the DFL constraints as an equality-constrained QP with a slack variable, ensuring feasibility for all states and reference signals, including zero-velocity configurations. By introducing tunable slack and acceleration-bias terms, the controller avoids singular configurations for a large class of reference trajectories. The approach is validated through ROS 2--Gazebo simulations on a TurtleBot3 Waffle robot.

Method

The standard DFL controller for the dynamically extended unicycle relies on the decoupling matrix \(D(x)\), whose determinant is \(-x_4\). Hence, the controller becomes undefined at zero translational velocity, exactly when a stop-and-reverse maneuver requires the robot to pass through rest.

The proposed controller relaxes the strict DFL equality by introducing a slack variable \(\delta\):

\[ \begin{aligned} \min_{u,\delta} \quad & \frac{1}{2}u^\top Q u + \frac{1}{2}\delta^\top P\delta + c(x,r)^\top u,\\ \text{s.t.} \quad & D(x)u = \eta(x,r) + \delta . \end{aligned} \]

Key idea

The slack variable keeps the QP feasible even when \(D(x)\) loses rank. A smooth acceleration bias helps the robot escape rest configurations and avoid deadlock while preserving a time-invariant feedback structure.

Main guarantees

  • Feasibility of the relaxed QP at zero velocity.
  • Local Lipschitz continuity of the feedback controller.
  • Uniform ultimate boundedness of the tracking error under the stated assumptions.

Simulation Results

The controller is evaluated in ROS 2--Gazebo using a TurtleBot3 Waffle robot. The experiments compare the proposed DFL-QP controller with a standard DFL baseline on trajectories requiring stop-and-reverse motion.

Proposed DFL-QP controller tracking result

Proposed DFL-QP Controller

The relaxed QP controller tracks through the reversal by allowing the linear velocity to cross zero while keeping the feedback law well defined.

Standard DFL controller tracking result

Standard DFL Baseline

The classical DFL controller loses accuracy near zero velocity because the decoupling matrix becomes singular at rest.

Code and Reproducibility

The full ROS 2 implementation is available in the GitHub repository: gradslab/DFL_QP_Unicycle.

The repository provides a ROS 2 Jazzy implementation of the proposed controller and includes Gazebo simulation results comparing the DFL-QP controller with the standard DFL controller.

Recommended environment

  • Ubuntu 24.04 LTS
  • ROS 2 Jazzy Jalisco
  • Python 3.10--3.12
  • CMake 3.16 or newer
  • Gazebo Harmonic

How to Run

# Clone the repository
git clone https://github.com/gradslab/DFL_QP_Unicycle.git
cd DFL_QP_Unicycle/

# Install system and ROS dependencies
sudo apt update
sudo apt install python3-pip python3-numpy python3-scipy \
                 ros-jazzy-rclpy ros-jazzy-geometry-msgs \
                 ros-jazzy-std-msgs ros-jazzy-nav-msgs \
                 ros-jazzy-tf-transformations

# Install Python optimization and math libraries
pip install qpsolvers osqp scipy numpy

# Build the ROS 2 workspace
colcon build

# In a new terminal, source the workspace
source install/setup.bash

# Launch the Gazebo figure-8 experiment
ros2 launch my_robot_bringup my_robot_gazebo.launch.xml x:=-0.2 y:=0.0 yaw:=3.14159

# In another terminal, run the proposed controller
ros2 run controllers dfl_qp_tracking

# To run the standard DFL baseline instead
ros2 run controllers std_dfl_tracking

BibTeX

@misc{tariq2026relaxeddflqp,
  title        = {A Relaxed Quadratic-Program-based Framework for Trajectory Tracking of Unicycle Robots with Singularity Avoidance},
  author       = {Hamza Tariq and Usman Ali and Adeel Akhtar},
  year         = {2026},
  howpublished = {GitHub repository},
  note         = {\url{https://github.com/gradslab/DFL_QP_Unicycle}}
}