meco-group / fatrop

Fatrop is a nonlinear optimal control problem solver that aims to be fast, support a broad class of optimal control problems and achieve a high numerical robustness.
https://meco-group.github.io/fatrop/
GNU Lesser General Public License v3.0
143 stars 17 forks source link
fatrop kuleuven numerical-optimization optimal-control optimization-algorithms solvers

FATROP

Fatrop is a constrained nonlinear optimal control problem solver that is fast and achieves a high numerical robustness.

The main features of the solver are:

Disclaimer

At this moment the easiest way to get specify fatrop problems is by using the rockit interface. See Install rockit with Fatropy interface for installation instructions. The fatrop-rockit-plugin is not very stable yet, and still under development. Apart form the rockit interface, we are working on a ocp specification framework, especially developed for specifying Fatrop problems. An example is available in the specification branch, spectool/example.cpp.

The spectool has several advantages over the rockit interface:

To compile fatrop with the (beta) spectool make sure to set the CMake flag -DWITH_SPECTOOL=ON. Spectool also requires CasADi to be installed. Currently, we require the casadi/core/function_internal.hpp header, which is installed when CMake flag -DINSTALL_INTERNAL_HEADERS=ON is set when installing CasADi.

Installation instructions

At this moment Fatrop is mainly tested on Ubuntu Linux machines. There are two installation types:

Build and install Fatrop and Fatropy

(Recursively) clone this repository

git clone https://github.com/meco-group/fatrop.git --recursive
cd fatrop

Set the CMake flags, change the BLASFEO target to your system architecture (see table of https://github.com/giaf/blasfeo)

export CMAKE_ARGS="-DBLASFEO_TARGET=X64_AUTOMATIC -DENABLE_MULTITHREADING=OFF"

Build and install the Fatropy project

cd fatropy 
pip install .

Trouble shoot:

Build and install Fatrop only

(Recursively) clone this repository

git clone https://github.com/meco-group/fatrop.git --recursive
cd fatrop

Build and install the Fatrop project

mkdir build
cd build
cmake -DBLASFEO_TARGET=X64_AUTOMATIC ..
make -j

If you want to install Fatrop on your system

sudo make install

For non-x64 targets change the BLASFEO_target parameter according to the table of https://github.com/giaf/blasfeo

Install rockit with Fatropy interface

git clone https://gitlab.kuleuven.be/meco-software/rockit.git
git clone https://gitlab.kuleuven.be/u0110259/rockit_fatrop_plugin.git ./rockit/rockit/external/fatrop
cd rockit
pip install .

Examples

https://gitlab.kuleuven.be/robotgenskill/fatrop/fatrop_rockit_demo

https://gitlab.kuleuven.be/robotgenskill/fatrop/fatrop_benchmarks

Using Fatrop from C++: check file fatrop/executables/RunFatrop.cpp

Citing

To cite Fatrop in your academic work, please use the following reference:

@inproceedings{vanroye2023fatrop,
  title={Fatrop: A fast constrained optimal control problem solver for robot trajectory optimization and control},
  author={Vanroye, Lander and Sathya, Ajay and De Schutter, Joris and Decr{\'e}, Wilm},
  booktitle={2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  pages={10036--10043},
  year={2023},
  organization={IEEE}
}

Developers

Fatrop is developed by Lander Vanroye at the KU Leuven Robotics Research Group under supervision of Wilm Decre.

Contributors: