MotorBabbler Class Reference
class for robot control that does motor babbling, e.g.
More...
#include <motorbabbler.h>
Inherits AbstractController.
List of all members.
Detailed Description
class for robot control that does motor babbling, e.g.
sine waves with different frequencies and phaseshift
Member Enumeration Documentation
Constructor & Destructor Documentation
- Parameters:
-
| controlmask | bitmask to select channels to control (default all) |
| function | controller function to use |
Member Function Documentation
virtual int getMotorNumber |
( |
|
) |
const [inline, virtual] |
- Returns:
- Number of motors the controller was initialised with or 0 if not initialised
Implements AbstractController.
virtual int getSensorNumber |
( |
|
) |
const [inline, virtual] |
- Returns:
- Number of sensors the controller was initialised with or 0 if not initialised
Implements AbstractController.
void init |
( |
int |
sensornumber, |
|
|
int |
motornumber, |
|
|
RandGen * |
randGen = 0 | |
|
) |
| | [virtual] |
initialisation of the controller with the given sensor/ motornumber Must be called before use.
The random generator is optional.
Implements AbstractController.
virtual bool restore |
( |
FILE * |
f |
) |
[inline, virtual] |
void sampleFrequencies |
( |
|
) |
|
double sawtooth |
( |
double |
x |
) |
[static] |
saw tooth shape oscillator
double sine |
( |
double |
x |
) |
[static] |
virtual void step |
( |
const sensor * |
sensors, |
|
|
int |
sensornumber, |
|
|
motor * |
motors, |
|
|
int |
motornumber | |
|
) |
| | [inline, 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 AbstractController.
void stepNoLearning |
( |
const sensor * |
, |
|
|
int |
number_sensors, |
|
|
motor * |
, |
|
|
int |
number_motors | |
|
) |
| | [virtual] |
virtual bool store |
( |
FILE * |
f |
) |
const [inline, virtual] |
Member Data Documentation
double(* osci)(double x) [protected] |
The documentation for this class was generated from the following files: