Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.
Repo symbol

ifopt repository

Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.
Repo symbol

ifopt repository

Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.
Repo symbol

ifopt repository

Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.
Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.
Repo symbol

ifopt repository

ifopt

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2025-03-21
Dev Status MAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ifopt 2.1.4

README

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI

A modern, light-weight, [Eigen]-based C++ interface to Nonlinear Programming solvers, such as [Ipopt] and [Snopt].

An example nonlinear optimization problem to solve is defined as:

</br>

FeaturesInstallExamplesContributePublicationsAuthors

Features

Combines the advantages of [Ipopt] / [Snopt] and [Eigen]:

[Ipopt] / [Snopt] [Eigen]
:heavy_check_mark: high-quality solvers for nonlinear optimization :heavy_check_mark: modern, intuitive formulations of vectors and matrices
:x: C++ API inconvenient and error-prone (raw pointers, index management, jacobian construction) :heavy_check_mark: highly efficient implementations
:x: linking and exporting difficult  
  • Solver independent formulation of variables and constraints with Eigen (highly efficient)
  • Automatic index management by formulation of variable- and constraint-sets
  • Integration: pure cmake find_package(ifopt) or [catkin]/[ROS] (optional)
  • light-weight (~2k lines of code) makes it easy to use and extend

</br>

An optimization problem consists of multiple independent variable- and constraint-sets. Each set represents a common concept, e.g. a set of variables might represents spline coefficients, another footstep positions. Similarly, a constraint-set groups similar constraints together. ifopt allows users to define each of these sets independently in separate classes and then builds the overall problem from these sets. (No more worrying adapting indices when adding or removing sets).

</br>

find x0, x1                              (variable-sets 0 & 1)
s.t
  x0_lower  <= x0 <= x0_upper            (bounds on variable-set x0 \in R^2)

  {x0,x1} = arg min c0(x0,x1)+c1(x0,x1)  (cost-terms 0 and 1)

  g0_lower < g0(x0,x1) < g0_upper        (constraint-set 0 \in R^2)
  g1_lower < g1(x0,x1) < g0_upper        (constraint-set 1 \in R^1)

</br>

Supplying derivative information greatly increases solution speed. ifopt allows to define the derivative of each cost-term/constraint-set with respect to each variable-set independently. This ensures that when the order of variable-sets changes in the overall vector, this derivative information is still valid. These “Jacobian blocks” must be supplied through ConstraintSet::FillJacobianBlock() and are then used to build the complete Jacobian for the cost and constraints.

</br>

A graphical overview as UML can be seen here.

Install

The easiest way to install is through the ROS binaries and you’re all set!

sudo apt-get install ros-<distro>-ifopt

Install dependencies

In case you don’t use ROS or the binaries don’t exist for your distro, you can easily build these packages from source. For this, install the required dependencies [Cmake], [Eigen] and [Ipopt] using

sudo apt-get install cmake libeigen3-dev coinor-libipopt-dev

If you want to link to a local installation of [Ipopt] or to [Snopt], see here.

Build with cmake

  • Install
  git clone https://github.com/ethz-adrl/ifopt.git && cd ifopt
  mkdir build && cd build
  cmake ..
  make
  sudo make install # copies files in this folder to /usr/local/*
  # sudo xargs rm < install_manifest.txt # in case you want to uninstall the above
  

File truncated at 100 lines see the full file

CONTRIBUTING

Contributing to ifopt

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the Code of Conduct. By participating, you are expected to uphold this code.

Question or Issue?

  • ROS Answers: If you want to ask a general usage question, please do this at ROS Answers using the tag ifopt. Asking there has the following advantages:

    • There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher.
    • In the future other users will search there for similar problems and can find your question and the potential answers.
  • Issue tracker: In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go.

How Can I Contribute?

Unsure where to begin contributing to ifopt? You can start by looking through these beginner and help-wanted issues:

  • Good first issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Further ideas might include:

  • writing interfaces to additional solvers
  • reporting bugs
  • enhance documentation
  • add unit tests

Please follow the Google Style Guide when writing your C++ Code for this project.

Submitting a pull request

Please create a pull request from your forked repo to the master branch.

  • Keep pull requests small, focussing on one specific issue.
  • Describe concisely what you are solving and reference the corresponding issue.
  • Include weblinks to relevant information.
  • Include screenshots and animated GIFs in your pull request whenever possible.

We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.

# Contributing to ifopt :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: We are grateful to anyone who decides to actively engage in this project. This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. ## Question or Issue? * [ROS Answers](https://answers.ros.org/questions/scope:all/sort:activity-desc/tags:ifopt/page:1/): If you want to ask a general usage question, please do this at ROS Answers using the tag `ifopt`. Asking there has the following advantages: - There are many more people reading questions there so your chances on getting an answer and in a timely manner are much higher. - In the future other users will search there for similar problems and can find your question and the potential answers. * [Issue tracker](https://github.com/ethz-adrl/ifopt/issues): In case you want to report bugs, request features or closely related to the code, the Issue tracker in this repo is the way to go. ## How Can I Contribute? Unsure where to begin contributing to ifopt? You can start by looking through these `beginner` and `help-wanted` issues: * [Good first issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) - issues which should only require a few lines of code, and a test or two. * [Help wanted issues](https://github.com/ethz-adrl/ifopt/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) - issues which should be a bit more involved than `beginner` issues. Further ideas might include: - writing interfaces to additional solvers - reporting bugs - enhance documentation - add unit tests Please follow the [Google Style Guide](https://google.github.io/styleguide/cppguide.html) when writing your C++ Code for this project. ## Submitting a pull request Please create a [pull request](https://github.com/ethz-adrl/ifopt/compare) from your forked repo to the master branch. - Keep pull requests small, focussing on one specific issue. - Describe concisely what you are solving and reference the corresponding issue. - Include weblinks to relevant information. - Include screenshots and animated GIFs in your pull request whenever possible. We are performing automatic pull request testing, so if you see anything red, please read through the log and update your pull request until the tests pass.