# Difference between revisions of "VVV10 iFumble"

Our robot will learn "affordances", sort of.

It will infer an object from its appearance. Then it will learn how that appearance predicts how the object responds to actions directed towards that object.

What it will learn is a mapping from object and action to consequence. We propose to represent the approximately 10d object, action, state mapping using and modifying the GMM library already in iCub. GMMs have the advantage of quickly learning high dimensional non-linear mappings. For motor actions we modify the Action Primitives library.

Vision, state estimation and data association will be done with IQR and some other bits (guys?).

As a final demo, it will play "golf" with the object to get it to a target location - hopefully it will do this at above random capability after learning with the object for a bit.

## Interfaces

TBD

### Poking interface

Component motto: "Fee-fi-fo-fum"

Using new-made ActionPrimitives to fiddle, fumble, and poke around a little bit!

```Tentative arguments of ActionPrimitivesLayer1::fiddle(...), which fiddles with the given target once (combined action):
* x the 3-d target position [m].
* od the hand distance to target used initially [m].
* or the 4-d hand orientation used initially (given in axis-angle representation: ax ay az angle in rad).
* v the reference velocity [m/s].
* fr the final 4-d hand orientation (given in axis-angle representation: ax ay az angle in rad).
For now, we're thinking the final position will be hard-coded as the object original position.
Fiddle uses karate_hand(tm).
```
```(more stuff here)
```

Next, we'll be modifying ActionPrimitivesExample and exposing the interface!

```Port: /ActionPrimitives/in
* x (double): target good ol' x [m].
* y (double): target good ol' y [m].
* d (double): the hand distance to target used initially [m].
* a (double): the hand orientation used initially (frame?) [degrees].
* v (double): the reference velocity [m/s].
* fa (double): the final hand orientation (abs/rel frame?) [degrees].
```

### Learning interface

This is the Learning interface, not to be confused with the [Trajectory learner and replayer].

Interface here shortly. Add data points, do the learning, do inference by sending partial datapoints.

You can send this interface N-dimensional datapoints from which it will a probability density function over the N-dimensional space.

Then you can give it partial vectors and it will infer a probability distribution over the remaining dimensions. You can then ask for information about this inferred probability distribution - e.g. maximum likelihood, expectation. The interface may incorportate Gausssian Mixture Regression if it proves to be required.

Following behaviours should approximate final system: