The base abstract class for iCub sensors. More...

Inheritance diagram for iCubSensor:

Public Member Functions

 iCubSensor (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~iCubSensor ()
 Destructor.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Saves the parameters of the sensor into the ConfigurationParameters object.
 
- Public Member Functions inherited from Sensor
 Sensor (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 
 ~Sensor ()
 Destructor.
 
QString name ()
 Return the name of the Sensor.
 
void save (ConfigurationParameters &params, QString prefix)
 Save the parameters into the ConfigurationParameters.
 
void setName (QString name)
 Use this method for changing the name of the Sensor.
 
virtual int size ()=0
 Return the number of neurons on which the Sensor will set the input.
 
virtual void update ()=0
 Update the state of the Sensor every time step; the actual behaviour is implemented in subclasses.
 
- Public Member Functions inherited from ParameterSettableInConstructor
 ParameterSettableInConstructor (ConfigurationParameters &, QString)
 
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 ParameterSettable ()
 
virtual void postConfigureInitialization ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ConcurrentResourcesUser
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.
 
- Static Public Member Functions inherited from Sensor
static void describe (QString type)
 Describe all the parameter for configuring the Sensor.
 
- Static Public Member Functions inherited from ParameterSettableInConstructor
static void describe (QString type)
 
static QString fullParameterDescriptionPath (QString type, QString param)
 
static QString fullSubgroupDescriptionPath (QString type, QString sub)
 
- Static Public Member Functions inherited from ParameterSettable
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.
 
- Protected Member Functions inherited from Sensor
QString actualResourceNameForMultirobot (QString resourceName) const
 Returns the actual resource name to use.
 
void checkAllNeededResourcesExist ()
 Checks whether all resources we need are existing and throws an exception if they aren't.
 
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.
 
- Protected Member Functions inherited from ParameterSettableInConstructor
void notifyChangesToParam (QString paramName)
 
- Protected Member Functions inherited from ParameterSettable
void notifyChangesToParam (QString paramName)
 
- Protected Member Functions inherited from ConcurrentResourcesUser
T * getResource ()
 
ResourcesUseroperator= (const ResourcesUser &other)
 
 ResourcesUser ()
 
 ResourcesUser (const ResourcesUser &other)
 
- Protected Member Functions inherited from ResourcesUser
 ResourcesUser (const ResourcesUser &other)
 
virtual void notifyResourceChange (ResourceHandler *resource, ResourceChangeType changeType)=0
 
ResourcesUseroperator= (const ResourcesUser &other)
 

Protected Attributes

QString icubResource
 The name of the resource associated with the iCub robot.
 
QString neuronsIteratorResource
 The name of th resource associated with the neural network iterator.
 

Additional Inherited Members

- Public Types inherited from ParameterSettableInConstructor
enum  Property
 
- Public Types inherited from ConcurrentResourcesUser
typedef
Resource::ResourceChangeType 
ResourceChangeType
 
- Public Attributes inherited from ParameterSettableInConstructor
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 
- Static Public Attributes inherited from ParameterSettableInConstructor
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 

Detailed Description

The base abstract class for iCub sensors.

This class simply has a couple of parameters that are common to all iCub sensors (see below).

In addition to all parameters defined by the parent class (Sensor), this class also defines the following parameters:

  • icub: the name of the resource associated with the iCub 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 icub parameter: the simulated physical iCub robot
  • name defined by the neuronsIterator parameter: the object to iterate over neurons of the neural network

Definition at line 59 of file icubsensors.h.

Constructor & Destructor Documentation

iCubSensor ( ConfigurationParameters params,
QString  prefix 
)

Constructor.

This also reads configuration parameters. Moreover this adds the icub and neuronsIterator resources to the list of resources used here

Parameters
paramsthe ConfigurationParameters containing the parameters for the sensor
prefixthe path prefix to the paramters for this sensor

Definition at line 35 of file icubsensors.cpp.

References Sensor::actualResourceNameForMultirobot(), ConfigurationHelper::getString(), iCubSensor::icubResource, iCubSensor::neuronsIteratorResource, and ConcurrentResourcesUser::usableResources().

~iCubSensor ( )
virtual

Destructor.

Definition at line 48 of file icubsensors.cpp.

Member Function Documentation

void resourceChanged ( QString  resourceName,
ResourceChangeType  changeType 
)
protectedvirtual

The function called when a resource used here is changed.

Parameters
resourceNamethe name of the resource that has changed.
chageTypethe type of change the resource has gone through (whether it was created, modified or deleted)

Reimplemented from ConcurrentResourcesUser.

Reimplemented in iCubHandJointsSensor, iCubPCHeadJointsSensor, iCubHeadJointsSensor, iCubTorsoJointsSensor, iCubPalmTouchSensor, iCubPalmTargetDistSensor, and iCubArmJointsSensor.

Definition at line 75 of file icubsensors.cpp.

References Sensor::resetNeededResourcesCheck(), and ConcurrentResourcesUser::resourceChanged().

Referenced by iCubArmJointsSensor::resourceChanged(), iCubPalmTargetDistSensor::resourceChanged(), iCubPalmTouchSensor::resourceChanged(), iCubTorsoJointsSensor::resourceChanged(), iCubHeadJointsSensor::resourceChanged(), iCubPCHeadJointsSensor::resourceChanged(), and iCubHandJointsSensor::resourceChanged().

Member Data Documentation

QString neuronsIteratorResource
protected

The name of th resource associated with the neural network iterator.

Definition at line 116 of file icubsensors.h.

Referenced by ColorCameraSensor::ColorCameraSensor(), HandObjectVisualOffsetSensor::HandObjectVisualOffsetSensor(), iCubArmJointsSensor::iCubArmJointsSensor(), iCubFingertipsTouchSensor::iCubFingertipsTouchSensor(), iCubHandJointsSensor::iCubHandJointsSensor(), iCubHandTouchSensor::iCubHandTouchSensor(), iCubHeadJointsSensor::iCubHeadJointsSensor(), iCubPalmPatchesTouchSensor::iCubPalmPatchesTouchSensor(), iCubPalmTargetDistSensor::iCubPalmTargetDistSensor(), iCubPalmTouchSensor::iCubPalmTouchSensor(), iCubPCHeadJointsSensor::iCubPCHeadJointsSensor(), iCubSensor::iCubSensor(), iCubTorsoJointsSensor::iCubTorsoJointsSensor(), LinearCameraSensor::LinearCameraSensor(), iCubArmJointsSensor::resourceChanged(), iCubPalmTargetDistSensor::resourceChanged(), iCubPalmTouchSensor::resourceChanged(), iCubTorsoJointsSensor::resourceChanged(), iCubHeadJointsSensor::resourceChanged(), iCubPCHeadJointsSensor::resourceChanged(), iCubHandJointsSensor::resourceChanged(), iCubSensor::save(), iCubArmJointsSensor::update(), ColorCameraSensor::update(), LinearCameraSensor::update(), iCubPalmTargetDistSensor::update(), iCubPalmTouchSensor::update(), iCubHandTouchSensor::update(), iCubTorsoJointsSensor::update(), iCubHeadJointsSensor::update(), iCubPCHeadJointsSensor::update(), iCubHandJointsSensor::update(), iCubFingertipsTouchSensor::update(), iCubPalmPatchesTouchSensor::update(), and HandObjectVisualOffsetSensor::update().


The documentation for this class was generated from the following files: