ObjectPositionSensor Class Reference
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. | |
Static Public Member Functions | |
static void | describe (QString type) |
Describe all the parameter for configuring the iCubArmJointsSensor. | |
Protected Member Functions | |
void | resourceChanged (QString resourceName, ResourceChangeType changeType) |
The function called when a resource used here is changed. | |
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 |
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 37 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 58 of file sensors.cpp.
Member Function Documentation
void describe | ( | QString | type | ) | [static] |
Describe all the parameter for configuring the iCubArmJointsSensor.
Reimplemented from Sensor.
Definition at line 62 of file sensors.cpp.
References ParameterSettable::addTypeDescription(), ParameterSettable::StringDescriptor::def(), ParameterSettable::Descriptor::describeReal(), ParameterSettable::Descriptor::describeString(), ParameterSettable::RealDescriptor::help(), ParameterSettable::StringDescriptor::help(), ParameterSettable::IsList, ParameterSettable::IsMandatory, ParameterSettable::RealDescriptor::props(), and ParameterSettable::StringDescriptor::props().
void resourceChanged | ( | QString | resourceName, |
ResourceChangeType | changeType | ||
) | [protected, virtual] |
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 96 of file sensors.cpp.
References Logger::info(), Sensor::name(), ObjectPositionSensor::neuronsIteratorResource, NeuronsIterator::nextNeuron(), ObjectPositionSensor::objectName, Sensor::resetNeededResourcesCheck(), NeuronsIterator::setCurrentBlock(), and NeuronsIterator::setGraphicProperties().
void save | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [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 115 of file sensors.cpp.
References ObjectPositionSensor::bbMax, ObjectPositionSensor::bbMin, ConfigurationParameters::createParameter(), ObjectPositionSensor::linearize, ObjectPositionSensor::neuronsIteratorResource, ObjectPositionSensor::objectName, and ConfigurationParameters::startObjectParameters().
int size | ( | ) | [virtual] |
Return the number of neurons on which the Sensor will set the input: 3.
Implements Sensor.
Definition at line 92 of file sensors.cpp.
void update | ( | ) | [virtual] |
Update the state of the Sensor every time step.
Implements Sensor.
Definition at line 71 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
wVector bbMax [protected] |
maximum 3D point for linearization
Definition at line 72 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
wVector bbMin [protected] |
minimum 3D point for linearization
Definition at line 70 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
bool linearize [protected] |
if true will use bbMin and bbMax to linearize the position into [0,1]
Definition at line 68 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
QString neuronsIteratorResource [protected] |
The name of th resource associated with the neural network iterator.
Definition at line 64 of file sensors.h.
Referenced by ObjectPositionSensor::ObjectPositionSensor(), ObjectPositionSensor::resourceChanged(), ObjectPositionSensor::save(), and ObjectPositionSensor::update().
QString objectName [protected] |
the object resource name
Definition at line 66 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