Python wrapper for TinyMPC.
pip install tinympc
For development installation (optional):
git clone https://github.com/TinyMPC/tinympc-python.git
cd tinympc-python
pip install -e .
The examples/
directory contains several demonstration files:
cartpole_example_one_solve.py
- Single solve for cartpole problemcartpole_example_mpc.py
- MPC implementation for cartpolecartpole_example_mpc_constrained.py
- MPC with constraints
Note: Quadrotor Code generation examples require autograd: pip install autograd
cartpole_example_code_generation.py
- Code generation for cartpolequadrotor_hover_code_generation.py
- Code generation for quadrotor hover- For online hyperparameter tuning, set
ENABLE_ADAPTIVE_RHO = True
in the file
- For online hyperparameter tuning, set
Documentation and examples can be found here.