Source codes
The Matlab/Octave programs on this page are free for academic use.
All of the source code provided here are documented in scientific publications, a complete list of which you can find here.
Please acknowledge the authors and refer to the authors publications in work that you will publish that uses these codes. Also let us know if you find bugs or if you were pleased with the results you obtain using these. Thank you !!!
Source Code by topic:
Download source code (zip file)
Author: Basilio Noris (2010) Instructions: Unzip the file and compile using the .sln file on Windows, or the Makefile on linux/Mac. 

MLDemos: MLDemos is a graphical interface for the visualization and the study of various algorithms for classification, regression and clustering. MLDemos has its own website HERE, where you are encouraged to go to get the latest version of the source code, precompiled binaries for Windows and Apple platforms, and more detailed information about how to use it. 

Download: git clone https://bitbucket.org/khansari/seds SEDS Authors: Mohammad Khansari Instructions: Unzip the file and read 'Readme.txt' for the instructions. Reference: S.M. KhansariZadeh and A. Billard, (2011) Learning Stable NonLinear Dynamical Systems with Gaussian Mixture Models, IEEE Transaction on Robotics, vol. 27, num 5, p. 943957. General Scope: We consider robot tasks that can be decomposed into sequences of pointtopoint motions, i.e. movements in space stopping at a given target. Modeling pointtopoint motions thus provides basic components, socalled motion primitives, for robot control. We model these motion primitives based on nonlinear timeindependent Dynamical Systems (DS). Use of timeindependent DS is advantageous in that: 1) it ensures the convergence of all trajectories to the goal from any point in the space. All these three properties are crucial when modeling robot motions. The first properties guarantees task accomplishment from any point in space. The second characteristic compensates for uncertainties in the model (e.g. estimation error in the vision system, inaccuracies in a robot's controller, unexpected changes in the environment, etc.), and the last one enables a robot to safely and robustly perform super agile task (e.g. tennis swing). Stable Estimator of Dynamical Systems (SEDS): Stable Estimator of Dynamical Systems (SEDS) is powerful method to tackle the big challenge in using DS. SEDS learns the parameters of the DS to ensure that all motions follow closely the demonstrations while ultimately reaching in and stopping at the target. More precisely, SEDS is a constrained optimization algorithm that formulates any arbitrary motion as a Mixture of Gaussian Functions. The objective function of SEDS could be mean square error or likelihood. The constraints in SEDS guarantees the global asymptotic stability of a nonlinear timeindependent DS.

To get more details about Dynamical Systems approach please visit here. 
Download: git clone https://bitbucket.org/khansari/obstacleavoidance ObstacleAvoidance Authors: Mohammad Khansari Instructions: Unzip the file and read 'Readme.txt' for the instructions. Reference: S.M. KhansariZadeh and A. Billard, (2011) A Dynamical System Approach to Realtime Obstacle Avoidance, Autonomous Robots, 2012. General Scope: Obstacle avoidance is a classical problem in robotics and many approaches have been proposed to solve it.
The above sourcecode provides a novel approach to realtime obstacle avoidance based on dynamical systems (DS) that ensures impenetrability of multiple convex shaped objects. In the presented method, we assume that the robot motion is driven by a continuous and differentiable DS in the absence of obstacle(s). This DS is provided by the user, and henceforth we will call it the original DS. Given the original DS and an analytical formulation describing the surface of obstacles, our algorithm is able to instantly modify the robot's trajectory to avoid collisions with obstacles by modulating the original dynamics. The modulation is parameterizable and allows to determine a safety margin and to increase the robot's reactiveness in the face of uncertainty in the localization of the obstacle. Our approach has the following main features:
1) it guarantees the safe collision avoidance. If the original DS is modeled with SEDS, the modulated DS is inherently robust to perturbations, and can instantly adapt its motion to a dynamically changing environment.
Fig. 1 In the experiment presented in this figure, the robot is required to put a glass on the desk and in front of the person, while avoid hitting several objects including a desk lamp, a pile of books, a WallE toy, a pencil sharpener, an open book, a (red) glass, and a desk. All the objects except the red glass are fixed and their convex envelope are shown in green. The trajectory of the red glass is indicated by red diamonds (for the clarity of the graph, we do not display the envelope of the red glass). 
To get more details about DSbased obstacle avoidance approach please visit here. 
Download source code (rar file)
Author: Elena Gribovskaya (2010) Instructions: Unrar the source code and run file 'ManipulationPlanning.m' in Matlab. References:

Download source code (tar.gz file)
Authors: Micha Hersch and Eric Sauser (2008) Instructions: In order to compile, this code requires some dependencies that are solved through the use of the iCub software. References:


