iCubHandTouchSensor Class Reference

A sensor registering contacts with the iCub hand palm or fingertips. More...

Inheritance diagram for iCubHandTouchSensor:

List of all members.

Public Member Functions

 iCubHandTouchSensor (ConfigurationParameters &params, QString prefix)
 Constructor.
 ~iCubHandTouchSensor ()
 Destructor.
virtual void save (ConfigurationParameters &params, QString prefix)
 Saves current parameters into the given ConfigurationParameters object.
virtual int size ()
 Returns the number of neurons required by this sensor.
virtual void update ()
 Performs the sensor update. This also modifies the activation of input neurons.

Static Public Member Functions

static void describe (QString type)
 Generates a description of this class and its parameters.

Detailed Description

A sensor registering contacts with the iCub hand palm or fingertips.

The touch sensor of the iCub hand. There are six sensors: one on the palm and one for each figertip. This sensor works both when the iCub is dynamic (using world's contactsMap) and when it is kinematic (using checkContacts). The neuron corresponding to each touch sensor is set to either 0 or 1 depending on whether the sensor is active (i.e. is in touch with something) or not. When the iCub is dynamic, it is also possible to specify whether contacts with all objects in the world should be registered or only with objects defined by the experiment using the "checkAllObjects" parameter. When the iCub is kinematic only collisions with objects defined by the experiment are checked.

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
  • hand: the hand to use. Choose between "right" and "left"
  • checkAllObjects: a boolean value specifying wheter to check collisions with all objects or not (see the class description for more information)

The resources required by this Sensor are:

  • evonetIterator: the object to iterate over neurons of the neural network
  • world: the simulated physical world
  • icub: the simulated physical iCub robot
  • objects: the pointer to the list of objects created in the current experiment

Definition at line 323 of file icubsensors.h.


Constructor & Destructor Documentation

iCubHandTouchSensor ( ConfigurationParameters params,
QString  prefix 
)

Constructor.

Creates and configures the sensor

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

Definition at line 531 of file icubsensors.cpp.

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

Destructor.

Definition at line 547 of file icubsensors.cpp.


Member Function Documentation

void save ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Saves current parameters into the given ConfigurationParameters object.

Parameters:
paramsthe ConfigurationParameters object in which parameters should be saved
prefixthe name and path of the group where to save parametrs

Reimplemented from iCubSensor.

Definition at line 551 of file icubsensors.cpp.

References ConfigurationParameters::createParameter(), and ConfigurationParameters::startObjectParameters().

int size ( ) [virtual]

Returns the number of neurons required by this sensor.

Returns:
the number of neurons required by this sensor

Implements Sensor.

Definition at line 594 of file icubsensors.cpp.

void update ( ) [virtual]

Performs the sensor update. This also modifies the activation of input neurons.

Implements Sensor.

Definition at line 567 of file icubsensors.cpp.

References Sensor::checkAllNeededResourcesExist(), Sensor::name(), iCubSensor::neuronsIteratorResource, NeuronsIterator::nextNeuron(), NeuronsIterator::setCurrentBlock(), and NeuronsIterator::setInput().


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