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

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

- Search for |

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

# OneActiveMultiPassiveController Class Reference

class (interface) for using multiple controller, the first one is the active one, which generates motor values. More...

`#include <oneactivemultipassivecontroller.h>`

Inherits AbstractMultiController.

Inheritance diagram for OneActiveMultiPassiveController:

[legend]
Collaboration diagram for OneActiveMultiPassiveController:

[legend]
List of all members.

## Public Member Functions
| OneActiveMultiPassiveController (AbstractController *controller, std::string controllerName)
| 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.
virtual iparamkeylist | getInternalParamNames () const
| The list of the names of all internal parameters given by getInternalParams().
virtual iparamvallist | getInternalParams () const
virtual bool | store (FILE *f) const
| stores the object to the given file stream (binary).
virtual bool | restore (FILE *f)
| loads the object from the given file stream (binary).
## Protected Attributes
motor * | passiveMotors

## Detailed Description

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.

## Constructor & Destructor Documentation

OneActiveMultiPassiveController | ( | AbstractController * | controller,
|  | std::string | controllerName |
| ) |  |  |

contructor (hint: use $ID$ for revision)

~OneActiveMultiPassiveController | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual iparamkeylist getInternalParamNames | ( |  | ) | const`[inline, virtual]`

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

The naming convention is "v[i]" for vectors and "A[i][j]" for matrices, where i, j start at 0.

Returns:
  : list of keys

Reimplemented from AbstractMultiController.

virtual iparamvallist getInternalParams | ( |  | ) | const`[inline, virtual]`

Returns:
  : list of values

Reimplemented from AbstractMultiController.

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.

virtual bool restore | ( | FILE * | f | ) | `[inline, virtual]`

loads the object from the given file stream (binary).

Reimplemented from AbstractMultiController.

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

Implements AbstractMultiController.

void stepNoLearning | ( | const sensor * | sensors,
|  | int | sensornumber,
|  | motor * | motors,
|  | int | motornumber |
| ) |  |  | `[virtual]`

performs one step without learning.

See also:
  step

Implements AbstractMultiController.

virtual bool store | ( | FILE * | f | ) | const`[inline, virtual]`

stores the object to the given file stream (binary).

Reimplemented from AbstractMultiController.

## Member Data Documentation

motor* passiveMotors`[protected]`

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

- oneactivemultipassivecontroller.h
- oneactivemultipassivecontroller.cpp