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.
Plan a path, respect 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.
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.
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.
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.
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.
Offset-free longitudinal
A disturbance observer estimates unmodeled road load and feeds it back, so speed tracking stays accurate despite plant/simulator mismatch.
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.