preview_controller is a library implementing a model preview controller. It uses QP softwares to solve its problem. A python binding is available.
To compile you need the following tools:
- Git
- CMake >= 2.8
- pkg-config
- doxygen
- c++ compiler It must compile C++11 but C++14 is recommended
- gfortran
- gcc
- Eigen >= 3.2
To have more qp solver:
- eigen-qld
- GUROBI >= 4.0
- eigen-gurobi Also compatible with the LSSOL QP Solver. Unfortunately this not under public license.
To generate the documantation:
To have python bindings and unit tests
- Boost >= 1.58 (>= 1.21 should work)
git clone --recursive https://github.com/vsamy/preview_controller
cd preview_controller
./build_and_install
gedit build_and_install_config
./build_and_install
Please defines in build_and_install_config where to install the library, the build type, the number of core, etc... Note that you leave the BOOST_ROOT empty if boost has been installed by default.
If you don't want to compile the python bindings you need to
set the variable PYTHON_BINDINGS
to false (default is true).
If you want to compile the C++ unit tests, you need to set
the variable BUILD_CXX_TESTS
to true (default is false).
git clone --recursive https://github.com/vsamy/preview_controller
cd preview_controller
git checkout c++11-back-compatibility
./build_and_install
gedit build_and_install_config
./build_and_install
Please defines in build_and_install_config where to install the library, the build type, the number of core, etc... Note that you leave the BOOST_ROOT empty if boost has been installed by default.
You can test the C++ and python version. Those are still basic tests and need to be completed
For c++
cd _build/tests
./TestSolvers --log_level=all
./TestPreviewControl --log_level=all
For python
cd binding/python/tests
python TestPreviewControl.py
You have access to the doxygen files.
Those files are in <install_path>/share/doc/mpc/doxygen-html/
.
Open the index.html
file in your web browser.
Plus you can find detailed information here
Please see here for an example. You can also check the tests folder.