The base abstract class for e-puck sensors. More...

Public Member Functions | |
EpuckSensor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
virtual | ~EpuckSensor () |
Destructor. More... | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Saves the parameters of the sensor into the ConfigurationParameters object. More... | |
![]() | |
Sensor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. More... | |
~Sensor () | |
Destructor. More... | |
QString | name () |
Return the name of the Sensor. More... | |
void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the parameters into the ConfigurationParameters. More... | |
void | setName (QString name) |
Use this method for changing the name of the Sensor. More... | |
virtual int | size ()=0 |
Return the number of neurons on which the Sensor will set the input. More... | |
virtual void | update ()=0 |
Update the state of the Sensor every time step; the actual behaviour is implemented in subclasses. More... | |
![]() | |
NoisyDevice (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. More... | |
~NoisyDevice () | |
Destructor. More... | |
![]() | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
![]() | |
void | addUsableResource (QString resource) |
void | addUsableResources (QStringList resources) |
void | declareResource (QString name, T *resource, QString lockBuddy="") |
void | deleteResource (QString name) |
T * | getResource (QString name, bool *resourceExists=NULL) |
bool | hasResource (QString name) const |
void | removeAllUsableResources () |
void | removeUsableResource (QString resource) |
void | removeUsableResources (QStringList resources) |
virtual void | shareResourcesWith (ResourcesUser *buddy) |
void | usableResources (QStringList resources) |
bool | usedResourcesExist (QStringList *nonExistingResources=NULL) const |
Static Public Member Functions | |
static void | describe (QString type) |
Describes all the parameters for this sensor. More... | |
![]() | |
static void | describe (QString type) |
Describe all the parameter for configuring the Sensor. More... | |
![]() | |
static void | describe (QString type) |
Describe all the parameter for configuring the Sensor. More... | |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Protected Member Functions | |
virtual void | resourceChanged (QString resourceName, ResourceChangeType changeType) |
The function called when a resource used here is changed. More... | |
![]() | |
QString | actualResourceNameForMultirobot (QString resourceName) const |
Returns the actual resource name to use. More... | |
void | checkAllNeededResourcesExist () |
Checks whether all resources we need are existing and throws an exception if they aren't. More... | |
void | resetNeededResourcesCheck () |
Resets the check on needed resources so that the next call to checkAllNeededResourcesExist() will perform the full check and not the quick one. More... | |
![]() | |
double | applyNoise (double v, double minValue, double maxValue) const |
Adds noise to the value. More... | |
![]() | |
void | notifyChangesToParam (QString paramName) |
![]() | |
T * | getResource () |
![]() | |
ResourcesUser (const ResourcesUser &other) | |
virtual void | notifyResourceChange (ResourceHandler *resource, ResourceChangeType changeType)=0 |
ResourcesUser & | operator= (const ResourcesUser &other) |
Protected Attributes | |
QString | m_epuckResource |
The name of the resource associated with the e-puck robot. More... | |
QString | m_neuronsIteratorResource |
The name of th resource associated with the neural network iterator. More... | |
![]() | |
ResourceCollectionHolder | m_resources |
Additional Inherited Members | |
![]() | |
enum | Property |
![]() | |
typedef Resource::ResourceChangeType | ResourceChangeType |
![]() | |
enum | ResourceChangeType |
![]() | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
![]() | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
![]() | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
Detailed Description
The base abstract class for e-puck sensors.
This class simply has a couple of parameters that are common to all e-puck sensors (see below). Some of the sensors work directly with Worldsim objects, while others need an instance of the Arena to work. Those that do not need an Arena generally also work with objects created using the Arena object, but in most of the cases are slower. See the description of individual sensors for more information about what each sensor needs.
In addition to all parameters defined by the parent class (Sensor), this class also defines the following parameters:
- epuck: the name of the resource associated with the e-puck robot to use (default is "robot")
- neuronsIterator: the name of the resource associated with the neural network iterator (default is "neuronsIterator")
The resources required by this Sensor are:
- name defined by the epuck parameter: the simulated physical e-puck robot
- name defined by the neuronsIterator parameter: the object to iterate over neurons of the neural network
Definition at line 58 of file epucksensors.h.
Constructor & Destructor Documentation
EpuckSensor | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor.
This also reads configuration parameters. Moreover this adds the e-puck and neuronsIterator resources to the list of resources used here
- Parameters
-
params the ConfigurationParameters containing the parameters for the sensor prefix the path prefix to the paramters for this sensor
Definition at line 33 of file epucksensors.cpp.
References Sensor::actualResourceNameForMultirobot(), ConfigurationHelper::getString(), EpuckSensor::m_epuckResource, EpuckSensor::m_neuronsIteratorResource, and ConcurrentResourcesUser::usableResources().
|
virtual |
Destructor.
Definition at line 46 of file epucksensors.cpp.
Member Function Documentation
|
static |
Describes all the parameters for this sensor.
- Parameters
-
type the name with which this sensor is registered into the factory
Definition at line 62 of file epucksensors.cpp.
References ParameterSettable::addTypeDescription(), and Sensor::describe().
Referenced by EpuckProximityIRSensor::describe(), EpuckGroundIRSensor::describe(), EpuckLinearCameraSensor::describe(), and EpuckSampledProximityIRSensor::describe().
|
protectedvirtual |
The function called when a resource used here is changed.
- Parameters
-
resourceName the name of the resource that has changed. chageType the type of change the resource has gone through (whether it was created, modified or deleted)
Reimplemented from ConcurrentResourcesUser.
Definition at line 73 of file epucksensors.cpp.
References Sensor::resetNeededResourcesCheck(), and ConcurrentResourcesUser::resourceChanged().
|
virtual |
Saves the parameters of the sensor into the ConfigurationParameters object.
- Parameters
-
params the ConfigurationParameters where save the parameters of the sensors prefix the path prefix for the parameters to save
Implements ParameterSettable.
Reimplemented in EpuckSampledProximityIRSensor, EpuckLinearCameraSensor, EpuckGroundIRSensor, and EpuckProximityIRSensor.
Definition at line 51 of file epucksensors.cpp.
References ConfigurationParameters::createParameter(), EpuckSensor::m_epuckResource, EpuckSensor::m_neuronsIteratorResource, Sensor::save(), and ConfigurationParameters::startObjectParameters().
Referenced by EpuckProximityIRSensor::save(), EpuckGroundIRSensor::save(), EpuckLinearCameraSensor::save(), and EpuckSampledProximityIRSensor::save().
Member Data Documentation
|
protected |
The name of the resource associated with the e-puck robot.
Definition at line 110 of file epucksensors.h.
Referenced by EpuckSensor::EpuckSensor(), EpuckSensor::save(), and EpuckSampledProximityIRSensor::update().
|
protected |
The name of th resource associated with the neural network iterator.
Definition at line 116 of file epucksensors.h.
Referenced by EpuckSensor::EpuckSensor(), and EpuckSensor::save().
The documentation for this class was generated from the following files:
- experiments/include/epucksensors.h
- experiments/src/epucksensors.cpp