/CaptureProblemSolver

A dedicated solver for the capture problem initially presented in S. Caron, B. Mallein "Balance control using both ZMP and COM height variations: A convex boundedness approach", ICRA 2018

Primary LanguageC++GNU Lesser General Public License v3.0LGPL-3.0

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 Pattern Generation for Walking with Variable Height", IEEE Transactions on Robotics, 2019.

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)

Installation

Compilation has been tested on Linux (gcc/clang) and Windows (Visual Studio).

Dependencies

To compile you will need the following tools:

and the following dependencies:

  • Boost >= 1.49 (>= 1.64 for Python bindings)
  • Eigen >= 3.2

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=Release Build in Release mode
  • -DCMAKE_INSTALL_PREFIX=some/path/to/install default is /usr/local
  • -DPYTHON_BINDINGS=ON Build Python bindings

Use

C++ code

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 main.cpp.

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 c++\tests\data\.

Input file format

A problem can be described by a simple text file such as those found in c++\tests\data\.

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)
  • g
  • lambda_min ()
  • lambda_max ()
  • omega_i_min ()
  • omega_i_max ()
  • s
  • z_bar ()
  • zd_bar ()
  • z_f ()
  • (optionally) Phi (), the solution computed by any other mean.

All other lines are ignored.

Thanks

  • To Vincent Samy for his help with the Boost.Python bindings