Skip to content

robotology/osqp-eigen

Repository files navigation

osqp-eigen

General c++14 License
CI/CD Codacy Badge CI Azure
conda Conda Recipe Conda Downloads Conda Version Conda Platforms

Simple C++ wrapper for osqp library.

📚 Documentation

The documentation is available online at the accompanying website.

📄 Dependences

The project depends only on osqp and Eigen3. Please install Catch2 if you want to run the tests only for testing.

🛠️ Usage

📦 Install with conda (recommended)

You can easily the library with conda using the following command

conda install -c conda-forge osqp-eigen

conda will automatically install osqp and Eigen3.

⚙️ Build from source (advanced)

  1. Clone the repository
    git clone https://github.com/robotology/osqp-eigen.git
    
  2. Build it
    cd osqp-eigen
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX:PATH=<custom-folder> ../
    make
    make install
    
  3. Add the following environmental variable
    OsqpEigen_DIR=/path/where/you/installed/
    

🖥️ How to use the library

osqp-eigen provides native CMake support which allows the library to be easily used in CMake projects. osqp-eigen exports a CMake target called OsqpEigen::OsqpEigen which can be imported using the find_package CMake command and used by calling target_link_libraries as in the following example:

cmake_minimum_required(VERSION 3.0)
project(myproject)
find_package(OsqpEigen REQUIRED)
add_executable(example example.cpp)
target_link_libraries(example OsqpEigen::OsqpEigen)

If you prefer to use the bazel build system, osqp-eigen is available in the Bazel Central Registry, so you can use it following the docs available at https://registry.bazel.build/modules/osqp-eigen.

🐛 Bug reports and support

All types of issues are welcome.

🧩 Compatibility Policy

This project tries to avoid removing functionalities in minor releases, while functionalities are only removed in major version. However, this is only done in a best-effort way, and it may be possible that backward incompatibly changes occur in minor releases (see EffVer for more details). Furthermore, the policy is that patch releases does not modify at all the public headers (i.e. the installed .h and .hpp) files of the project. This is done to ensure that no ABI change will occur in patch releases, without having to manually track ABI changes.

📝 License

Materials in this repository are distributed under the following license:

All software is licensed under the BSD 3-Clause License. See LICENSE file for details.