class (interface) for using multiple controller, the first one is the active one, which generates motor values. More...
#include <oneactivemultipassivecontroller.h>
Inherits AbstractMultiController.
Public Member Functions | |
OneActiveMultiPassiveController (AbstractController *controller, const std::string &name="1ActXPassController", const std::string &revision="$ID$") | |
contructor (hint: use $ID$ for revision) | |
virtual | ~OneActiveMultiPassiveController () |
virtual void | init (int sensornumber, int motornumber, RandGen *randGen=0) |
initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use. | |
virtual void | step (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
performs one step (includes learning). | |
virtual void | stepNoLearning (const sensor *sensors, int sensornumber, motor *motors, int motornumber) |
performs one step without learning. | |
Protected Attributes | |
motor * | passiveMotors |
class (interface) for using multiple controller, the first one is the active one, which generates motor values.
The other controllers are passive and cannot affect the motor values.
OneActiveMultiPassiveController | ( | AbstractController * | controller, | |
const std::string & | name = "1ActXPassController" , |
|||
const std::string & | revision = "$ID$" | |||
) |
contructor (hint: use $ID$ for revision)
~OneActiveMultiPassiveController | ( | ) | [virtual] |
void init | ( | int | sensornumber, | |
int | motornumber, | |||
RandGen * | randGen = 0 | |||
) | [virtual] |
initialisation of the controller with the given sensor/ motornumber Must NORMALLY be called before use.
For all multicontroller call first AbstractMultiController::init(sensornumber,motornumber) if you overwrite this method
Reimplemented from AbstractMultiController.
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 |
Implements AbstractMultiController.
motor* passiveMotors [protected] |