00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MARXBOTSENSORS_H
00024 #define MARXBOTSENSORS_H
00025
00026 #include "experimentsconfig.h"
00027 #include "neuroninterfaces.h"
00028 #include "world.h"
00029 #include "robots.h"
00030 #include "phybox.h"
00031 #include "phycylinder.h"
00032
00033 namespace farsa {
00034
00053 class MarXbotSensor : public Sensor
00054 {
00055 public:
00067 MarXbotSensor(ConfigurationParameters& params, QString prefix);
00068
00072 virtual ~MarXbotSensor();
00073
00082 virtual void save(ConfigurationParameters& params, QString prefix);
00083
00090 static void describe(QString type);
00091
00092 protected:
00100 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
00101
00105 QString m_marxbotResource;
00106
00111 QString m_neuronsIteratorResource;
00112 };
00113
00125 class FARSA_EXPERIMENTS_API MarXbotProximityIRSensor : public MarXbotSensor
00126 {
00127 public:
00135 MarXbotProximityIRSensor(ConfigurationParameters& params, QString prefix);
00136
00140 virtual ~MarXbotProximityIRSensor();
00141
00150 virtual void save(ConfigurationParameters& params, QString prefix);
00151
00157 static void describe(QString type);
00158
00163 virtual void update();
00164
00170 virtual int size();
00171
00172 private:
00180 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
00181
00185 PhyMarXbot* m_robot;
00186
00190 NeuronsIterator* m_neuronsIterator;
00191 };
00192
00204 class FARSA_EXPERIMENTS_API MarXbotGroundBottomIRSensor : public MarXbotSensor
00205 {
00206 public:
00214 MarXbotGroundBottomIRSensor(ConfigurationParameters& params, QString prefix);
00215
00219 virtual ~MarXbotGroundBottomIRSensor();
00220
00229 virtual void save(ConfigurationParameters& params, QString prefix);
00230
00236 static void describe(QString type);
00237
00242 virtual void update();
00243
00249 virtual int size();
00250
00251 private:
00259 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
00260
00264 PhyMarXbot* m_robot;
00265
00269 NeuronsIterator* m_neuronsIterator;
00270 };
00271
00284 class FARSA_EXPERIMENTS_API MarXbotGroundAroundIRSensor : public MarXbotSensor
00285 {
00286 public:
00294 MarXbotGroundAroundIRSensor(ConfigurationParameters& params, QString prefix);
00295
00299 virtual ~MarXbotGroundAroundIRSensor();
00300
00309 virtual void save(ConfigurationParameters& params, QString prefix);
00310
00316 static void describe(QString type);
00317
00322 virtual void update();
00323
00329 virtual int size();
00330
00331 private:
00339 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
00340
00344 PhyMarXbot* m_robot;
00345
00349 NeuronsIterator* m_neuronsIterator;
00350 };
00351
00352 }
00353
00354 #endif