Git Product home page Git Product logo

mr-tooth / fatrop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meco-group/fatrop

0.0 0.0 0.0 5.04 MB

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.

Home Page: https://meco-group.github.io/fatrop/

License: GNU Lesser General Public License v3.0

C++ 86.28% Python 10.23% C 1.70% CMake 1.80%

fatrop's Introduction

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:

  • high numerical robustness thanks to advanced numerical optimization techniques, inspired by Ipopt
  • fast by exploiting the optimal control problem structure through a specialized linear solver, based on a generalized Riccati recursion
  • effective handling of path equality and inequality constraints, without relying on penalty methods
  • ability to incorporate exact Lagrangian Hessian information
  • ability to be initialized from any, possibly infeasible, solution estimate
  • interfaced to rockit, which is a high-level optimal control problem specification framework, built on top of CasADi

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:

  • it supports fatrop problems in all its generality. For example: multi-stage problems are not supported by the fatrop-rockit-interface
  • it's possible to specify and solve problems directly from c++, no need for generating the .so and .json seperately from python
  • no need for function compilation, function evaluation can be performed in the casadi virtual machine
  • some handy features like custom Jacobian and Hessian expressions for more efficient function evaluation then default casadi AD

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:

  • make sure you're using the newest pip version (pip install --upgrade pip setuptools)

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:

fatrop's People

Contributors

lvanroye avatar wdecre avatar jgillis avatar maximvochten avatar johanubbink avatar ajsat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.