OCS2
AdvancedOpen-source C++ optimal-control toolbox from ETH Zurich, commonly used for MPC on legged robots.
OCS2 is an open-source C++ toolbox developed by the Robotic Systems Lab (RSL) at ETH Zurich for solving optimal control problems in “switched systems” — systems whose dynamics change as they switch between modes. A legged robot is one example: each leg alternates between stance and swing, and the dynamics change with the contact state. OCS2 provides algorithms including SLQ, iLQR, and multiple-shooting SQP, generates derivatives via automatic differentiation, and uses Pinocchio for rigid-body dynamics, which lets it run nonlinear model predictive control (MPC) in real time. It ships with examples for quadrupeds and mobile manipulators, plus a ROS interface, and underlies many legged-robot MPC projects, including legged_control.
Examplelegged_control uses OCS2 to run nonlinear MPC for a quadruped robot, computing the center-of-mass trajectory and foot forces for the near future, which are then handed to a whole-body controller for execution.
- Also called
- Optimal Control for Switched Systems
- Related
- Nonlinear Model Predictive Control · legged_control (NMPC + WBC framework for legged robots) · ETH Zurich Robotic Systems Lab · Iterative Linear Quadratic Regulator · Pinocchio · Multiple Shooting
- Sources
- leggedrobotics/ocs2 (GitHub)