SimpleController Class Reference

class for robot controll with sine and cosine More...

#include <simplecontroller.h>

Inherits AbstractController.

Inheritance diagram for SimpleController:

Inheritance graph
[legend]
Collaboration diagram for SimpleController:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SimpleController ()
virtual void init (int sensornumber, int motornumber)
 initialisation of the controller with the given sensor/ motornumber Must be called before use.
virtual paramkey getName () const
 returns the name of the object (with version number)
virtual int getSensorNumber () const
virtual int getMotorNumber () const
virtual void step (const sensor *sensors, int sensornumber, motor *motors, int motornumber)
 performs one step (includes learning).
virtual void stepNoLearning (const sensor *, int number_sensors, motor *, int number_motors)
 performs one step without learning.
virtual list< iparamkeygetInternalParamNames () const
 The list of the names of all internal parameters given by getInternalParams().
virtual list< iparamvalgetInternalParams () const
 The list of the names of all internal parameters given by getInternalParams().
virtual paramval getParam (const paramkey &key) const
 returns the value of the requested parameter or 0 (+ error message to stderr) if unknown.
virtual bool setParam (const paramkey &key, paramval val)
 sets the value of the given parameter or does nothing if unknown.
virtual paramlist getParamList () const
 The list of all parameters with there value as allocated lists.

Protected Attributes

string name
 Initialises the registers the given callback functions.
int t
int number_sensors
int number_motors
int cameraHandlingDefined
paramval velocity
paramval leftRightShift
paramval decreaseFactorVelocity
paramval decreaseFactorShift

Detailed Description

class for robot controll with sine and cosine


Constructor & Destructor Documentation

SimpleController  ) 
 


Member Function Documentation

virtual list<iparamkey> getInternalParamNames  )  const [inline, virtual]
 

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

Parameters:
keylist (do NOT free it! It is a pointer to an internal structure)
Returns:
length of the lists

Implements Inspectable.

virtual list<iparamval> getInternalParams  )  const [inline, virtual]
 

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

Implements Inspectable.

virtual int getMotorNumber  )  const [inline, virtual]
 

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

Reimplemented from AbstractController.

virtual paramkey getName  )  const [inline, virtual]
 

returns the name of the object (with version number)

Reimplemented from Configurable.

Configurable::paramval getParam const paramkey key  )  const [virtual]
 

returns the value of the requested parameter or 0 (+ error message to stderr) if unknown.

Reimplemented from Configurable.

Configurable::paramlist getParamList  )  const [virtual]
 

The list of all parameters with there value as allocated lists.

Returns:
list of key-value pairs

Reimplemented from Configurable.

virtual int getSensorNumber  )  const [inline, virtual]
 

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

Reimplemented from AbstractController.

void init int  sensornumber,
int  motornumber
[virtual]
 

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

Reimplemented from AbstractController.

bool setParam const paramkey key,
paramval  val
[virtual]
 

sets the value of the given parameter or does nothing if unknown.

Reimplemented from Configurable.

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

performs one step (includes learning).

Calculates motor commands from sensor inputs.

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

Reimplemented from AbstractController.

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

performs one step without learning.

See also:
step

Reimplemented from AbstractController.


Member Data Documentation

int cameraHandlingDefined [protected]
 

paramval decreaseFactorShift [protected]
 

paramval decreaseFactorVelocity [protected]
 

paramval leftRightShift [protected]
 

string name [protected]
 

Initialises the registers the given callback functions.

Parameters:
handling() is called every step that the camera gets new position and view.

Reimplemented from Configurable.

int number_motors [protected]
 

int number_sensors [protected]
 

int t [protected]
 

paramval velocity [protected]
 


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