#include <abstractcontroller.h>
Inherits Configurable, Inspectable, and Storeable.
Inherited by InvertController, InvertMotorController, and SineController.
Inheritance diagram for AbstractController:


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. | |
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:
directconnect/directconnect.cpp, integration/main.cpp, and main.cpp.
| AbstractController | ( | const std::string & | name, | |
| const std::string & | revision | |||
| ) | [inline] |
contructor (hint: use $ID$ for revision)
| virtual int getMotorNumber | ( | ) | const [virtual] |
Reimplemented in InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and SineController.
| virtual int getSensorNumber | ( | ) | const [virtual] |
Reimplemented in InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and SineController.
| virtual void init | ( | int | sensornumber, | |
| int | motornumber | |||
| ) | [virtual] |
initialisation of the controller with the given sensor/ motornumber Must be called before use.
Reimplemented in DInvert3ChannelController, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and SineController.
| virtual void step | ( | const sensor * | sensors, | |
| int | sensornumber, | |||
| motor * | motors, | |||
| int | motornumber | |||
| ) | [virtual] |
performs one step (includes learning).
Calculates motor commands from sensor inputs.
| 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 DInvert3ChannelController, Invert3ChannelController, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and SineController.
| virtual void stepNoLearning | ( | const sensor * | , | |
| int | number_sensors, | |||
| motor * | , | |||
| int | number_motors | |||
| ) | [virtual] |
performs one step without learning.
Reimplemented in DInvert3ChannelController, Invert3ChannelController, InvertMotorNStep, InvertMotorSpace, InvertNChannelController, and SineController.
1.4.7