Robot control
Direct collocation
Definition
Direct collocation is a trajectory-optimization method that represents states and controls at selected time points and enforces the dynamics through algebraic constraints at collocation points. It converts a continuous optimal-control problem into a finite nonlinear program.
Also known as: Direct collocation method
Updated
Optimize a sampled continuous trajectory
Direct collocation treats sampled states, sampled controls, and sometimes time intervals as decision variables. Polynomial segments interpolate between the samples. Constraints require the interpolated derivative to agree with the robot dynamics at selected collocation points.
MIT's trajectory-optimization notes describe a common formulation with piecewise-linear controls, cubic state splines, and midpoint derivative constraints. The optimizer can also include boundary conditions, torque limits, collision constraints, and task costs.
For a legged robot, direct collocation can search for joint and body trajectories that move between poses while respecting a chosen contact model. For an arm, it can optimize a swing, throw, or other motion in which dynamics and actuator limits matter.
How it differs from shooting
Direct shooting chooses controls and obtains states by forward simulation. Direct collocation exposes both states and controls to the optimizer and enforces dynamics as constraints. This usually creates a larger but sparse optimization problem. It can also make state constraints easier to express and reduce the long sensitivity chains that can make shooting difficult.
Direct collocation is one method within trajectory optimization, not a synonym for the whole field. Pseudospectral methods use related collocation ideas with global polynomial bases, while differential dynamic programming follows a different local optimization procedure.
Discretization and local minima remain
The dynamics hold exactly only at the enforced points for the chosen transcription. A coarse mesh may hide violations between them, so the resulting motion should be checked by denser simulation and, where needed, mesh refinement.
The nonlinear program can converge to a poor local solution or fail from a bad initial guess. Contact adds mode choices, complementarity conditions, and numerical stiffness. A solver result is therefore a candidate trajectory under an approximate model, not proof that the physical robot can execute it safely.
Sources
Related terms
Trajectory optimization
Trajectory optimization finds a time-varying motion, and often control inputs, that minimizes an objective while satisfying specified constraints. Robot applications can include geometric, kinematic, and dynamic constraints.
Contact-implicit optimization
Contact-implicit optimization plans motion while allowing contact events and forces to emerge from contact constraints in the optimization. It avoids requiring every contact transition to be fixed in a predefined mode sequence.
Differential dynamic programming
Differential dynamic programming is a local optimal-control method that repeatedly approximates dynamics and cost around a nominal trajectory, performs a backward pass to compute control updates and feedback gains, and rolls the result forward through the dynamics.
Motion planning
Motion planning finds a robot movement from an initial state to a goal while satisfying constraints such as collision avoidance. A planner may produce a geometric path, a timed trajectory, or a sequence of controls.