Home

Awesome

<img src="https://user-images.githubusercontent.com/16744101/108218725-3cab5980-7135-11eb-8b5a-8bcc9226fd5a.png" align="right" /> <h1 align="center">bipedal-locomotion-framework</h1> <p align="center"> <a href="https://isocpp.org"><img src="https://img.shields.io/badge/standard-C++17-blue.svg?style=flat&logo=c%2B%2B" alt="C++ Standard" class="center"/></a> <a href="https://github.com/ami-iit/bipedal-locomotion-framework/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-BSD_3--Clause-orange.svg" alt="Size" class="center"/></a> <a href="https://ami-iit.github.io/bipedal-locomotion-framework/"><img src="https://github.com/ami-iit/bipedal-locomotion-framework/actions/workflows/gh-pages.yml/badge.svg" alt="documentation"/></a> <a href="https://github.com/ami-iit/bipedal-locomotion-framework/actions?query=workflow%3A%22C%2B%2B+CI+Workflow%22"><img src="https://github.com/ami-iit/bipedal-locomotion-framework/workflows/C++%20CI%20Workflow/badge.svg" alt="CI"/></a> </p>
<p align="center"> <b>:warning: REPOSITORY UNDER DEVELOPMENT :warning:</b> <br>The libraries implemented in this repository are still experimental and we cannot guarantee stable API </p>

The bipedal-locomotion-framework project is a suite of libraries for achieving bipedal locomotion on humanoid robots.

Table of content

:page_facing_up: Mandatory dependencies

The bipedal-locomotion-framework project is versatile and can be used to compile only some components.

The minimum required dependencies are Eigen3, iDynTree and spdlog. If you want to build the tests please remember to install Catch2. If you are interested in the Python bindings generation please install python3 and pybind11 in your system.

:orange_book: Exported components

The bipedal-locomotion-framework project consists of several components. The components are stored in the src folder and their compilation depends on the installed dependencies.

ComponentDescriptionAdditional Dependencies
FrameworkInterface library that gathers all the exported components, includable with the file BipedalLocomotion/Framework.h-
AutoDiffBridge between CppAD and EigenCppAD
ContactModelsModels to describe the contact between robot and enviroment-
ContactsSyntactic description of a contactmanif nlohmann json
CommonConversionsCommon conversion utilities used in the framework-
ManifConversionsLibrary related conversion utilities used in the frameworkmanif
matioCppConversionsLibrary related conversion utilities used in the frameworkmatio-cpp
CasadiConversionsLibrary related conversion utilities used in the frameworkCasADi
EstimatorsLibrary containing observers-
FloatingBaseEstimatorLibrary containing floating base estimatorsmanif
RobotDynamicsEstimatorLibrary containing floating base estimatorsmanif
GenericContainerData structure similar to span but resizable.-
IKInverse kinematicsmanif osqp-eigen
MathLibrary containing mathematical algorithmsmanif
MLLibrary containing deep learning algorithmsonnxruntime
ParametersHandlerLibrary for retrieving parameters from configuration filesYARP (only if you want the YARP implementation) tomlplusplus (only if you want the toml implementation)
PerceptionInterfaceGeneric interface classes to adapt to perception data formats like images and point cloudsOpenCV PCL
PerceptionCaptureLibrary containing driver classes for perception devicesOpenCV PCL realsense2
PerceptionFeaturesLibrary containing perception algorithms useful for locomotionOpenCV
PlannersLibrary containing planner useful for locomotionmanif CasADi qhull
ReducedModelControllersController based on reduced models, e.g., CentroidalMPCCasADi
RobotInterfaceLibrary for communicating with the robotYARP (only if you want the YARP implementation)
SimplifiedModelControllersControllers based on simplified models, i.e, LIPM.-
SystemDescription of discrete and continuous dynamical systems-
TSIDTask space inverse dynamicsmanif lie-group-controllers
TextLoggingHelper library to display messages into the consoleYARP (only if you want the YARP implementation) ros-humble (if you want the ros2 implementation)
YarpUtilitiesUtilities library for retrieving data and from YARP structuresYARP

:warning: Including BipedalLocomotion/Framework.h may result in higher compilation time because of the inclusion of headers which may not be used in your project. It is always suggested to follow the IWYU paradigm. This applies also to the CMake targets. It is suggested to link only the targets used in your project.

:package: Install with conda (recommended)

You can easily the library with conda using the following command

conda install -c conda-forge bipedal-locomotion-framework

conda will automatically install all the required dependencies.

:hammer: Build the suite

The bipedal-locomotion-framework can be built on Windows, macOS, and Linux. The easiest way to compile the library is to use the robotology-superbuild. If you enable the profiles ROBOTOLOGY_ENABLE_DYNAMICS and ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS in the robotology-superbuild you will automatically clone and build bipedal-locomotion-framework and all the dependencies.

If you do not want to use the robotology-superbuild you can manually compile the code in the repository by running the following command in the terminal

git clone https://github.com/ami-iit/bipedal-locomotion-framework.git
cd bipedal-locomotion-framework
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=<path/where/you/want/to/install> \
      -DCMAKE_BUILD_TYPE=Release \
cmake --build . --config Release --target install

Remark: If you manually compile the framework remember to install the dependencies required by the component you are interested in.

:computer: Some utilities

The bipedal-locomotion-framework ships also some utilities that can help you in the everyday tests on a real robot. You can find them in the utilities folder. Each utility contains a well-documented README where you can find further details.

:snake: Python

bipedal-locomotion-framework also provides Python bindings. Only a small set of the components implemented in the library have the corresponding Python bindings.

If you want to compile the bindings please install python3 and pybind11 in your system then you can run the following CMake command in your build folder

cmake -DCMAKE_INSTALL_PREFIX=<path/where/you/want/to/install> \
      -DCMAKE_BUILD_TYPE=Release \
      -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON \
      -DPython3_ROOT_DIR=$(python3 -c "import sys; print(sys.prefix)") \
      -DFRAMEWORK_USE_Python3:BOOL=ON \
      -DFRAMEWORK_USE_pybind11:BOOL=ON .
cmake --build . --config Release --target install

Disclaimer: The Python bindings are currently supported on Linux.

:running: How to use the libraries

The bipedal-locomotion-framework provides native CMake support which allows the library to be easily used in CMake projects.

bipedal-locomotion-framework exports the CMake targets presented in the Exported components section. The targets can be imported using the find_package command and used by calling target_link_libraries.

For instance, the Math component can be used as follows:

cmake_minimum_required(VERSION 3.0)
project(myproject)
find_package(BipedalLocomotionFramework COMPONENTS Math REQUIRED)
add_executable(example example.cpp)
target_link_libraries(example PRIVATE BipedalLocomotion::Math)

The list of the targets can be found in the table :orange_book: Exported components.

:gear: Contributing

bipedal-locomotion-framework is an open-source project, and is thus built with your contributions. We strongly encourage you to open an issue with your feature request. Once the issue has been opened, you can also proceed with a pull request:rocket:

:technologist: Maintainers