This page presents our source codes gathered as part of PbDlib. Older source codes are still available here, but are now maintained as part of PbDlib.


PbDlib is a collection of source codes for robot programming by demonstration (learning from demonstration). It includes various functionalities at the crossroad of statistical learning, dynamical systems, optimal control and Riemannian geometry. It is available in the following languages:

PbDlib can be used in applications requiring task adaptation, human-robot skill transfer, safe controllers based on minimal intervention principle, as well as for probabilistic motion analysis and synthesis in multiple coordinate systems.

Three distinct versions are maintained that can be used independently in Matlab, C++ or Python with independent git repositories. Currently, the Matlab version has the most functionalities. The C++ and Python versions are better suited for integration in robot applications. Each git page provides detailed instructions and list of examples.

PbDlib is currently maintained by the Idiap Research Institute. Contact: Sylvain Calinon (


Matlab version

Git repository:

Most examples of the Matlab version are compatible with the GNU Octave open source software.


C++ version

Git repository:

The C++ version has a simple structure and is built with minimal dependency to external libraries, so that it can be included easily in other softwares.


Python version (task-parameterized models)

Git repository:

This Python version focuses on task-parameterized models for robot learning from demonstration applications.
Contact: Emmanuel Pignat (


Python version (Riemannian manifolds)

Git repository:


This Python version focuses on Riemannian manifold algorithms for robot learning from demonstration applications.
Contact: Martijn Zeestraten (