Skip to content

A distributed whole-body model predictive control for quadruped robots

Notifications You must be signed in to change notification settings

iit-DLSLab/DWMPC

Repository files navigation

DWMPC: Distributed Whole-Body Model Predictive Control

Simulation Real Robot
2024 IEEE/RSJ International Conference on Intelligent Robots and Systems

DWMPC is a library for distributed model predictive control (MPC) of quadruped robots. This repository includes the core MPC controller in cpp and example usage with the gym-quadruped environment in Python. The provided acados solver has been generated for aliengo. If you want to try with different robots check this Python file to generate a new C solver.

Dependencies

Before proceeding with the installation, ensure that the following dependencies are available on your system:

  • CMake
  • GCC
  • Python 3 (along with development headers)
  • Eigen3
  • YAML-CPP
  • Pybind11
  • ndcurves
  • acados

Installation

1. Clone the Repository

To get started, clone the repository and initialize all submodules:

git clone https://github.com/iit-DLSLab/DWMPC.git
cd DWMPC
git submodule update --init --recursive

2. Install System Dependencies

sudo apt-get install -y cmake g++ python3 python3-dev python3-pip libeigen3-dev libyaml-cpp-dev pybind11-dev

Follow the instructions to install the ndcurves library from the official repository

3. Build Acados

Navigate to the acados directory and build the library:

cd third_party/acados
mkdir build && cd build
cmake ..
make install -j4

After building, add acados to your LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=<path_to_acados\lib>:$LD_LIBRARY_PATH

4. Build DWMPC

From the main DWMPC repository, create a build directory and compile the project:

cd ../../
mkdir build && cd build
cmake ..
make -j8 && sudo make install

Add the DWMPC library to your environment:

export LD_LIBRARY_PATH=/usr/lib/dls2/controllers/dwmpc:$LD_LIBRARY_PATH
export PYTHONPATH=$PYTHONPATH:/usr/lib/dls2/controllers/dwmpc

5. To run the example

For running the example scripts, install the gym-quadruped environment from the the official repository

Citing this work

@INPROCEEDINGS{amatucciIROS2024,
      title={Accelerating Model Predictive Control for Legged Robots through Distributed Optimization}, 
      author={Lorenzo Amatucci and Giulio Turrisi and Angelo Bratta and Victor Barasuol and Claudio Semini},
       booktitle={2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  year={2024}
}

About

A distributed whole-body model predictive control for quadruped robots

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages