AbstractController Class Reference

Abstract class (interface) for robot controller. More...

#include <abstractcontroller.h>

Inherits Configurable, Inspectable, and Storeable.

Inherited by AbstractControllerAdapter, AbstractIAFController, Braitenberg, ClassicReinforce, FFNNController, HomeokinBase, InvertController, MotorBabbler, MutualInformationController, OneControllerPerChannel, ReplayController, SineController, SoML, Sos, Sox, SoxExpand, SplitControl, and use_java_controller.

Collaboration diagram for AbstractController:
Collaboration graph
[legend]

List of all members.

Public Types

typedef double sensor
typedef double motor

Public Member Functions

 AbstractController (const std::string &name, const std::string &revision)
 contructor (hint: use $ID$ for revision)
virtual void init (int sensornumber, int motornumber, RandGen *randGen=0)=0
 initialisation of the controller with the given sensor/ motornumber Must be called before use.
virtual int getSensorNumber () const =0
virtual int getMotorNumber () const =0
virtual void step (const sensor *sensors, int sensornumber, motor *motors, int motornumber)=0
 performs one step (includes learning).
virtual void stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors)=0
 performs one step without learning.
virtual void motorBabblingStep (const sensor *, int number_sensors, const motor *, int number_motors)
 called in motor babbling phase.

Detailed Description

Abstract class (interface) for robot controller.

The controller gets a number of input sensor values each timestep and has to generate a number of output motor values.

Interface assumes the following usage:

Examples:

directconnect/directconnect.cpp, integration/main.cpp, and template_sphererobot/main.cpp.


Member Typedef Documentation

typedef double motor
typedef double sensor

Constructor & Destructor Documentation

AbstractController ( const std::string &  name,
const std::string &  revision 
) [inline]

contructor (hint: use $ID$ for revision)


Member Function Documentation

virtual int getMotorNumber (  )  const [pure virtual]
virtual int getSensorNumber (  )  const [pure virtual]
virtual void init ( int  sensornumber,
int  motornumber,
RandGen randGen = 0 
) [pure virtual]
virtual void motorBabblingStep ( const sensor ,
int  number_sensors,
const motor ,
int  number_motors 
) [inline, virtual]

called in motor babbling phase.

the motor values are given (by babbling controller) and this controller can learn the basic relations from observed sensors/motors

Reimplemented in SoML, and Sox.

virtual void step ( const sensor sensors,
int  sensornumber,
motor motors,
int  motornumber 
) [pure 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

Implemented in AbstractControllerAdapter, AbstractIAFController, AbstractMultiController, Braitenberg, ClassicReinforce, CrossMotorCoupling, DiscreteControllerAdapter, Discretesizable, FFNNController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, MeasureAdapter, MotorBabbler, MutualInformationController, OneActiveMultiPassiveController, OneControllerPerChannel, ReplayController, SeMoX, SineController, SoML, Sos, Sox, SoxExpand, SplitControl, and use_java_controller.

Examples:
directconnect/directconnect.cpp.
virtual void stepNoLearning ( const sensor ,
int  number_sensors,
motor ,
int  number_motors 
) [pure virtual]

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