CPS: a Capture Problem Solver
A dedicated solver in C++ for the capture problem presented initially in S. Caron, B. Mallein, "Balance control using both ZMP and COM height variations: A convex boundedness approach", ICRA 2018.
The solver itself is presented in S. Caron, A. Escande, L. Lanari, B. Mallein, "Capturability-based Analysis, Optimization and Control of 3D Bipedal Walking", under review.
This repository contains three folders:
- the C++ code of the solver
- a MATLAB code that was used for prototyping
- a LaTeX technical document, with some of the math behind the solver (not fully complete)
Compilation has been tested on Linux (gcc/clang) and Windows (Visual Studio).
To compile you will need the following tools:
- CMake >= 2.8.12
- pkg-config (use pkg-config-lite on Windows)
- A compiler with C++11 support
and the following dependencies:
This repository also uses jrl-cmakemodules as a submodule.
Building from source on Linux
Follow the standard CMake build procedure:
git clone --recursive https://github.com/jrl-umi3218/CaptureProblemSolver cd CaptureProblemSolver mkdir build && cd build cmake [options] .. make && make install
where the main options are:
-DCMAKE_BUILD_TYPE=ReleaseBuild in Release mode
-DPYTHON_BINDINGS=ONBuild Python bindings
The C++ code is mainly intended to work as a library.
The main class is
cps::CaptureSolver which provides the solver and is used through its method
solve to which a
cps::Problem instance is passed.
A simple example of use can be found in
cps::CaptureSolver is a thin wrapper around
cps::SQP where the real work is done.
cps::SQP is used the same way.
As an alternative, the compilation of the project
main generates an executable that takes as arguments the paths of files describing capture problem.
Example of such files can be found in
Input file format
A problem can be described by a simple text file such as those found in
The file parser looks for (matlab readable, semi-colum terminated) lines with the
= character in them, and recognize the following fields (in any order):
- Delta ( in the paper)
- lambda_min ()
- lambda_max ()
- omega_i_min ()
- omega_i_max ()
- z_bar ()
- zd_bar ()
- z_f ()
- (optionally) Phi (), the solution computed by any other mean.
All other lines are ignored.
- To Vincent Samy for his help with the Boost.Python bindings