Optimal control toolbox to achieve force feedback control in MPC. This library is basically an extension of the Crocoddyl optimal control library: it implements custom action models in C++ with unittests and python bindings. In particular, it contains the core classes used in MPC experiments of the following papers:
- S. Kleff, et. al, "Introducing Force Feedback in Model-Predictive Control", IROS 2022. PDF
- S. Kleff, et. al, "Force Feedback in Model-Predictive Control: A Soft Contact Approach" PDF (under review)
The code to reproduce our experiments (i.e. real-time implementation of the force-feedback MPC), along with our experimental data are available in this separate repository.
Python compatibility: 3.10-3.13
| Package | Version | Purpose |
|---|---|---|
| Pinocchio | 3.8.0 | Robot dynamics & kinematics |
| Crocoddyl | >= 3.2.0 | Optimal control library |
| mim-solvers | 0.2.0 | Optimization solvers |
| CMake | >= 3.10 | Build system |
For force tracking & polishing demos (Kuka Iiwa):
- NumPy, SciPy, Matplotlib
- PyBullet (physics simulation)
For Go2 multi-contact demos (requires above + specific deps below):
- MuJoCo (physics engine)
- meshcat-python (3D visualization)
- OpenCV (computer vision - Go2Py dependency)
- Go2Py (Go2 quadruped interface)
Using the provided conda environment file:
# 1. Create environment from file
conda env create -f environments/force_feedback_mpc.yml
conda activate force_feedback_mpc
# 2. Build and install force_feedback_mpc from source
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make -j4
make install
# 3. Install required Python packages (from workspace root)
cd ..
pip install -e ./croco_mpc_utils --no-deps
pip install -e ./mim_robots --no-deps
# 4. [Optional] Install Go2Py for Go2 demos
pip install -e /path/to/Go2PyThe demos are located in the demos/ directory. First, activate the environment:
conda activate force_feedback_mpcpython demos/force_tracking/classical/force_tracking_classical_mpc.pypython demos/force_tracking/soft/force_tracking_soft_mpc.pypython demos/polishing/classical/polishing_classical_mpc.py
python demos/polishing/soft/polishing_soft_mpc.pyRequires Go2Py to be installed.
python demos/go2arm/Go2MPC_demo_classical.py
python demos/go2arm/Go2MPC_demo_soft.py@unpublished{kleff:hal-04572399,
TITLE = {{Force Feedback in Model-Predictive Control: A Soft Contact Approach}},
AUTHOR = {Kleff, S{\'e}bastien and Jordana, Armand and Khorrambakht, Rooholla and Mansard, Nicolas and Righetti, Ludovic},
URL = {https://hal.science/hal-04572399},
NOTE = {working paper or preprint},
HAL_LOCAL_REFERENCE = {Rapport LAAS n{\textdegree} 24093},
YEAR = {2025},
MONTH = Jun,
PDF = {https://hal.science/hal-04572399v2/file/force_feedback_article_second_submission.pdf},
HAL_ID = {hal-04572399},
HAL_VERSION = {v2},
}