Skip to main content

Direct Collocation

Key Insight

For underactuated systems like the CartPole, finding a trajectory that respects the system's physical dynamics is extremely difficult using geometric planners alone. Direct collocation solves this by discretizing both the robot's states and control inputs, enforcing the dynamics equations as algebraic constraints at collocation points, and solving the resulting problem using IPOPT. This project plans a cart-pole swing-up maneuver to show how optimization can discover complex dynamic maneuvers, which are then stabilized near the upright setpoint using a local LQR controller.