Robotics codes from scratch (RCFS)

Robotics codes from scratch (RCFS) is a collection of source codes to study and test learning and optimization problems in robotics through didactic examples.

Most examples are coded in Python and Matlab/Octave (full compatibility with GNU Octave). Some are also coded in C++ and Julia.

The website contains sandbox examples and interactive exercises. It also contains a pdf document describing the covered approaches with links to the source code examples.


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. The Matlab version has the most functionalities and is the most maitained. The C++ and Python versions are for most parts not maintained anymore. Each git page provides installation instructions and a list of examples.


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

Git repository:

Contact: Emmanuel Pignat (


Python version (Riemannian manifolds only, not maintained)

Git repository:


Contact: Martijn Zeestraten (

Older source codes are still available here, but are now maintained as part of PbDlib.