No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.

ifopt package from ifopt repo

ifopt

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2019-05-16
Dev Status DEVELOPED
Released RELEASED

Package Description

An

Additional Links

Maintainers

  • Alexander W. Winkler

Authors

  • Alexander W. Winkler

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI <!-- The actual jenkins documentation job can be found here --> <!-- http://build.ros.org/view/Ldoc/job/Ldoc__ifopt__ubuntu_xenial_amd64/ -->

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:

FeaturesInstallExamplesDevelopContributePublicationsAuthors

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
  • light-weight (~2k lines of code) makes it easy to use and extend

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

  • Use: To use in your cmake project, see this minimal CMakeLists.txt:
  find_package(ifopt)
  # Formulate (ifopt:ifopt_core) and solve (ifopt::ifopt_ipopt) the problem
  add_executable(main main.cpp)
  # Pull in include directories, libraries, ... 
  target_link_libraries(main PUBLIC ifopt::ifopt_ipopt) 

Build with catkin

  cd catkin_ws/src
  git clone https://github.com/ethz-adrl/ifopt.git
  cd ..
  catkin_make_isolated # `catkin build` if you are using catkin command-line tools 
  source ./devel/setup.bash

  • Use: Include in your catkin project by adding to your CMakeLists.txt
  add_compile_options(-std=c++11)
  find_package(catkin COMPONENTS ifopt) 
  include_directories(${catkin_INCLUDE_DIRS})
  target_link_libraries(foo ${catkin_LIBRARIES})

Add the following to your package.xml:

  <package>
    <depend>ifopt</depend>
  </package>

Examples

Unit tests & toy problem

Navigate to your build folder in which the Makefile resides, which depends on how you built the code:

cd ifopt/build  # plain cmake 
cd catkin_ws/build_isolated/ifopt/devel # catkin_make_isolated
cd catkin_ws/build/ifopt # catkin build

Make sure everything installed correctly by running the test target

make test

You should see ifopt_ipopt-example....Passed (or snopt if installed) as well as ifopt_core-test if gtest is installed.

If you have IPOPT installed and linked correctly, you can also run the binary example directly (again, first navigate to the build folder with the Makefile)

make test ARGS='-R ifopt_ipopt-example -V'

Output:

1.0 0.0

towr

A more involved problem, taken from towr, with multiple sets of variables and constraints to generate motions for legged robots produces the following:

Develop

Useful information for developers is given in the doxygen documentation:

  • For an overview of how to formulate your problem, start here.
  • A nice graphical overview as UML can be seen here.

Contribute

We love pull request, whether its interfaces to additional solvers, bug fixes, unit tests or updating the documentation. Please have a look at CONTRIBUTING.md for more information. See here the list of contributors who participated in this project.

Publications

If you use this work, please consider citing as follows:

