SineController Class Reference

#include <sinecontroller.h>

Inheritance diagram for SineController:

Inheritance graph
[legend]
Collaboration diagram for SineController:

Collaboration graph
[legend]
List of all members.

Detailed Description

class for robot control with sine and cosine

Definition at line 64 of file sinecontroller.h.

Public Member Functions

 SineController (int number_controlled=-1)
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
virtual bool setParam (const paramkey &key, paramval val)
virtual paramlist getParamList () const
 The list of all parameters with there value as allocated lists.
virtual bool store (const char *filename)
 stores the controller values to a given file.
virtual bool restore (const char *filename)
 loads the controller values from a given file.

Protected Attributes

int t
string name
int number_sensors
int number_motors
int number_controlled
paramval sineRate
paramval phaseShift


Constructor & Destructor Documentation

SineController int  number_controlled = -1  ) 
 

Definition at line 51 of file sinecontroller.cpp.


Member Function Documentation

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

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

Returns:
list of names

Implements Inspectable.

Definition at line 105 of file sinecontroller.h.

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

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

Implements Inspectable.

Definition at line 109 of file sinecontroller.h.

virtual int getMotorNumber  )  const [inline, virtual]
 

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

Reimplemented from AbstractController.

Definition at line 84 of file sinecontroller.h.

virtual paramkey getName  )  const [inline, virtual]
 

returns the name of the object (with version number)

Reimplemented from Configurable.

Definition at line 75 of file sinecontroller.h.

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

Definition at line 105 of file sinecontroller.cpp.

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.

Definition at line 118 of file sinecontroller.cpp.

virtual int getSensorNumber  )  const [inline, virtual]
 

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

Reimplemented from AbstractController.

Definition at line 79 of file sinecontroller.h.

void init int  sensornumber,
int  motornumber
[virtual]
 

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

Reimplemented from AbstractController.

Definition at line 69 of file sinecontroller.cpp.

virtual bool restore const char *  filename  )  [inline, virtual]
 

loads the controller values from a given file.

This should include internal parameters as well as configurable values

Reimplemented from AbstractController.

Definition at line 124 of file sinecontroller.h.

bool setParam const paramkey key,
paramval  val
[virtual]
 

Definition at line 111 of file sinecontroller.cpp.

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 AbstractController.

Definition at line 82 of file sinecontroller.cpp.

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

performs one step without learning.

See also:
step

Reimplemented from AbstractController.

Definition at line 90 of file sinecontroller.cpp.

virtual bool store const char *  filename  )  [inline, virtual]
 

stores the controller values to a given file.

This should include internal parameters as well as configurable values

Reimplemented from AbstractController.

Definition at line 119 of file sinecontroller.h.


Member Data Documentation

string name [protected]
 

Definition at line 130 of file sinecontroller.h.

int number_controlled [protected]
 

Definition at line 133 of file sinecontroller.h.

int number_motors [protected]
 

Definition at line 132 of file sinecontroller.h.

int number_sensors [protected]
 

Definition at line 131 of file sinecontroller.h.

paramval phaseShift [protected]
 

Definition at line 136 of file sinecontroller.h.

paramval sineRate [protected]
 

Definition at line 135 of file sinecontroller.h.

int t [protected]
 

Definition at line 124 of file sinecontroller.h.


Generated on Tue Apr 4 19:05:05 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5