24 #ifndef DISCRETECONTROLLERADAPTER_H
25 #define DISCRETECONTROLLERADAPTER_H
95 virtual void setIntervalRange(
double minRange,
double maxRange,
bool mapToInterval=
true);
139 virtual void step(
const sensor* sensors,
int sensornumber,
140 motor* motors,
int motornumber);
145 motor* ,
int number_motors);
150 virtual void init(
int sensornumber,
int motornumber,
RandGen* randGen = 0);
180 double minMotorValue;
181 double maxMotorValue;
182 double minSensorValue;
183 double maxSensorValue;
192 virtual void doDiscretisizeSensorValues(
const sensor* sensors,
int sensornumber);
197 virtual void doDiscretisizeMotorValues(
motor* motors,
int motornumber);
202 virtual void findMinAndMaxSensorRange(
const sensor* sensors,
int sensornumber);
207 virtual void findMinAndMaxMotorRange(
motor* motors,
int motornumber);
212 virtual void findMinAndMaxSensorValues(
const sensor* sensors,
int sensornumber);
217 virtual void findMinAndMaxMotorValues(
motor* motors,
int motornumber);
222 virtual double discretisizeValue(
double valueToDiscretisize,
bool automaticRange,
double minRange,
double maxRange,
double minValue,
double maxValue,
int intervalCount,
bool mapToInterval);
224 virtual double roundValue(
double valueToRound);
double minSensorRange
Definition: discretecontrolleradapter.h:176
Abstract class for robot controller (with some basic functionality).
Definition: abstractcontroller.h:46
bool automaticMotorRange
Definition: discretecontrolleradapter.h:170
DiscreteControllerAdapter(AbstractController *controller, const std::string &name, const std::string &revision)
Definition: discretecontrolleradapter.cpp:49
Abstract adapter class (interface) for robot controller.
Definition: abstractcontrolleradapter.h:52
double minMotorRange
Definition: discretecontrolleradapter.h:174
int motorIntervalCount
Definition: discretecontrolleradapter.h:169
double sensor
Definition: types.h:29
iparamkey name
Definition: inspectable.h:251
virtual void setSensorIntervalRange(double minSensorRange, double maxSensorRange, bool mapToSensorInterval=true)
Sets the interval range for the sensors, the minimum and maximum.
Definition: discretecontrolleradapter.cpp:103
random generator with 48bit integer arithmentic
Definition: randomgenerator.h:34
bool mapToSensorInterval
Definition: discretecontrolleradapter.h:172
virtual void setMotorIntervalCount(int motorIntervalCount)
Sets the number of intervals, in which motor values are mapped.
Definition: discretecontrolleradapter.cpp:87
AbstractController * controller
Definition: abstractcontrolleradapter.h:158
virtual void setIntervalCount(int intervalCount)
Sets the number of intervals, in which sensor AND motor values are mapped.
Definition: discretecontrolleradapter.cpp:76
bool automaticSensorRange
Definition: discretecontrolleradapter.h:171
int sensorIntervalCount
Definition: discretecontrolleradapter.h:168
Adapter class for robot controller.
Definition: discretecontrolleradapter.h:53
virtual ~DiscreteControllerAdapter()
Definition: discretecontrolleradapter.cpp:73
double maxSensorRange
Definition: discretecontrolleradapter.h:177
virtual void setSensorIntervalCount(int sensorIntervalCount)
Sets the number of intervals, in which sensor values are mapped.
Definition: discretecontrolleradapter.cpp:82
virtual void stepNoLearning(const sensor *, int number_sensors, motor *, int number_motors)
performs one step without learning.
Definition: discretecontrolleradapter.cpp:121
bool mapToMotorInterval
Definition: discretecontrolleradapter.h:173
virtual void init(int sensornumber, int motornumber, RandGen *randGen=0)
init function
Definition: discretecontrolleradapter.cpp:127
double maxMotorRange
Definition: discretecontrolleradapter.h:175
double motor
Definition: abstractcontroller.h:49
virtual void step(const sensor *sensors, int sensornumber, motor *motors, int motornumber)
performs one step (includes learning).
Definition: discretecontrolleradapter.cpp:115
virtual void setIntervalRange(double minRange, double maxRange, bool mapToInterval=true)
Sets the interval range for the motors AND sensors, the minimum and maximum.
Definition: discretecontrolleradapter.cpp:91
virtual void setMotorIntervalRange(double minMotorRange, double maxMotorRange, bool mapToMotorInterval=true)
Sets the interval range for the motors, the minimum and maximum.
Definition: discretecontrolleradapter.cpp:96