CrossMotorCoupling Class Reference

This is an adapter for a teachable controller to implement a cross motor coupling, see dissertation of Georg Martius. More...

#include <crossmotorcoupling.h>

Inherits AbstractControllerAdapter, and Teachable.

Collaboration diagram for CrossMotorCoupling:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CrossMotorCoupling (AbstractController *controller, Teachable *teachable, double threshold=0.4)
virtual void step (const sensor *sensors, int sensornumber, motor *motors, int motornumber)
 performs one step (includes learning).
virtual void setCMC (const CMC &cmc)
virtual CMC getCMC ()
virtual void setMotorTeaching (const matrix::Matrix &teaching)
 The given motor teaching signal is used for this timestep.
virtual void setSensorTeaching (const matrix::Matrix &teaching)
 The given sensor teaching signal (distal learning) is used for this timestep.
virtual matrix::Matrix getLastMotorValues ()
 returns the last motor values (useful for cross motor coupling)
virtual matrix::Matrix getLastSensorValues ()
 returns the last sensor values (useful for cross sensor coupling)

Static Public Member Functions

static CMC getPermutationCMC (const std::list< int > &permutation)
 creates a permutation cross motor coupling, where for each motor we define one cross motor connection.

Protected Attributes

CMC cmc
Teachableteachable
double threshold
 treshhold below which not cmc-teaching is done

Detailed Description

This is an adapter for a teachable controller to implement a cross motor coupling, see dissertation of Georg Martius.


Constructor & Destructor Documentation

CrossMotorCoupling ( AbstractController controller,
Teachable teachable,
double  threshold = 0.4 
) [inline]
Parameters:
controller actual controller
teachable also pointer to the controller, must be equal to controller. This trick is used to ensure that the controller is both "AbstractController" and "Teachable".
threshold value below which (absolute) no cross motor teaching is done (avoids suppression of activity)

Member Function Documentation

CMC getCMC (  )  [virtual]
virtual matrix::Matrix getLastMotorValues (  )  [inline, virtual]

returns the last motor values (useful for cross motor coupling)

Implements Teachable.

virtual matrix::Matrix getLastSensorValues (  )  [inline, virtual]

returns the last sensor values (useful for cross sensor coupling)

Implements Teachable.

CMC getPermutationCMC ( const std::list< int > &  permutation  )  [static]

creates a permutation cross motor coupling, where for each motor we define one cross motor connection.

Parameters:
permutation permutation[i]=j means that motor i receives from motor j
void setCMC ( const CMC cmc  )  [virtual]
virtual void setMotorTeaching ( const matrix::Matrix teaching  )  [inline, virtual]

The given motor teaching signal is used for this timestep.

It is used as a feed forward teaching signal for the controller. Please note, that the teaching signal has to be given each timestep for a continuous teaching process.

Parameters:
teaching,: matrix with dimensions (motornumber,1)

Implements Teachable.

virtual void setSensorTeaching ( const matrix::Matrix teaching  )  [inline, virtual]

The given sensor teaching signal (distal learning) is used for this timestep.

The belonging motor teachung signal is calculated by the inverse model. See setMotorTeaching

Parameters:
teaching,: matrix with dimensions (motorsensors,1)

Implements Teachable.

void step ( const sensor sensors,
int  sensornumber,
motor motors,
int  motornumber 
) [virtual]

performs one step (includes learning).

Calculates motor commands from sensor inputs.

Parameters:
sensors sensors inputs scaled to [-1,1]
sensornumber length of the sensor array
motors motors outputs. MUST have enough space for motor values!
motornumber length of the provided motor array

Reimplemented from AbstractControllerAdapter.


Member Data Documentation

CMC cmc [protected]
Teachable* teachable [protected]
double threshold [protected]

treshhold below which not cmc-teaching is done


The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:08 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3