Programming by Demonstration toolkit

General Description

This module allows tasks to be learned from demonstrations. We use it in the KEBA pilot, scenario 3, to learn collision-free motion models during picking the PCB and during the approach motion for insertion. Only few demonstrations (e.g. 5) that shows variability along the workspace are required. The generated motion is executed by our constraint-based controller, which adds on top useful behaviors that can deal with e.g. uncertainties in the environment or human-robot interaction.

Resource Link
Source code Link to source code
Demo Video Link to video

✔️ Generate a GIF with screenshots or images that represent the main functionalities of the component and add it to the it img subfolder, and link it in the image below.

Component Name Slide show

Contact

The following table includes contact information of the main developers in charge of the component:

✔️ Edit the names and contact info of the main developers in charge and update the logo image and link to your website.

Name email Organisation
Jasper Van der Auwera jasper.vanderauwera@kuleuven.be logo image
Santiago Iregui santiago.iregui@kuleuven.be logo image
Erwin Aertbeliën erwin.aertbelien@kuleuven.be logo image

License

GNU General Public License v3.0

Technical Foundations

✔️ Describe the technical foundations of your component. Describe in detail the models, algorithms, or methods you use. If the documentation is available in a different source, for instance, an open access paper, provide here a high-level overview and links to external references.

Code blocks

You can enter block codes in Markdown cells surrounding the text you want to display as code using triple quotes (````) and adding the language name. For instance, the following code block will display some python code styled using Python language syntax:

# This is a comment
print("Hello, world!")

Tables

You can add a table like this in your document:

| This | is   |
|------|------|
|   a  | table|

will display the following table:

This is
a table

The table cells are delimited by the (|) character. The first row and first column are used to determine the width of the table, so it is important to insert spaces if you want to control the table width and text alignment across the table. Also, note that the first row is used as headers, and that there is a separator between the header and the table body.

Note that the text in the table is automatically aligned to the left. You can control the alignment of the text using colons (:) after the column delimiter. For instance, the code:

```markdown
|           Right aligned           |centered aligned          |
|----------------------------------:|:------------------------:|
| This is a right aligned column    | and this one is centered |
```

see:

Right aligned centered aligned
This is a right aligned column and this one is centered

Lists

You can build itemized lists using the - character, and nested sublists using the tabulator or insert some spaces before the - character. For instance, the code:

- Item list number one
    - Sublist number one
        - This is a sublist item
    - Sublist number two
        - This is a sublist item
        - And this is another
- Item list number two
    - This is another sublist item
    - Here, just one more sublist:
        - One item
        - And one more!

Creates the following list:

You can also create numbered nested lists just using numbers before a '.' character. For instance:

1. Here we go
    1. Sublist item 1
    2. Sublist item 2
2. Here we go again
    1. Sublist item 1
    2. Sublist item 2

Will create this sublist: 1. Here we go 1. Sublist item 1 2. Sublist item 2 2. Here we go again 1. Sublist item 1 2. Sublist item 2

LaTeX equations

You can include mathematical expressions using LaTex notation wrapped using the dollar symbol as a delimiter. You can insert equations inline (in the same line) as text like:

This is an inline equation $e^{i\pi} + 1 = 0$
````

This is an inline equation $e^{i\pi} + 1 = 0$

You can also use the dollar symbol to include equations standalone in a new line. For instance, the code:

```markdown
$$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$

Will introduce an equation in a new line, like this:

$$e^x=\sum_{i=0}^\infty \frac{1}{i!}x^i$$

Latex cheat sheet

You can find a comprehensive cheat sheet for LaTeX equations here. You can also use Overleaf to find tutorials and edit equations online. However, we hope this table contains the most common LaTeX commands and symbols.

Symbol LaTex Command Description Example
$x^y$ ^{x} Exponent. The expression in the exponent is passed between curly brackets ({}) $x^{y+1}$
$x_i$ _{i} Subscript. The expression in the subscript is passed between curly brackets $x_{i+1}$
$\sum$ \sum Summation. You can add subscripts and exponents to determine the range of the summation $\sum_{i=0}^{10}{i!}$
$\frac{x}{y}$ \frac Fraction. Pass first the numerator and then the denominator using curly brackets $\frac{1}{2}$
$\int$ \int Integration. Pass the expression to integrate and the variable to integrate over $\int x^2 dx$
$\sqrt{x}$ \sqrt Square root. Pass the expression to square root using curly brackets $\sqrt{x^2}$
$\geq$ \geq Greater than or equal to. $\geq x^2 dx$
$\leq$ \leq Less than or equal to. $\leq x^2 dx$
$\neq$ \neq Not equal to. $\neq x^2 dx$
$\alpha$ \alpha Any greek symbol, using its english name (e.g. alpha). $\alpha$
$\beta$ \beta Beta is another popular greek symbol. $\beta$
$\gamma$ \gamma Gamma is another great greek symbol. $\gamma$
$\omega$ \omega But Omega as in Omega level mutant is my favourite. $\omega$

Matrices and vectors in LaTeX

You can just use brackets to insert vectors in LaTex, which is quite convenient. For instance, the code:

x = [1, 2, 3]

Defines a row vector x with the values 1, 2, 3.

Writing a matrix in LaTex is a bit more complicated. You can use the following syntax:

\begin{bmatrix}
  1 & 2 & 3 \\
  4 & 5 & 6 \\
  7 & 8 & 9
\end{bmatrix}

To write a matrix like:

\begin{bmatrix} 1 & 2 & 3 \ 4 & 5 & 6 \ 7 & 8 & 9 \end{bmatrix}

Note that we write the matrix row-by-row, using two backslashes to separate rows, and the & symbol to separate cells in a row.

Integrated and Open Source Components

This section outlines both pre-existing technologies and open-source components that have been integrated into the component. It provides details on their sources, purposes, modifications, and compliance with licensing terms.

Overview

✔️ Provide a high-level overview of the integrated and open-source components. Provide a high-level description of the funding received in previous projects and what is the progress in AI-PRISM.

Pre-existing Components

traPPCA methodology

Source

✔️ For previous background, provide the project name or origin of the sub-component. Provide a link to project or origin. ✔️ For open source, provide a link to the open source repository.

Description

This toolkit is based on existing Learning from Demonstrations methodology developed at our lab called traPPCA (Trajectory parameterized Probabilistic Principal Component Analysis).

Modifications

This methodology was scattered in multiple code files, multiple languages (python, Giulia, Matlab), and versions of several people. That code was not structured and not easily reused by other people. In AI-Prism we are attempting to make such methodologies more user friendly such that people can take demonstrations and the motion model is generated automatically, with simple procedures, which is the escence of programing by demonstrations. Therefore, most of the effort is being focused on developing user interfaces.

Purpose in AI-PRISM

TraPPCA methdology allows tasks to be learned from demonstrations. We use it in the KEBA pilot, scenario 3, to learn collision-free motion models during picking the PCB and during the approach motion for insertion. Only few demonstrations (e.g. 5) that shows variability along the workspace are required. The generated motion then is executed by our constraint-based controller, which adds on top useful behaviors that can deal with e.g. uncertainties in the environment or human-robot interaction.

License

GNU General Public License v3.0

How to install

TBD

How to use

TBD