MeasureAdapter Class Reference

This is a passive controller adapter who is passive and can handle AbstractMeasures. More...

#include <measureadapter.h>

Inherits AbstractControllerAdapter, and BackCaller.

Inheritance diagram for MeasureAdapter:

Inheritance graph
[legend]
Collaboration diagram for MeasureAdapter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MeasureAdapter (AbstractController *controller)
 Constructs the MeasureAdapter.
virtual ~MeasureAdapter ()
virtual std::list< ComplexMeasure * > addSensorComplexMeasure (char *measureName, ComplexMeasureMode mode, int numberBins, int stepSize)
 Adds a ComplexMeasure for measuring sensor values.
virtual void init (int sensornumber, int motornumber, RandGen *randGen=0)
 initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use.
virtual void step (const sensor *sensors, int sensornumber, motor *motors, int motornumber)
 performs one step (includes learning).
virtual void stepNoLearning (const sensor *sensors, int sensornumber, motor *motors, int motornumber)
 performs one step without learning.
virtual bool store (FILE *f) const
 stores the object to the given file stream (binary).
virtual bool restore (FILE *f)
 loads the object from the given file stream (binary).
virtual iparamkeylist getInternalParamNames () const
 The list of the names of all internal parameters given by getInternalParams().
virtual iparamvallist getInternalParams () const

Protected Attributes

StatisticToolsst
bool initialized
motormotorValues
sensorsensorValues

Detailed Description

This is a passive controller adapter who is passive and can handle AbstractMeasures.

Normally the sensor and/or motor values are measured.

See also:
AbstractControllerAdapter


Constructor & Destructor Documentation

MeasureAdapter ( AbstractController controller  ) 

Constructs the MeasureAdapter.

~MeasureAdapter (  )  [virtual]


Member Function Documentation

std::list< ComplexMeasure * > addSensorComplexMeasure ( char *  measureName,
ComplexMeasureMode  mode,
int  numberBins,
int  stepSize 
) [virtual]

Adds a ComplexMeasure for measuring sensor values.

For each sensor a ComplexMeasure is created.

std::list< Inspectable::iparamkey > getInternalParamNames (  )  const [virtual]

The list of the names of all internal parameters given by getInternalParams().

The naming convention is "v[i]" for vectors and "A[i][j]" for matrices, where i, j start at 0.

Returns:
: list of keys

Reimplemented from AbstractControllerAdapter.

std::list< Inspectable::iparamval > getInternalParams (  )  const [virtual]

Returns:
: list of values

Reimplemented from AbstractControllerAdapter.

void init ( int  sensornumber,
int  motornumber,
RandGen randGen = 0 
) [virtual]

initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use.

For all ControllerAdapters call first AbstractControllerAdapter::init(sensornumber,motornumber) if you overwrite this method

Reimplemented from AbstractControllerAdapter.

bool restore ( FILE *  f  )  [virtual]

loads the object from the given file stream (binary).

Reimplemented from AbstractControllerAdapter.

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.

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

performs one step without learning.

See also:
step

Reimplemented from AbstractControllerAdapter.

bool store ( FILE *  f  )  const [virtual]

stores the object to the given file stream (binary).

Reimplemented from AbstractControllerAdapter.


Member Data Documentation

bool initialized [protected]

motor* motorValues [protected]

sensor* sensorValues [protected]

StatisticTools* st [protected]


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:02 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7