Posts

Showing posts from February, 2025

ocs2 legged robot notes

 https://github.com/matheecs/ocs2_legged_robot_notes OCS2 Installation (Detailed Version) - CSDN Blog Introduction — OCS2 1.0.0 documentation Ubuntu 20.04: OCS2 installation - CSDN blog OCS2 Installation Tutorial: Dependencies and Compilation Steps - CSDN Blog OCS2: Introduction and Application of Real-Time Optimal Control Solver - CSDN Blog

MPC Basics

 an MPC (Model Predictive Control) problem formulation, where the goal is to drive the center of mass (CoM) of a robot to a desired reference position while ensuring it stays within a support polygon and satisfies various constraints (such as position, velocity, and acceleration). Let's break down the terms and the optimization problem. Objective Function: The optimization problem minimizes an objective function that includes: State tracking error : ∑ k = 0 N − 1 ( x k − r k ) T Q ( x k − r k ) \sum_{k=0}^{N-1} (x_k - r_k)^T Q (x_k - r_k) ∑ k = 0 N − 1 ​ ( x k ​ − r k ​ ) T Q ( x k ​ − r k ​ ) : This term minimizes the difference between the current state x k x_k x k ​ and the reference r k r_k r k ​ , weighted by the matrix Q Q Q . ( x N − r N ) T Q N ( x N − r N ) (x_N - r_N)^T Q_N (x_N - r_N) ( x N ​ − r N ​ ) T Q N ​ ( x N ​ − r N ​ ) : Similar to the previous term but for the final state at k = N k = N k = N , with a different weighting matrix Q N Q_N Q N ​ . Control effort ...