Robot Simulator of the Robotics Group for Self-Organization of Control: MotorNoiseWiring Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# MotorNoiseWiring Class Reference

Implements a one to one wiring that adds noise to the motor signals (the sensors will get no noise). More...

`#include <motornoisewiring.h>`

Inherits One2OneWiring, and Configurable.

Inheritance diagram for MotorNoiseWiring:

[legend]
Collaboration diagram for MotorNoiseWiring:

[legend]
List of all members.

## 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

## Detailed Description

Implements a one to one wiring that adds noise to the motor signals (the sensors will get no noise).

## Constructor & Destructor Documentation

MotorNoiseWiring | ( | NoiseGenerator * | noise,
|  | double | noiseStrength |
| ) |  |  | `[inline]`

constructor

Parameters:

  | noise | NoiseGenerator that is used for adding noise to motor values

virtual ~MotorNoiseWiring | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

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),

Parameters:

  | randGen | pointer to random generator, if not given then a new one is created

Returns:
  returns false on error, otherwise true

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.

Parameters:

  | 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

Returns:
  returns false if error, else true

Reimplemented from AbstractWiring.

## Member Data Documentation

NoiseGenerator* mNoiseGen`[protected]`

double noiseStrength`[protected]`

The documentation for this class was generated from the following file:

- motornoisewiring.h