Optimal Parking Series Summary - From Sampling to Optimized Trajectory
Optimal Parking combines two kinds of reasoning. RRT* searches for a route through free space, while trajectory optimization turns that route into a smooth sequence that respects the car model and numerical constraints.
The complete flow
The planner can be understood as the following pipeline:
The scenario supplies poses, vehicle dimensions, obstacles, timing, bounds, and weights. The model defines which motions are possible. RRT* supplies a collision-aware route topology. The optimizer then improves that route locally.
The central equations
The vehicle state and input are
The nonlinear model is discretized as
Around the current trajectory, each SQP iteration uses a local approximation:
The QP balances terminal accuracy, reference tracking, control effort, model consistency, and obstacle avoidance.
What each layer contributes
- The bicycle model prevents arbitrary sideways motion.
- RRT* supplies a route when direct interpolation is blocked.
- SQP and QP solving smooth the route and enforce local constraints.
- Bounds and penalties express what the vehicle can safely execute.
- WebAssembly makes the same planner inspectable through an interactive browser interface.
The important design decision is the division of labor. Sampling handles global route discovery; local optimization handles continuous refinement. Neither layer needs to solve the entire problem alone.
Practical reading order
Read Parts 1 and 2 to establish the model and the initial path. Parts 3 and 4 explain the numerical refinement and feasibility conditions. Part 5 follows the implementation into the WebAssembly demo.