It gets the three absolute coordinate (world frame) of an object. More...
Public Member Functions | |
ObjectPositionSensor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~ObjectPositionSensor () | |
Destructor. | |
void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the parameters of the ObjectPositionSensor into the ConfigurationParameters. | |
int | size () |
Return the number of neurons on which the Sensor will set the input: 3. | |
void | update () |
Update the state of the Sensor every time step. | |
Public Member Functions inherited from Sensor | |
Sensor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~Sensor () | |
Destructor. | |
QString | name () |
Return the name of the Sensor. | |
void | setName (QString name) |
Use this method for changing the name of the Sensor. | |
Public Member Functions inherited from ParameterSettableInConstructor | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
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) |
T | 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) |
Describe all the parameter for configuring the iCubArmJointsSensor. | |
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 | |
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 () |
ResourcesUser & | operator= (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 |
ResourcesUser & | operator= (const ResourcesUser &other) |
Protected Attributes | |
wVector | bbMax |
maximum 3D point for linearization | |
wVector | bbMin |
minimum 3D point for linearization | |
bool | linearize |
if true will use bbMin and bbMax to linearize the position into [0,1] | |
QString | neuronsIteratorResource |
The name of th resource associated with the neural network iterator. | |
QString | objectName |
the object resource name | |
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
It gets the three absolute coordinate (world frame) of an object.
Constructor & Destructor Documentation
ObjectPositionSensor | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor and Configure.
- Parameters
-
params is the ConfigurationParameters containing the parameters prefix is the path prefix to the paramters for this Sensor
Definition at line 132 of file sensors.cpp.
References ObjectPositionSensor::bbMax, ObjectPositionSensor::bbMin, ConfigurationHelper::getString(), ConfigurationHelper::getVector(), ObjectPositionSensor::linearize, Sensor::name(), ObjectPositionSensor::neuronsIteratorResource, ObjectPositionSensor::objectName, ConcurrentResourcesUser::usableResources(), and Logger::warning().
~ObjectPositionSensor | ( | ) |
Destructor.
Definition at line 153 of file sensors.cpp.
Member Function Documentation
|
static |
Describe all the parameter for configuring the iCubArmJointsSensor.
Definition at line 157 of file sensors.cpp.
References ParameterSettableInConstructor::addTypeDescription(), ParameterSettable::StringDescriptor::def(), Sensor::describe(), ParameterSettable::Descriptor::describeReal(), ParameterSettable::Descriptor::describeString(), ParameterSettable::RealDescriptor::help(), ParameterSettable::StringDescriptor::help(), ParameterSettableInConstructor::IsList, ParameterSettableInConstructor::IsMandatory, ParameterSettable::StringDescriptor::props(), and ParameterSettable::RealDescriptor::props().
|
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 191 of file sensors.cpp.
References Logger::info(), Sensor::name(), ObjectPositionSensor::neuronsIteratorResource, NeuronsIterator::nextNeuron(), ObjectPositionSensor::objectName, Sensor::resetNeededResourcesCheck(), NeuronsIterator::setCurrentBlock(), and NeuronsIterator::setGraphicProperties().
|
virtual |
Save the parameters of the ObjectPositionSensor into the ConfigurationParameters.
- Parameters
-
params is the ConfigurationParameters where save the parameters prefix is the path prefix for the parameters to save
Reimplemented from Sensor.
Definition at line 210 of file sensors.cpp.
References ObjectPositionSensor::bbMax, ObjectPositionSensor::bbMin, ConfigurationParameters::createParameter(), ObjectPositionSensor::linearize, ObjectPositionSensor::neuronsIteratorResource, ObjectPositionSensor::objectName, Sensor::save(), and ConfigurationParameters::startObjectParameters().
|
virtual |
Return the number of neurons on which the Sensor will set the input: 3.
Implements Sensor.
Definition at line 187 of file sensors.cpp.
|
virtual |
Update the state of the Sensor every time step.
Implements Sensor.
Definition at line 166 of file sensors.cpp.
References ObjectPositionSensor::bbMax, ObjectPositionSensor::bbMin, Sensor::checkAllNeededResourcesExist(), ObjectPositionSensor::linearize, linearMap(), WObject::matrix(), Sensor::name(), ObjectPositionSensor::neuronsIteratorResource, NeuronsIterator::nextNeuron(), ObjectPositionSensor::objectName, NeuronsIterator::setCurrentBlock(), NeuronsIterator::setInput(), and wMatrix::w_pos.
Member Data Documentation
|
protected |
maximum 3D point for linearization
Definition at line 190 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
|
protected |
minimum 3D point for linearization
Definition at line 188 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
|
protected |
if true will use bbMin and bbMax to linearize the position into [0,1]
Definition at line 186 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
|
protected |
The name of th resource associated with the neural network iterator.
Definition at line 182 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::resourceChanged(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
|
protected |
the object resource name
Definition at line 184 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::resourceChanged(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
The documentation for this class was generated from the following files:
- experiments/include/sensors.h
- experiments/src/sensors.cpp