#include <motornoisewiring.h>
Inherits One2OneWiring, and Configurable.
Inheritance diagram for MotorNoiseWiring:
Public Member Functions | |
MotorNoiseWiring (NoiseGenerator *noise, double noiseStrength) | |
constructor | |
virtual | ~MotorNoiseWiring () |
virtual bool | init (int robotsensornumber, int robotmotornumber, RandGen *randGen=0) |
Initializes the number of sensors and motors from robot (to be precise the internal parameters rsensornumber and rmotornumber!), calculates the number of sensors and motors on controller side. | |
virtual bool | wireMotors (motor *rmotors, int rmotornumber, const motor *cmotors, int cmotornumber) |
Realizes wiring from controller motor outputs to robot motors. | |
Protected Attributes | |
NoiseGenerator * | mNoiseGen |
double | noiseStrength |
MotorNoiseWiring | ( | NoiseGenerator * | noise, | |
double | noiseStrength | |||
) | [inline] |
virtual ~MotorNoiseWiring | ( | ) | [inline, virtual] |
virtual bool init | ( | int | robotsensornumber, | |
int | robotmotornumber, | |||
RandGen * | randGen = 0 | |||
) | [inline, virtual] |
Initializes the number of sensors and motors from robot (to be precise the internal parameters rsensornumber and rmotornumber!), calculates the number of sensors and motors on controller side.
The internal version initIntern() is called from here and be overloaded to calculate and provide the appropriate numbers controllersensornumber (csensornumber), controllermotornumber (cmotornumber), robotsensornumber (rsensornumber) and robotmotornumber (rmotornumber),
randGen | pointer to random generator, if not given then a new one is created |
Reimplemented from AbstractWiring.
virtual bool wireMotors | ( | motor * | rmotors, | |
int | rmotornumber, | |||
const motor * | cmotors, | |||
int | cmotornumber | |||
) | [inline, virtual] |
Realizes wiring from controller motor outputs to robot motors.
The internal version wireMotorsIntern() is called from here and must be overloaded in order to implement the appropriate mapping.
rmotors | pointer to array of motorvalues for robot | |
rmotornumber | number of robot motors | |
cmotors | pointer to array of motorvalues from controller | |
cmotornumber | number of motorvalues from controller |
Reimplemented from AbstractWiring.
NoiseGenerator* mNoiseGen [protected] |
double noiseStrength [protected] |