@misc{ifopt,
  author       = {Alexander W Winkler},
  title        = {{Ifopt - A modern, light-weight, Eigen-based C++ interface to 
                   Nonlinear Programming solvers Ipopt and Snopt.}},
  year         = 2018,
  doi          = {10.5281/zenodo.1135046},
  url          = {https://doi.org/10.5281/zenodo.1135046}
}

The research project within which this code was developed: * A. W. Winkler, D. Bellicoso, M. Hutter, J. Buchli, Gait and Trajectory Optimization for Legged Systems through Phase-based End-Effector Parameterization, IEEE Robotics and Automation Letters (RA-L), 2018:

Authors

Alexander W. Winkler - Initial Work/Maintainer

This was has been carried out at the following institutions:

               

Additional Information

Linking to custom Ipopt or Snopt

If you are building from source and want to use a locally installed version of Ipopt add the path to your Ipopt build folder to your ~/.bashrc, e.g.

export IPOPT_DIR=/home/your_name/Code/Ipopt-3.12.8/build

In case your OS doesn't provide the precompiled binaries or the required version, you can also easily install Ipopt from source as described here. This summary might work for you:

wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.11.10.zip
unzip Ipopt-3.11.10.zip
cd Ipopt-3.11.10/ThirdParty/Mumps
./get.Mumps  # HSL routines are faster (http://www.hsl.rl.ac.uk/ipopt/)
cd ../../
mkdir build && cd build
../configure --prefix=/usr/local
make
make test
make install
export IPOPT_DIR=`pwd`

If you need an interface to Snopt, point cmake to that build folder in your ~/.bashrc through e.g.

export SNOPT_DIR=/home/your_name/Code/Snopt

and run cmake as

cmake -DBUILD_SNOPT=ON ..

CHANGELOG

Changelog for package ifopt

2.0.6 (2019-01-17)

  • Enable problems without constraints: Fix issue (#34 , #35)
  • Fix/segfaults (#33)
  • Contributors: Wolfgang Merkt, viviansuzano

2.0.5 (2018-07-30)

  • set default print level to 4 to show derivative test errors.
  • Improve print-out of cost terms (specifically print cost)
  • Improve docs (#27)
  • Implemented more efficient method for building constraint jacobian (#26)
  • Contributors: Alexander Winkler, fbiemueller

2.0.4 (2018-07-17)

  • generalize ipopt solver interface, so source never has to be touched.
  • Fix/simplify image path in doxygen.
  • Simplify and generalize testing procedure (#25)
  • have cmake fail if IPOPT version <3.11.9
  • Install binaries to /lib/ifopt, just as catkin does.
  • Update README.md to always use make test for testing.
  • Improve doxygen (#22)
  • Contributors: Alexander Winkler

2.0.3 (2018-07-10)

  • Add codefactor integration and contributing guidelines
  • display indices more precisely in printout
  • remove rsl jekins, use ros build farm
  • remove warning from version number
  • Contributors: Alexander Winkler

2.0.2 (2018-07-02)

  • fully remove catkin dependency
  • increase cmake project version number manually
  • DRY in cmake list (reuse \${LIB_CORE})
  • Update README.md
  • Contributors: Alexander Winkler

2.0.1 (2018-06-30)

  • make IPOPT the default ON solver option
  • Add documentation and update package.xml to use ubuntu ipopt install coinor-libipopt-dev
  • Use FindIpopt.cmake (from robotology/idyntree)
  • Set default solver to mumps, as this is free one installed in ubuntu
  • Define SNOPT/IPOPT location also through environmental variable
  • Contributors: Alexander Winkler

2.0.0 (2018-06-24)

  • allow building with pure cmake (catkin optional) (#13)
  • generate ifopt-config.cmake to easily include in other cmake projects (#13)
  • implement pimpl idiom to avoid exporting IPOPT/SNOPT libraries/headers (#12)
  • Add possibility to set solver options (e.g. \"ma27\") on user side
  • Clean-up and improve printouts
  • Reduce to one single catkin package with solvers as cmake subdirectories
  • Contributors: Alexander Winkler

1.0.2 (2018-02-05)

  • add correct catkin install folder for ifopt_core
  • Contributors: Alexander Winkler

1.0.1 (2018-01-29)

  • update package xml
  • make eigen 3.2 compatible (remove header Eigen/Eigen)
  • Contributors: Alexander Winkler

1.0.0 (2018-01-27)

  • move IPOPT and SNOPT interfaces to separate package
  • add ifopt metapackage for documentation
  • Contributors: Alexander Winkler

0.0.2 (2018-01-04)

  • added more explanatory message in package.xml
  • added documentations badge
  • fixed bounds in example problem
  • moved CI to ros buildfarm.
  • generate tests also with catkin if installed
  • Fixed compiler warnings.
  • Contributors: Alexander W Winkler

0.0.1 (2017-12-15)

  • improve doxygen documentation
  • removed linear and soft constraint
  • add more unit tests
  • added logo
  • Create LICENSE
  • added first version of readme
  • remove dependency of constraints/cost on optimization variables
  • simplified user interface.
  • make project catkin independent
  • renamed repo to ifopt
  • added ipopt linear solver types url
  • opt_solve: add test infrastructure
  • add documentation to core classes
  • xpp_solve: add copyright boilerplate
  • Contributors: Alexander W Winkler

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ifopt at answers.ros.org

ifopt package from ifopt repo

ifopt

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2019-05-16
Dev Status DEVELOPED
Released RELEASED

Package Description

An

Additional Links

Maintainers

  • Alexander W. Winkler

Authors

  • Alexander W. Winkler

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI <!-- The actual jenkins documentation job can be found here --> <!-- http://build.ros.org/view/Ldoc/job/Ldoc__ifopt__ubuntu_xenial_amd64/ -->

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:

FeaturesInstallExamplesDevelopContributePublicationsAuthors

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
  • light-weight (~2k lines of code) makes it easy to use and extend

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

  • Use: To use in your cmake project, see this minimal CMakeLists.txt:
  find_package(ifopt)
  # Formulate (ifopt:ifopt_core) and solve (ifopt::ifopt_ipopt) the problem
  add_executable(main main.cpp)
  # Pull in include directories, libraries, ... 
  target_link_libraries(main PUBLIC ifopt::ifopt_ipopt) 

Build with catkin

  cd catkin_ws/src
  git clone https://github.com/ethz-adrl/ifopt.git
  cd ..
  catkin_make_isolated # `catkin build` if you are using catkin command-line tools 
  source ./devel/setup.bash

  • Use: Include in your catkin project by adding to your CMakeLists.txt
  add_compile_options(-std=c++11)
  find_package(catkin COMPONENTS ifopt) 
  include_directories(${catkin_INCLUDE_DIRS})
  target_link_libraries(foo ${catkin_LIBRARIES})

Add the following to your package.xml:

  <package>
    <depend>ifopt</depend>
  </package>

Examples

Unit tests & toy problem

Navigate to your build folder in which the Makefile resides, which depends on how you built the code:

cd ifopt/build  # plain cmake 
cd catkin_ws/build_isolated/ifopt/devel # catkin_make_isolated
cd catkin_ws/build/ifopt # catkin build

Make sure everything installed correctly by running the test target

make test

You should see ifopt_ipopt-example....Passed (or snopt if installed) as well as ifopt_core-test if gtest is installed.

If you have IPOPT installed and linked correctly, you can also run the binary example directly (again, first navigate to the build folder with the Makefile)

make test ARGS='-R ifopt_ipopt-example -V'

Output:

1.0 0.0

towr

A more involved problem, taken from towr, with multiple sets of variables and constraints to generate motions for legged robots produces the following:

Develop

Useful information for developers is given in the doxygen documentation:

  • For an overview of how to formulate your problem, start here.
  • A nice graphical overview as UML can be seen here.

Contribute

We love pull request, whether its interfaces to additional solvers, bug fixes, unit tests or updating the documentation. Please have a look at CONTRIBUTING.md for more information. See here the list of contributors who participated in this project.

Publications

If you use this work, please consider citing as follows:

@misc{ifopt,
  author       = {Alexander W Winkler},
  title        = {{Ifopt - A modern, light-weight, Eigen-based C++ interface to 
                   Nonlinear Programming solvers Ipopt and Snopt.}},
  year         = 2018,
  doi          = {10.5281/zenodo.1135046},
  url          = {https://doi.org/10.5281/zenodo.1135046}
}

The research project within which this code was developed: * A. W. Winkler, D. Bellicoso, M. Hutter, J. Buchli, Gait and Trajectory Optimization for Legged Systems through Phase-based End-Effector Parameterization, IEEE Robotics and Automation Letters (RA-L), 2018:

Authors

Alexander W. Winkler - Initial Work/Maintainer

This was has been carried out at the following institutions:

               

Additional Information

Linking to custom Ipopt or Snopt

If you are building from source and want to use a locally installed version of Ipopt add the path to your Ipopt build folder to your ~/.bashrc, e.g.

export IPOPT_DIR=/home/your_name/Code/Ipopt-3.12.8/build

In case your OS doesn't provide the precompiled binaries or the required version, you can also easily install Ipopt from source as described here. This summary might work for you:

wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.11.10.zip
unzip Ipopt-3.11.10.zip
cd Ipopt-3.11.10/ThirdParty/Mumps
./get.Mumps  # HSL routines are faster (http://www.hsl.rl.ac.uk/ipopt/)
cd ../../
mkdir build && cd build
../configure --prefix=/usr/local
make
make test
make install
export IPOPT_DIR=`pwd`

If you need an interface to Snopt, point cmake to that build folder in your ~/.bashrc through e.g.

export SNOPT_DIR=/home/your_name/Code/Snopt

and run cmake as

cmake -DBUILD_SNOPT=ON ..

CHANGELOG

Changelog for package ifopt

2.0.6 (2019-01-17)

  • Enable problems without constraints: Fix issue (#34 , #35)
  • Fix/segfaults (#33)
  • Contributors: Wolfgang Merkt, viviansuzano

2.0.5 (2018-07-30)

  • set default print level to 4 to show derivative test errors.
  • Improve print-out of cost terms (specifically print cost)
  • Improve docs (#27)
  • Implemented more efficient method for building constraint jacobian (#26)
  • Contributors: Alexander Winkler, fbiemueller

2.0.4 (2018-07-17)

  • generalize ipopt solver interface, so source never has to be touched.
  • Fix/simplify image path in doxygen.
  • Simplify and generalize testing procedure (#25)
  • have cmake fail if IPOPT version <3.11.9
  • Install binaries to /lib/ifopt, just as catkin does.
  • Update README.md to always use make test for testing.
  • Improve doxygen (#22)
  • Contributors: Alexander Winkler

2.0.3 (2018-07-10)

  • Add codefactor integration and contributing guidelines
  • display indices more precisely in printout
  • remove rsl jekins, use ros build farm
  • remove warning from version number
  • Contributors: Alexander Winkler

2.0.2 (2018-07-02)

  • fully remove catkin dependency
  • increase cmake project version number manually
  • DRY in cmake list (reuse \${LIB_CORE})
  • Update README.md
  • Contributors: Alexander Winkler

2.0.1 (2018-06-30)

  • make IPOPT the default ON solver option
  • Add documentation and update package.xml to use ubuntu ipopt install coinor-libipopt-dev
  • Use FindIpopt.cmake (from robotology/idyntree)
  • Set default solver to mumps, as this is free one installed in ubuntu
  • Define SNOPT/IPOPT location also through environmental variable
  • Contributors: Alexander Winkler

2.0.0 (2018-06-24)

  • allow building with pure cmake (catkin optional) (#13)
  • generate ifopt-config.cmake to easily include in other cmake projects (#13)
  • implement pimpl idiom to avoid exporting IPOPT/SNOPT libraries/headers (#12)
  • Add possibility to set solver options (e.g. \"ma27\") on user side
  • Clean-up and improve printouts
  • Reduce to one single catkin package with solvers as cmake subdirectories
  • Contributors: Alexander Winkler

1.0.2 (2018-02-05)

  • add correct catkin install folder for ifopt_core
  • Contributors: Alexander Winkler

1.0.1 (2018-01-29)

  • update package xml
  • make eigen 3.2 compatible (remove header Eigen/Eigen)
  • Contributors: Alexander Winkler

1.0.0 (2018-01-27)

  • move IPOPT and SNOPT interfaces to separate package
  • add ifopt metapackage for documentation
  • Contributors: Alexander Winkler

0.0.2 (2018-01-04)

  • added more explanatory message in package.xml
  • added documentations badge
  • fixed bounds in example problem
  • moved CI to ros buildfarm.
  • generate tests also with catkin if installed
  • Fixed compiler warnings.
  • Contributors: Alexander W Winkler

0.0.1 (2017-12-15)

  • improve doxygen documentation
  • removed linear and soft constraint
  • add more unit tests
  • added logo
  • Create LICENSE
  • added first version of readme
  • remove dependency of constraints/cost on optimization variables
  • simplified user interface.
  • make project catkin independent
  • renamed repo to ifopt
  • added ipopt linear solver types url
  • opt_solve: add test infrastructure
  • add documentation to core classes
  • xpp_solve: add copyright boilerplate
  • Contributors: Alexander W Winkler

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ifopt at answers.ros.org

ifopt package from ifopt repo

ifopt

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2019-05-16
Dev Status DEVELOPED
Released RELEASED

Package Description

An

Additional Links

Maintainers

  • Alexander W. Winkler

Authors

  • Alexander W. Winkler

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI <!-- The actual jenkins documentation job can be found here --> <!-- http://build.ros.org/view/Ldoc/job/Ldoc__ifopt__ubuntu_xenial_amd64/ -->

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:

FeaturesInstallExamplesDevelopContributePublicationsAuthors

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
  • light-weight (~2k lines of code) makes it easy to use and extend

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

  • Use: To use in your cmake project, see this minimal CMakeLists.txt:
  find_package(ifopt)
  # Formulate (ifopt:ifopt_core) and solve (ifopt::ifopt_ipopt) the problem
  add_executable(main main.cpp)
  # Pull in include directories, libraries, ... 
  target_link_libraries(main PUBLIC ifopt::ifopt_ipopt) 

Build with catkin

  cd catkin_ws/src
  git clone https://github.com/ethz-adrl/ifopt.git
  cd ..
  catkin_make_isolated # `catkin build` if you are using catkin command-line tools 
  source ./devel/setup.bash

  • Use: Include in your catkin project by adding to your CMakeLists.txt
  add_compile_options(-std=c++11)
  find_package(catkin COMPONENTS ifopt) 
  include_directories(${catkin_INCLUDE_DIRS})
  target_link_libraries(foo ${catkin_LIBRARIES})

Add the following to your package.xml:

  <package>
    <depend>ifopt</depend>
  </package>

Examples

Unit tests & toy problem

Navigate to your build folder in which the Makefile resides, which depends on how you built the code:

cd ifopt/build  # plain cmake 
cd catkin_ws/build_isolated/ifopt/devel # catkin_make_isolated
cd catkin_ws/build/ifopt # catkin build

Make sure everything installed correctly by running the test target

make test

You should see ifopt_ipopt-example....Passed (or snopt if installed) as well as ifopt_core-test if gtest is installed.

If you have IPOPT installed and linked correctly, you can also run the binary example directly (again, first navigate to the build folder with the Makefile)

make test ARGS='-R ifopt_ipopt-example -V'

Output:

1.0 0.0

towr

A more involved problem, taken from towr, with multiple sets of variables and constraints to generate motions for legged robots produces the following:

Develop

Useful information for developers is given in the doxygen documentation:

  • For an overview of how to formulate your problem, start here.
  • A nice graphical overview as UML can be seen here.

Contribute

We love pull request, whether its interfaces to additional solvers, bug fixes, unit tests or updating the documentation. Please have a look at CONTRIBUTING.md for more information. See here the list of contributors who participated in this project.

Publications

If you use this work, please consider citing as follows:

@misc{ifopt,
  author       = {Alexander W Winkler},
  title        = {{Ifopt - A modern, light-weight, Eigen-based C++ interface to 
                   Nonlinear Programming solvers Ipopt and Snopt.}},
  year         = 2018,
  doi          = {10.5281/zenodo.1135046},
  url          = {https://doi.org/10.5281/zenodo.1135046}
}

The research project within which this code was developed: * A. W. Winkler, D. Bellicoso, M. Hutter, J. Buchli, Gait and Trajectory Optimization for Legged Systems through Phase-based End-Effector Parameterization, IEEE Robotics and Automation Letters (RA-L), 2018:

Authors

Alexander W. Winkler - Initial Work/Maintainer

This was has been carried out at the following institutions:

               

Additional Information

Linking to custom Ipopt or Snopt

If you are building from source and want to use a locally installed version of Ipopt add the path to your Ipopt build folder to your ~/.bashrc, e.g.

export IPOPT_DIR=/home/your_name/Code/Ipopt-3.12.8/build

In case your OS doesn't provide the precompiled binaries or the required version, you can also easily install Ipopt from source as described here. This summary might work for you:

wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.11.10.zip
unzip Ipopt-3.11.10.zip
cd Ipopt-3.11.10/ThirdParty/Mumps
./get.Mumps  # HSL routines are faster (http://www.hsl.rl.ac.uk/ipopt/)
cd ../../
mkdir build && cd build
../configure --prefix=/usr/local
make
make test
make install
export IPOPT_DIR=`pwd`

If you need an interface to Snopt, point cmake to that build folder in your ~/.bashrc through e.g.

export SNOPT_DIR=/home/your_name/Code/Snopt

and run cmake as

cmake -DBUILD_SNOPT=ON ..

CHANGELOG

Changelog for package ifopt

2.0.6 (2019-01-17)

  • Enable problems without constraints: Fix issue (#34 , #35)
  • Fix/segfaults (#33)
  • Contributors: Wolfgang Merkt, viviansuzano

2.0.5 (2018-07-30)

  • set default print level to 4 to show derivative test errors.
  • Improve print-out of cost terms (specifically print cost)
  • Improve docs (#27)
  • Implemented more efficient method for building constraint jacobian (#26)
  • Contributors: Alexander Winkler, fbiemueller

2.0.4 (2018-07-17)

  • generalize ipopt solver interface, so source never has to be touched.
  • Fix/simplify image path in doxygen.
  • Simplify and generalize testing procedure (#25)
  • have cmake fail if IPOPT version <3.11.9
  • Install binaries to /lib/ifopt, just as catkin does.
  • Update README.md to always use make test for testing.
  • Improve doxygen (#22)
  • Contributors: Alexander Winkler

2.0.3 (2018-07-10)

  • Add codefactor integration and contributing guidelines
  • display indices more precisely in printout
  • remove rsl jekins, use ros build farm
  • remove warning from version number
  • Contributors: Alexander Winkler

2.0.2 (2018-07-02)

  • fully remove catkin dependency
  • increase cmake project version number manually
  • DRY in cmake list (reuse \${LIB_CORE})
  • Update README.md
  • Contributors: Alexander Winkler

2.0.1 (2018-06-30)

  • make IPOPT the default ON solver option
  • Add documentation and update package.xml to use ubuntu ipopt install coinor-libipopt-dev
  • Use FindIpopt.cmake (from robotology/idyntree)
  • Set default solver to mumps, as this is free one installed in ubuntu
  • Define SNOPT/IPOPT location also through environmental variable
  • Contributors: Alexander Winkler

2.0.0 (2018-06-24)

  • allow building with pure cmake (catkin optional) (#13)
  • generate ifopt-config.cmake to easily include in other cmake projects (#13)
  • implement pimpl idiom to avoid exporting IPOPT/SNOPT libraries/headers (#12)
  • Add possibility to set solver options (e.g. \"ma27\") on user side
  • Clean-up and improve printouts
  • Reduce to one single catkin package with solvers as cmake subdirectories
  • Contributors: Alexander Winkler

1.0.2 (2018-02-05)

  • add correct catkin install folder for ifopt_core
  • Contributors: Alexander Winkler

1.0.1 (2018-01-29)

  • update package xml
  • make eigen 3.2 compatible (remove header Eigen/Eigen)
  • Contributors: Alexander Winkler

1.0.0 (2018-01-27)

  • move IPOPT and SNOPT interfaces to separate package
  • add ifopt metapackage for documentation
  • Contributors: Alexander Winkler

0.0.2 (2018-01-04)

  • added more explanatory message in package.xml
  • added documentations badge
  • fixed bounds in example problem
  • moved CI to ros buildfarm.
  • generate tests also with catkin if installed
  • Fixed compiler warnings.
  • Contributors: Alexander W Winkler

0.0.1 (2017-12-15)

  • improve doxygen documentation
  • removed linear and soft constraint
  • add more unit tests
  • added logo
  • Create LICENSE
  • added first version of readme
  • remove dependency of constraints/cost on optimization variables
  • simplified user interface.
  • make project catkin independent
  • renamed repo to ifopt
  • added ipopt linear solver types url
  • opt_solve: add test infrastructure
  • add documentation to core classes
  • xpp_solve: add copyright boilerplate
  • Contributors: Alexander W Winkler

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ifopt at answers.ros.org

No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.

ifopt package from ifopt repo

ifopt

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ethz-adrl/ifopt.git
VCS Type git
VCS Version master
Last Updated 2019-05-16
Dev Status DEVELOPED
Released UNRELEASED

Package Description

An

Additional Links

Maintainers

  • Alexander W. Winkler

Authors

  • Alexander W. Winkler

Build Status Documentation ROS integration CodeFactor License BSD-3-Clause DOI <!-- The actual jenkins documentation job can be found here --> <!-- http://build.ros.org/view/Ldoc/job/Ldoc__ifopt__ubuntu_xenial_amd64/ -->

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:

FeaturesInstallExamplesDevelopContributePublicationsAuthors

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
  • light-weight (~2k lines of code) makes it easy to use and extend

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

  • Use: To use in your cmake project, see this minimal CMakeLists.txt:
  find_package(ifopt)
  # Formulate (ifopt:ifopt_core) and solve (ifopt::ifopt_ipopt) the problem
  add_executable(main main.cpp)
  # Pull in include directories, libraries, ... 
  target_link_libraries(main PUBLIC ifopt::ifopt_ipopt) 

Build with catkin

  cd catkin_ws/src
  git clone https://github.com/ethz-adrl/ifopt.git
  cd ..
  catkin_make_isolated # `catkin build` if you are using catkin command-line tools 
  source ./devel/setup.bash

  • Use: Include in your catkin project by adding to your CMakeLists.txt
  add_compile_options(-std=c++11)
  find_package(catkin COMPONENTS ifopt) 
  include_directories(${catkin_INCLUDE_DIRS})
  target_link_libraries(foo ${catkin_LIBRARIES})

Add the following to your package.xml:

  <package>
    <depend>ifopt</depend>
  </package>

Examples

Unit tests & toy problem

Navigate to your build folder in which the Makefile resides, which depends on how you built the code:

cd ifopt/build  # plain cmake 
cd catkin_ws/build_isolated/ifopt/devel # catkin_make_isolated
cd catkin_ws/build/ifopt # catkin build

Make sure everything installed correctly by running the test target

make test

You should see ifopt_ipopt-example....Passed (or snopt if installed) as well as ifopt_core-test if gtest is installed.

If you have IPOPT installed and linked correctly, you can also run the binary example directly (again, first navigate to the build folder with the Makefile)

make test ARGS='-R ifopt_ipopt-example -V'

Output:

1.0 0.0

towr

A more involved problem, taken from towr, with multiple sets of variables and constraints to generate motions for legged robots produces the following:

Develop

Useful information for developers is given in the doxygen documentation:

  • For an overview of how to formulate your problem, start here.
  • A nice graphical overview as UML can be seen here.

Contribute

We love pull request, whether its interfaces to additional solvers, bug fixes, unit tests or updating the documentation. Please have a look at CONTRIBUTING.md for more information. See here the list of contributors who participated in this project.

Publications

If you use this work, please consider citing as follows:

@misc{ifopt,
  author       = {Alexander W Winkler},
  title        = {{Ifopt - A modern, light-weight, Eigen-based C++ interface to 
                   Nonlinear Programming solvers Ipopt and Snopt.}},
  year         = 2018,
  doi          = {10.5281/zenodo.1135046},
  url          = {https://doi.org/10.5281/zenodo.1135046}
}

The research project within which this code was developed: * A. W. Winkler, D. Bellicoso, M. Hutter, J. Buchli, Gait and Trajectory Optimization for Legged Systems through Phase-based End-Effector Parameterization, IEEE Robotics and Automation Letters (RA-L), 2018:

Authors

Alexander W. Winkler - Initial Work/Maintainer

This was has been carried out at the following institutions:

               

Additional Information

Linking to custom Ipopt or Snopt

If you are building from source and want to use a locally installed version of Ipopt add the path to your Ipopt build folder to your ~/.bashrc, e.g.

export IPOPT_DIR=/home/your_name/Code/Ipopt-3.12.8/build

In case your OS doesn't provide the precompiled binaries or the required version, you can also easily install Ipopt from source as described here. This summary might work for you:

wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.11.10.zip
unzip Ipopt-3.11.10.zip
cd Ipopt-3.11.10/ThirdParty/Mumps
./get.Mumps  # HSL routines are faster (http://www.hsl.rl.ac.uk/ipopt/)
cd ../../
mkdir build && cd build
../configure --prefix=/usr/local
make
make test
make install
export IPOPT_DIR=`pwd`

If you need an interface to Snopt, point cmake to that build folder in your ~/.bashrc through e.g.

export SNOPT_DIR=/home/your_name/Code/Snopt

and run cmake as

cmake -DBUILD_SNOPT=ON ..

CHANGELOG

Changelog for package ifopt

2.0.6 (2019-01-17)

  • Enable problems without constraints: Fix issue (#34 , #35)
  • Fix/segfaults (#33)
  • Contributors: Wolfgang Merkt, viviansuzano

2.0.5 (2018-07-30)

  • set default print level to 4 to show derivative test errors.
  • Improve print-out of cost terms (specifically print cost)
  • Improve docs (#27)
  • Implemented more efficient method for building constraint jacobian (#26)
  • Contributors: Alexander Winkler, fbiemueller

2.0.4 (2018-07-17)

  • generalize ipopt solver interface, so source never has to be touched.
  • Fix/simplify image path in doxygen.
  • Simplify and generalize testing procedure (#25)
  • have cmake fail if IPOPT version <3.11.9
  • Install binaries to /lib/ifopt, just as catkin does.
  • Update README.md to always use make test for testing.
  • Improve doxygen (#22)
  • Contributors: Alexander Winkler

2.0.3 (2018-07-10)

  • Add codefactor integration and contributing guidelines
  • display indices more precisely in printout
  • remove rsl jekins, use ros build farm
  • remove warning from version number
  • Contributors: Alexander Winkler

2.0.2 (2018-07-02)

  • fully remove catkin dependency
  • increase cmake project version number manually
  • DRY in cmake list (reuse \${LIB_CORE})
  • Update README.md
  • Contributors: Alexander Winkler

2.0.1 (2018-06-30)

  • make IPOPT the default ON solver option
  • Add documentation and update package.xml to use ubuntu ipopt install coinor-libipopt-dev
  • Use FindIpopt.cmake (from robotology/idyntree)
  • Set default solver to mumps, as this is free one installed in ubuntu
  • Define SNOPT/IPOPT location also through environmental variable
  • Contributors: Alexander Winkler

2.0.0 (2018-06-24)

  • allow building with pure cmake (catkin optional) (#13)
  • generate ifopt-config.cmake to easily include in other cmake projects (#13)
  • implement pimpl idiom to avoid exporting IPOPT/SNOPT libraries/headers (#12)
  • Add possibility to set solver options (e.g. \"ma27\") on user side
  • Clean-up and improve printouts
  • Reduce to one single catkin package with solvers as cmake subdirectories
  • Contributors: Alexander Winkler

1.0.2 (2018-02-05)

  • add correct catkin install folder for ifopt_core
  • Contributors: Alexander Winkler

1.0.1 (2018-01-29)

  • update package xml
  • make eigen 3.2 compatible (remove header Eigen/Eigen)
  • Contributors: Alexander Winkler

1.0.0 (2018-01-27)

  • move IPOPT and SNOPT interfaces to separate package
  • add ifopt metapackage for documentation
  • Contributors: Alexander Winkler

0.0.2 (2018-01-04)

  • added more explanatory message in package.xml
  • added documentations badge
  • fixed bounds in example problem
  • moved CI to ros buildfarm.
  • generate tests also with catkin if installed
  • Fixed compiler warnings.
  • Contributors: Alexander W Winkler

0.0.1 (2017-12-15)

  • improve doxygen documentation
  • removed linear and soft constraint
  • add more unit tests
  • added logo
  • Create LICENSE
  • added first version of readme
  • remove dependency of constraints/cost on optimization variables
  • simplified user interface.
  • make project catkin independent
  • renamed repo to ifopt
  • added ipopt linear solver types url
  • opt_solve: add test infrastructure
  • add documentation to core classes
  • xpp_solve: add copyright boilerplate
  • Contributors: Alexander W Winkler

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

Deps Name
1 catkin

System Dependencies

Dependant Packages

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ifopt at answers.ros.org

No version for distro hydro. Known supported distros are highlighted in the buttons above.