Skip to content
/ ocpy Public

Optimal control solver implemented in Python. SymPy for symbolic differentiation and Numba for fast computation.

License

Notifications You must be signed in to change notification settings

arcuma/ocpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocpy

Overview

Optimal control problem (OCP) solver implemented in Python.

  • DDP (Differential Dynamic Programming)
  • iLQR (iterative Linear Quadratic Regulator)
  • Riccati Recursion

are currently implemented.

Requirements

  • Python3
    • SymPy
    • NumPy
    • SciPy
    • Numba
    • Matplotlib
    • seaborn

Usage

  1. Clone or Download.

    git clone https://github.com/arcuma/ocpy.git

    or "Code" >> "Download ZIP" on this page.

  2. Install Requirements.

    pip3 install -r requirements.txt
  3. Run examples or formulate your own problem.

Examples

In /examples/,

  • LQR
  • cartpole
  • hexacopter
  • pendubot

cartpole hexacopter pendubot

References

  1. D. H. Jacobson and D. Q. Mayne, Differential Dynamic Programming, Elsevier, 1970.

  2. Y. Tassa, T. Erez and E. Todorov, Synthesis and stabilization of complex behaviors through online trajectory optimization, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 4906-4913, 2012.

  3. S. Katayama, Fast Model Predictive Control of Robotic Systems with Rigid Contacts. Kyoto University, 2022.

  4. J. Nocedal and S.J. Wright, Numerical Optimization (2nd ed.). Springer, 2006.