Embodied AI Glossary中文

Direct Collocation

直接配点法Advanced

Cutting a trajectory into nodes, writing the dynamics as constraints between nodes, and turning the whole thing into one big optimization problem.

Direct collocation is one of the most common ‘transcription’ methods in trajectory optimization, proposed by Hargraves and Paris in 1987, and it works by turning a continuous-time optimal control problem into a finite-dimensional nonlinear program (NLP). Time is cut into N segments, with the state x_k and control u_k at every node treated as optimization variables, connected between nodes by polynomials (commonly piecewise-linear control and cubic-spline state); the polynomial's derivative is then required to match the dynamics ẋ = f(x, u) at collocation points (often the segment midpoints), with these equality constraints enforcing physical validity. Shooting methods optimize only the control, with the state obtained by simulating forward, which becomes very sensitive to the initial guess over a long horizon; collocation treats the state as a variable too, so an initial guess can be sketched freely, state constraints are easy to add, and the resulting problem is sparse, suiting solvers like IPOPT or SNOPT. The drawback is more variables, and the trajectory partway through solving may not satisfy the dynamics at all. Multiple shooting sits between the two approaches.

ExampleSwinging up a cart-pole: cut the whole time span into nodes, with the cart position, pole angle, velocities, and applied force at each node as variables, constraints requiring adjacent nodes to satisfy the dynamics and the pole to end upright, and the objective minimizing total squared force — solving gives a swing-up trajectory. Matthew Kelly's introductory tutorial in SIAM Review focuses on exactly this method, and Drake includes a ready-made DirectCollocation class.

Also called
Collocation Method
Related
Trajectory Optimization · Multiple Shooting · Sequential Quadratic Programming · Contact-Implicit Trajectory Optimization · Drake · Interior Point OPTimizer (Ipopt)
Sources
Underactuated Robotics (Tedrake), Ch. Trajectory Optimization
Drake: DirectCollocation Class Reference
Matthew Kelly: Trajectory Optimization tutorials

See it in the full glossary →