AbstractController Class Reference

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

#include <abstractcontroller.h>

Inherits Configurable, Inspectable, and Storeable.

Inherited by DemoController, FFNNController, InvertController, InvertMotorController, MultiController, SimpleController, SineController, and UniversalNetController.

Inheritance diagram for AbstractController:

Inheritance graph
[legend]
Collaboration diagram for AbstractController:

Collaboration graph
[legend]
List of all members.

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) ABSTRACT
 initialisation of the controller with the given sensor/ motornumber Must be called before use.
virtual int getSensorNumber () const ABSTRACT
virtual int getMotorNumber () const ABSTRACT
virtual void step (const sensor *sensors, int sensornumber, motor *motors, int motornumber) ABSTRACT
 performs one step (includes learning).
virtual void stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors) ABSTRACT
 performs one step without learning.

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 main.cpp.


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 [virtual]
 

Returns:
Number of motors the controller was initialised with or 0 if not initialised

Reimplemented in DerController, FFNNController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, SineController, DemoController, MultiController, and SimpleController.

virtual int getSensorNumber  )  const [virtual]
 

Returns:
Number of sensors the controller was initialised with or 0 if not initialised

Reimplemented in DerController, FFNNController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, SineController, DemoController, MultiController, and SimpleController.

virtual void init int  sensornumber,
int  motornumber
[virtual]
 

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

Reimplemented in DerController, DInvert3ChannelController, FFNNController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, ProActive, ProActive2, SineController, DemoController, MultiController, and SimpleController.

Examples:
directconnect/directconnect.cpp.

virtual 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 in DerController, DInvert3ChannelController, FFNNController, Invert3ChannelController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, ProActive, ProActive2, SineController, DemoController, MultiController, and SimpleController.

Examples:
directconnect/directconnect.cpp.

virtual void stepNoLearning const sensor ,
int  number_sensors,
motor ,
int  number_motors
[virtual]
 

performs one step without learning.

See also:
step

Reimplemented in DerController, DInvert3ChannelController, FFNNController, Invert3ChannelController, InvertMotorBigModel, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, ProActive, ProActive2, SineController, DemoController, MultiController, and SimpleController.


The documentation for this class was generated from the following file:
Generated on Tue Jan 16 02:14:45 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8