Skip to content
Projects

About

Fatrop is a high performance nonlinear optimization solver for optimal control and robotics

Science & Engineering

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+2
in 15 days
+2
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

FATROP

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

$$ \begin{align} \underset{\mathbf{x}_k, \mathbf{u}k}{\min} \quad & \sum{k=0}^{K-1} l_k(\mathbf{u}_k, \mathbf{x}k) \ \text{subject to} \quad & \mathbf{x}{k+1} = \mathbf{f}_k(\mathbf{u}_k, \mathbf{x}_k), \quad k = 0, \dots, K-2 \ & \mathbf{L}_k \leq \mathbf{g}_k(\mathbf{u}_k, \mathbf{x}_k) \leq \mathbf{U}_k \ & \mathbf{h}_k(\mathbf{u}_k, \mathbf{x}_k) = \mathbf{0}, \quad k = 0, \dots, K-1 \end{align} $$

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
  • high performance linear algebra through integration of BLASFEO
  • 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
  • support for optimization over manifolds (Lie groups): primal variables can live on a manifold while the search direction lives in the tangent space, recovered via a user-supplied retraction

Other problem classes

In addition to the OCP interface above, Fatrop also exposes two general-purpose NLP interfaces that reuse the same interior-point algorithm:

Dense: general nonlinear programs, suitable for small-scale dense problems such as inverse kinematics, PnP, and point cloud alignment.

$$ \begin{align} \underset{\mathbf{x}}{\min} \quad & f(\mathbf{x}) \ \text{subject to} \quad & \mathbf{g}\text{eq}(\mathbf{x}) = \mathbf{0} \ & \mathbf{L} \leq \mathbf{g}\text{ineq}(\mathbf{x}) \leq \mathbf{U} \end{align} $$

Graph: block-sparse NLPs whose Hessian sparsity is described by a user-supplied adjacency graph. Suitable for problems such as SLAM and bundle adjustment. Equality constraints are not supported; inequality constraints are block-local (each depending on a single variable block):

$$ \begin{align} \underset{\mathbf{x}0, \dots, \mathbf{x}{N-1}}{\min} \quad & f(\mathbf{x}0, \dots, \mathbf{x}{N-1}) \ \text{subject to} \quad & \mathbf{L}{k} \leq \mathbf{g}{k}(\mathbf{x}k) \leq \mathbf{U}{k}, \quad k = 0, \dots, N-1 \end{align} $$

Demo

See Fatrop in action in the Fatrop Playground: it runs Fatrop directly in your browser, compiled to WebAssembly, solving optimal control problems on a set of dynamical systems.

Getting Started

Refer to the Fatrop GitHub Pages as a reference to help getting started.

Usage

  • Fatrop can be used using the "low-level" interface by implementing an OcpAbstract class. See include/fatrop/ocp/ocp_abstract.hpp
  • Fatrop is also interfaced with CasADi. A usage example can be found here
  • usage examples of both interfaces can be found in the examples folder

Getting Started

Refer to github pages as a reference to help getting started.

Citing

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

@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}
}

Explore related projects

Loading…