Experiments - 1.2.0
Utilities
Configuration
GA
NNFW
WorldSim
Total 99%
Experiments
Main Page
Modules
Classes
Files
File List
experiments
include
kheperasensors.h
1
/********************************************************************************
2
* FARSA Experimentes Library *
3
* Copyright (C) 2007-2012 *
4
* Gianluca Massera <emmegian@yahoo.it> *
5
* Stefano Nolfi <stefano.nolfi@istc.cnr.it> *
6
* Tomassino Ferrauto <tomassino.ferrauto@istc.cnr.it> *
7
* *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU General Public License *
19
* along with this program; if not, write to the Free Software *
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
21
********************************************************************************/
22
23
#ifndef KHEPERASENSORS_H
24
#define KHEPERASENSORS_H
25
26
#include "
experimentsconfig.h
"
27
#include "neuroninterfaces.h"
28
#include "world.h"
29
#include "robots.h"
30
#include "phybox.h"
31
#include "phycylinder.h"
32
#include "sensors.h"
33
34
namespace
farsa {
35
58
class
FARSA_EXPERIMENTS_API
KheperaSensor
:
public
Sensor
59
{
60
public
:
72
KheperaSensor
(
ConfigurationParameters
& params, QString prefix);
73
77
virtual
~
KheperaSensor
();
78
87
virtual
void
save(
ConfigurationParameters
& params, QString prefix);
88
95
static
void
describe(QString type);
96
97
protected
:
105
virtual
void
resourceChanged(QString resourceName,
ResourceChangeType
changeType);
106
110
QString
m_kheperaResource
;
111
116
QString
m_neuronsIteratorResource
;
117
};
118
131
class
FARSA_EXPERIMENTS_API
KheperaProximityIRSensor
:
public
KheperaSensor
132
{
133
public
:
141
KheperaProximityIRSensor
(
ConfigurationParameters
& params, QString prefix);
142
146
virtual
~
KheperaProximityIRSensor
();
147
156
virtual
void
save(
ConfigurationParameters
& params, QString prefix);
157
163
static
void
describe(QString type);
164
169
virtual
void
update();
170
176
virtual
int
size();
177
178
private
:
186
virtual
void
resourceChanged(QString resourceName,
ResourceChangeType
changeType);
187
191
PhyKhepera
* m_robot;
192
196
NeuronsIterator
* m_neuronsIterator;
197
};
198
199
}
200
201
#endif