Skip to content

C++ API Reference

SSQP is written in C++17; the ssqpy Python module documented in the Python API Reference is a near 1:1 nanobind wrapping of the library described here. The library can be used directly from C++ without the Python bindings at all: link against the ssqp CMake target (see Installation) and include the relevant headers under include/.

This reference is generated from the headers' own comments at doc build time, with one page per namespace, so it can't drift out of sync with the source. It does not enumerate every predefined cost/constraint constructor argument, since those mirror the Python bindings closely; consult the corresponding predefined header or the Python reference for exact parameters.

Main classes

Class Header(s) Concepts
ssqp::model::Model, with its nested Structure, Config and CustomProperties include/model/Model.hpp Model
ssqp::model::Container include/model/Container.hpp
Function, StageCost, StageDynamics, StageConstraints (ssqp::model::stagewise) include/model/stagewise/Function.hpp, StageCost.hpp, StageDynamics.hpp, StageConstraints.hpp Costs, Constraints & Dynamics
Predefined costs and constraints include/model/stagewise/predefined/Costs.hpp, Constraints.hpp Costs, Constraints & Dynamics
ssqp::model::stagewise::predefined::ReferenceFrame include/types.hpp Reference frames
Terrain and the predefined terrains (ssqp::model::terrain) include/model/terrain/Terrain.hpp, include/model/terrain/predefined/ Terrain
ssqp::model::presets include/model/presets/Presets.hpp
ssqp::solvers::ssqp, with its nested Params, Guess and convergence data include/solvers/ssqp.hpp SSQP Solver
Filter and merit line search (ssqp::step) include/sqp_step/filter.hpp, include/sqp_step/merit.hpp SSQP Solver
QPSolver, admm_qp, hpipm_qp, piqp_qp, lqr (ssqp::solvers) include/solvers/qp.hpp, admm_qp.hpp, hpipm_qp.hpp, piqp_qp.hpp, lqr.hpp QP Solvers
ssqp::solvers::MPC include/solvers/mpc.hpp MPC
ssqp::param_search: dynamics parameter search (dynamics_params::Search, GradientDescent, GaussNewton) and HyperParamSearch include/param_search/search.hpp Parameter Search
Core types (VecX, MatX, FlatVec, log levels, …) include/types.hpp

Namespaces

All library code lives under ssqp::, mirroring the Python package layout:

Building against the C++ library

ssqp is built as a static library by CMake. Other CMake projects link the ssqp::ssqp target, either from an installed package found with find_package(ssqp) or by adding this repository with FetchContent or add_subdirectory; the target propagates its include directories, compile definitions and the static libraries it depends on. See Using the C++ library for both, and CMake options, particularly SSQP_WITH_HPIPM and SSQP_WITH_PIQP if you need the HPIPM or PIQP QP solvers.