← Back to projects

MPC Trajectory Tracking & Roll Avoidance

A real-time nonlinear model-predictive controller that plans and tracks trajectories for a three-wheeled autonomous pod, keeping it stable at the edge of vehicle dynamics. Structured and unstructured local planning, closed-loop in the CARLA simulator.

NMPCRoll Avoidance Vehicle Dynamicsacados CARLAMotion Planning

Plan a path, respect the vehicle

The vehicle

A tadpole pod

A lightweight three-wheeled vehicle — two steered wheels at the front, one at the rear. Its narrow track and single rear contact patch make grip and rollover the central stability concern, so the controller has to plan against those limits directly.

The problem

Safety at the edge

Track a planned path accurately while staying inside tire grip, steering and force limits, and — critically — a lateral-acceleration envelope that keeps the pod from tipping. Every constraint is re-evaluated at a 20 ms control rate.

The approach

Plan, then optimize

A local planner proposes a drivable path; the NMPC optimizes steering and longitudinal force over a short horizon to follow it, subject to the friction and roll limits; an allocation layer maps the result onto the vehicle.

The rest of the stack

🎯

Pose-tracking NMPC

An 11-state predictive controller tracks cross-track error, heading, and speed directly, re-solving a constrained optimization every control step in real time with acados / SQP.

acadosSQPCasADi
⚙️

Friction-ellipse tire model

A combined-slip model couples lateral and longitudinal forces, with per-wheel constraints that keep every tire inside its friction ellipse — grip honoured alongside the roll limit.

Combined slipFriction circle
🧭

Two local planners

A Frenet lattice for structured lane-keeping and overtaking, and a Hybrid A* search for unstructured obstacle fields and tight maneuvers — both feeding the same NMPC through one path interface.

FrenetHybrid A*
📉

Offset-free longitudinal

A disturbance observer estimates unmodeled road load and feeds it back, so speed tracking stays accurate despite plant/simulator mismatch.

Disturbance obs.Speed tracking

Running in CARLA

Closed-loop demos with the live telemetry dashboard — the pod tracking its planned path in CARLA next to real-time plots of speed, steering, curvature, tracking error, and per-wheel friction utilization.

Live telemetry & CARLA — speed, steering, curvature, tracking error, and the friction circle as the pod drives. 
Tracking through curves — the planned path and per-wheel friction utilization as the pod corners. 
CARLA closed-loop telemetry: speed tracking, curvature tracking, steering, lateral acceleration within limits, longitudinal force decomposition, and disturbance estimate over a 50-second run.
50 s closed-loop run at a 9.0 m/s target — speed, curvature, and steering tracking with lateral acceleration held inside the ±3 m/s² envelope.
±3 m/s²
lateral accel
20 ms
solve + control
11
model states
50 s
closed-loop run
← All projects Download Résumé