24 #ifndef __BRAITENBERG_H
25 #define __BRAITENBERG_H
29 #include <selforg/abstractcontroller.h>
50 leftsensor(leftsensor), rightsensor(rightsensor),
57 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0){
68 virtual void step(
const sensor* sensors,
int sensornumber,
69 motor* motors,
int motornumber) {
74 motor* motors,
int motornumber){
90 virtual bool store(FILE* f)
const {
int leftsensor
Definition: braitenberg.h:104
int number_sensors
Definition: braitenberg.h:108
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
virtual void init(int sensornumber, int motornumber, RandGen *randGen=0)
initialisation of the controller with the given sensor/ motornumber Must be called before use...
Definition: braitenberg.h:57
Definition: braitenberg.h:38
Braitenberg(Type type, int leftsensor, int rightsensor, int leftmotor=0, int rightmotor=1)
Definition: braitenberg.h:47
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
simple braitenberg controler type 2 a and b (Aggressive,Cowardly)
Definition: braitenberg.h:36
paramval offset
Definition: braitenberg.h:111
virtual bool store(FILE *f) const
Definition: braitenberg.h:90
void print(FILE *f, const char *prefix, int columns=90, bool traverseChildren=true) const
prints the keys, values and descriptions to the file. Each line is prefixed
Definition: configurable.cpp:308
int number_motors
Definition: braitenberg.h:109
paramval strength
Definition: braitenberg.h:110
virtual bool restore(FILE *f)
Definition: braitenberg.h:96
double sensor
Definition: abstractcontroller.h:48
double paramval
Definition: configurable.h:88
Type type
Definition: braitenberg.h:103
int rightsensor
Definition: braitenberg.h:105
virtual void stepNoLearning(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step without learning.
Definition: braitenberg.h:73
Type
Definition: braitenberg.h:38
virtual void addParameterDef(const paramkey &key, paramval *val, paramval def, paramval minBound, paramval maxBound, const paramdescr &descr=paramdescr())
This function is only provided for convenience.
Definition: configurable.h:220
virtual int getMotorNumber() const
Definition: braitenberg.h:66
Definition: braitenberg.h:38
bool parse(FILE *f, const char *prefix=0, bool traverseChildren=true)
parses the configuration from the given file
Definition: configurable.cpp:384
double motor
Definition: abstractcontroller.h:49
int rightmotor
Definition: braitenberg.h:107
int leftmotor
Definition: braitenberg.h:106
virtual void step(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step (includes learning).
Definition: braitenberg.h:68
virtual int getSensorNumber() const
Definition: braitenberg.h:64