Important Note: This work was part of the E.U. project RobotCub and was applied on the iCub robot. Therefore, in order to get the full source code, one is suggested to follow the installation instructions on the iCub manual page. 

Generalized Inverse Kinematics: This specific inverse kinematic solver is part of the iKin library of the iCub software source, and is documented here. Additional online documentation for this software can be found here. Online learning of the body schema: Online documentation for this specific software is provided here. 

Gaussian Mixture Model and Regression (GMM / GMR) for estimating trajectories
Authors:
Sylvain Calinon, Micha Hersch (2008)
List of source codes available:
Download source code (zip file)
Instructions: Unzip the file and run 'demo1', 'demo2' or 'demo3' in Matlab. References:


Demo1:
Demonstration of the generalization process using Gaussian Mixture Regression
(GMR). 



Demo2:
Demonstration of Gaussian Mixture Regression (GMR) using spatial components as query points
of arbitrary dimensions. 



Demo3:
Demonstration of the smooth transitions properties of data retrieved by
Gaussian Mixture Regression (GMR). 

Download source code (zip file)
Instructions: Unzip the file and run 'demo1' in Matlab. References:


Demo1:
Demonstration of a probabilistic encoding through Gaussian Mixture Model (GMM) in
a latent space of motion extracted by Principal Component Analysis (PCA). 

Download source code (zip file)
Instructions: Unzip the file and run 'demo1' in Matlab. References:


Demo1:
Demonstration of the reproduction of a generalized trajectory through
Gaussian Mixture Regression (GMR), when considering two independent
constraints represented separately in two Gaussian Mixture Models
(GMMs). Through regression, a smooth generalized trajectory satisfying
the constraints encapsulated in both GMMs is extracted, with associated
constraints represented as covariance matrices. 

Download source code (zip file)
Instructions: Unzip the file and run 'demo1' or 'demo2' in Matlab. References:


Demo1:
Demonstration of an incremental learning process of Gaussian
Mixture Model (GMM) using a direct update method. 



Demo2:
Demonstration of an incremental learning process of Gaussian
Mixture Model (GMM) using a generative method. 

Download source code (zip file)
Instructions: Unzip the file and run 'demo1' in Matlab. References:


Demo1:
Demonstration of a coneplane intersection interpreted in terms of Gaussian
Probability Density Function (PDF). 

Download source code (zip file)
Instructions: Unzip the file and run 'demo1' in Matlab. References:


Demo1: Demonstration of the use of Gaussian Mixture Regression (GMR) and inverse kinematics to reproduce a task by considering constraints both in joint space and in task space. An arm of 2 links moving in 2D space is considered. Several demonstrations of a skill are provided, by starting from different initial positions. The skill consists of moving each joint sequentially and then writing the alphabet letter 'N' at a specific position in the 2D space. 

Constraints in joint space and in task space are represented through Gaussian Mixture Models (GMMs) and Gaussian Mixture Regression (GMR). By using an inverse kinematics process based on a pseudoinverse Jacobian, the constraints in task space are then projected in joint space. By considering the projected constraints with the ones originally encoded in joint space, an optimal controller is found for the reproduction of the task. We see through this example that the system is able to generalize the learned skill to new robotic arms (different links lengths) and to new initial positions of the robot. 
Download source code (zip file)
Instructions: Unzip the file and run 'demo1' in Matlab. References:


Demo1: Demonstration of a trajectory learning system robust to perturbation based on Gaussian Mixture Regression (GMR). This program first encodes a trajectory represented through time 't', position 'x' and velocity 'dx' in a joint distribution P(t,x,dx) through Gaussian Mixture Model (GMM) by using ExpectationMaximization (EM) algorithm. Gaussian Mixture Regression (GMR) is then used to estimate P(x,dxt), which retrieves another GMM refining the joint distribution model of position and velocity. The learned skill can then be reproduced by combining an estimation of P(dxx) with an attractor to the demonstrated trajectories. 

Author: Eric Sauser (2011) 

RobotToolKit: RobotToolKit is an opensource robot simulator developed for researchers and robot hackers. RobotToolKit has its own website HERE, where you are encouraged to go to get the latest version of the source code and more detailed information about how to use it. 

Author: Eric Sauser, Brenna Argall (2011) 

Reference: Iterative Grasp Adaptation Learning with Tactile Corrections. E. Sauser, B. Argall, G. Metta, and A. Billard Submitted to Robotics and Autonomous Systems, 2011 

Learning Grasp Adaptation: The source code is part of the iCub code repository, the latter of which can be installed following the instruction here . 

Author: Eric Sauser (2011) 

iCub tools for Skin technology and more: A set of tools that can be used for programming the iCub has been developed, and can be used
for: getting a 3D representation of the icub's skin, to extract contact location and even more... 

Last update: 29/10/10 