Skip to content
This a c++ implementation of a Time Invariant Linear Model Predictive Controller (LMPC) done in C++14 with python bindings
Branch: master
Clone or download
Latest commit bbee95e Feb 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
binding/python Windows compatible. Dec 7, 2018
cmake @ a921f1e Add cmake as submodule. Dec 7, 2018
doc Correction of the docs Apr 7, 2017
include LSSOL now passes the test. Feb 12, 2019
src Fix warning Feb 12, 2019
tests
.gitignore add a gitignore (build, build config file, some backup files from com… Jun 14, 2017
.gitmodules Add cmake as submodule. Dec 7, 2018
AUTHORS Update name. Feb 6, 2019
CMakeLists.txt Add debug library. Feb 18, 2019
COPYING Add license. Oct 24, 2016
COPYING.LESSER Add license. Oct 24, 2016
README.md Windows compatible. Dec 7, 2018

README.md

Copra

Copra (Control & preview algorithms) is a C++ library implementing linear model predictive control. It relies on quadratic programming (QP) solvers. Python bindings are available.

Installation

Compilation has been tested on Linux (gcc/clang).

Dependencies

Optional

Building from source on Linux

The library assumes you are compiling C++14 by default:

git clone --recursive git@github.com:stephane-caron/Copra.git
cd Copra
mkdir build && cd build
cmake ..
ccmake .  # configure e.g. PYTHON_BINDINGS or BUILD_CXX_TESTS
make -j4
sudo make install

Take a look at the c++11-back-compatibility branch if you'd rather compile for C++11.

Testing

C++ tests will be compiled in your build folder if you enabled the BUILD_CXX_TESTS option:

cd build/tests
./TestSolvers --log_level=all
./TestLMPC --log_level=all

Once Python bindings are installed, you can check them with:

cd binding/python/tests
python TestMPController.py

Documentation

Doxygen files will be compiled into <install_path>/share/doc/mpc/doxygen-html/. Open the index.html file in your web browser. You can also check out unit tests, as well as the following two examples:

You can’t perform that action at this time.