The base abstract class for iCub motors. More...
Public Member Functions | |
iCubMotor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. | |
virtual | ~iCubMotor () |
Destructor. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Saves the parameters of the motor into the ConfigurationParameters object. | |
Public Member Functions inherited from Motor | |
Motor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~Motor () | |
Destructor. | |
QString | name () |
Return the name of the Sensor. | |
void | save (ConfigurationParameters ¶ms, 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 from which the Motor will get the output. | |
virtual void | update ()=0 |
Update the state of the Motor every time step; the actual behaviour is implemented in subclasses. | |
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) |
Describes all the parameters for this motor. | |
Static Public Member Functions inherited from Motor | |
static void | describe (QString type) |
Describe all the parameter for configuring the Motor. | |
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 Motor | |
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 | |
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 motors.
This class simply has a couple of parameters that are common to all iCub motors (see below).
In addition to all parameters defined by the parent class (Motor), 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 Motor 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 57 of file icubmotors.h.
Constructor & Destructor Documentation
iCubMotor | ( | 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
-
params the ConfigurationParameters containing the parameters for the motor prefix the path prefix to the paramters for this motor
Definition at line 36 of file icubmotors.cpp.
References Motor::actualResourceNameForMultirobot(), ConfigurationHelper::getString(), iCubMotor::icubResource, iCubMotor::neuronsIteratorResource, and ConcurrentResourcesUser::usableResources().
|
virtual |
Destructor.
Definition at line 49 of file icubmotors.cpp.
Member Function Documentation
|
static |
Describes all the parameters for this motor.
- Parameters
-
type the name with which this motor is registered into the factory
Definition at line 65 of file icubmotors.cpp.
References ParameterSettableInConstructor::addTypeDescription(), ParameterSettable::StringDescriptor::def(), Motor::describe(), ParameterSettable::Descriptor::describeString(), and ParameterSettable::StringDescriptor::help().
Referenced by iCubArmRandomMotor::describe(), iCubArmPosToPostureMotor::describe(), iCubTorsoPosToPostureMotor::describe(), iCubArmMusclesMotor::describe(), iCubHandMusclesMotor::describe(), iCubTorsoMusclesMotor::describe(), iCubHeadMusclesMotor::describe(), iCubPosToVelMotor::describe(), iCubHeadVelocityMotor::describe(), iCubArmVelocityMotor::describe(), and iCubTorsoVelocityMotor::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.
Reimplemented in iCubTorsoVelocityMotor, iCubArmVelocityMotor, iCubHeadPosToVelMotor, iCubTorsoPosToVelMotor, iCubArmPosToVelMotor, iCubHeadMusclesMotor, iCubTorsoMusclesMotor, iCubHandMusclesMotor, iCubArmMusclesMotor, iCubTorsoPosToPostureMotor, iCubArmPosToPostureMotor, and iCubArmRandomMotor.
Definition at line 76 of file icubmotors.cpp.
References Motor::resetNeededResourcesCheck(), and ConcurrentResourcesUser::resourceChanged().
Referenced by iCubArmRandomMotor::resourceChanged(), iCubArmPosToPostureMotor::resourceChanged(), iCubTorsoPosToPostureMotor::resourceChanged(), iCubArmMusclesMotor::resourceChanged(), iCubHandMusclesMotor::resourceChanged(), iCubTorsoMusclesMotor::resourceChanged(), iCubHeadMusclesMotor::resourceChanged(), iCubArmPosToVelMotor::resourceChanged(), iCubTorsoPosToVelMotor::resourceChanged(), iCubHeadPosToVelMotor::resourceChanged(), iCubArmVelocityMotor::resourceChanged(), and iCubTorsoVelocityMotor::resourceChanged().
|
virtual |
Saves the parameters of the motor into the ConfigurationParameters object.
- Parameters
-
params the ConfigurationParameters where save the parameters of the motor prefix the path prefix for the parameters to save
Implements ParameterSettableInConstructor.
Reimplemented in iCubTorsoVelocityMotor, iCubArmVelocityMotor, iCubHeadVelocityMotor, iCubConfigurableHandPosToVelMotor, iCubHeadPosToVelMotor, iCubTorsoPosToVelMotor, iCubArmPosToVelMotor, iCubPosToVelMotor, iCubHeadMusclesMotor, iCubTorsoMusclesMotor, iCubHandMusclesMotor, iCubArmMusclesMotor, iCubTorsoPosToPostureMotor, iCubArmPosToPostureMotor, and iCubArmRandomMotor.
Definition at line 54 of file icubmotors.cpp.
References ConfigurationParameters::createParameter(), iCubMotor::icubResource, iCubMotor::neuronsIteratorResource, Motor::save(), and ConfigurationParameters::startObjectParameters().
Referenced by iCubArmRandomMotor::save(), iCubArmPosToPostureMotor::save(), iCubTorsoPosToPostureMotor::save(), iCubArmMusclesMotor::save(), iCubHandMusclesMotor::save(), iCubTorsoMusclesMotor::save(), iCubHeadMusclesMotor::save(), iCubPosToVelMotor::save(), iCubHeadVelocityMotor::save(), iCubArmVelocityMotor::save(), and iCubTorsoVelocityMotor::save().
Member Data Documentation
|
protected |
The name of the resource associated with the icub robot.
Definition at line 108 of file icubmotors.h.
Referenced by iCubArmMusclesMotor::iCubArmMusclesMotor(), iCubArmPosToPostureMotor::iCubArmPosToPostureMotor(), iCubArmPosToVelMotor::iCubArmPosToVelMotor(), iCubArmRandomMotor::iCubArmRandomMotor(), iCubArmVelocityMotor::iCubArmVelocityMotor(), iCubConfigurableHandPosToVelMotor::iCubConfigurableHandPosToVelMotor(), iCubHandMusclesMotor::iCubHandMusclesMotor(), iCubHeadMusclesMotor::iCubHeadMusclesMotor(), iCubHeadPosToVelMotor::iCubHeadPosToVelMotor(), iCubHeadVelocityMotor::iCubHeadVelocityMotor(), iCubMotor::iCubMotor(), iCubTorsoMusclesMotor::iCubTorsoMusclesMotor(), iCubTorsoPosToPostureMotor::iCubTorsoPosToPostureMotor(), iCubTorsoPosToVelMotor::iCubTorsoPosToVelMotor(), iCubTorsoVelocityMotor::iCubTorsoVelocityMotor(), iCubArmRandomMotor::resourceChanged(), iCubArmPosToPostureMotor::resourceChanged(), iCubTorsoPosToPostureMotor::resourceChanged(), iCubArmMusclesMotor::resourceChanged(), iCubHandMusclesMotor::resourceChanged(), iCubTorsoMusclesMotor::resourceChanged(), iCubHeadMusclesMotor::resourceChanged(), iCubArmPosToVelMotor::resourceChanged(), iCubTorsoPosToVelMotor::resourceChanged(), iCubHeadPosToVelMotor::resourceChanged(), iCubArmVelocityMotor::resourceChanged(), iCubTorsoVelocityMotor::resourceChanged(), and iCubMotor::save().
|
protected |
The name of th resource associated with the neural network iterator.
Definition at line 114 of file icubmotors.h.
Referenced by iCubArmMusclesMotor::iCubArmMusclesMotor(), iCubArmPosToPostureMotor::iCubArmPosToPostureMotor(), iCubArmPosToVelMotor::iCubArmPosToVelMotor(), iCubArmRandomMotor::iCubArmRandomMotor(), iCubArmVelocityMotor::iCubArmVelocityMotor(), iCubConfigurableHandPosToVelMotor::iCubConfigurableHandPosToVelMotor(), iCubHandMusclesMotor::iCubHandMusclesMotor(), iCubHeadMusclesMotor::iCubHeadMusclesMotor(), iCubHeadPosToVelMotor::iCubHeadPosToVelMotor(), iCubHeadVelocityMotor::iCubHeadVelocityMotor(), iCubMotor::iCubMotor(), iCubTorsoMusclesMotor::iCubTorsoMusclesMotor(), iCubTorsoPosToPostureMotor::iCubTorsoPosToPostureMotor(), iCubTorsoPosToVelMotor::iCubTorsoPosToVelMotor(), iCubTorsoVelocityMotor::iCubTorsoVelocityMotor(), iCubArmRandomMotor::resourceChanged(), iCubArmPosToPostureMotor::resourceChanged(), iCubTorsoPosToPostureMotor::resourceChanged(), iCubArmMusclesMotor::resourceChanged(), iCubHandMusclesMotor::resourceChanged(), iCubTorsoMusclesMotor::resourceChanged(), iCubHeadMusclesMotor::resourceChanged(), iCubArmPosToVelMotor::resourceChanged(), iCubTorsoPosToVelMotor::resourceChanged(), iCubHeadPosToVelMotor::resourceChanged(), iCubArmVelocityMotor::resourceChanged(), iCubTorsoVelocityMotor::resourceChanged(), iCubMotor::save(), iCubArmPosToPostureMotor::update(), iCubTorsoPosToPostureMotor::update(), iCubArmMusclesMotor::update(), iCubHandMusclesMotor::update(), iCubTorsoMusclesMotor::update(), iCubHeadMusclesMotor::update(), iCubArmPosToVelMotor::update(), iCubTorsoPosToVelMotor::update(), iCubHeadPosToVelMotor::update(), iCubConfigurableHandPosToVelMotor::update(), iCubHeadVelocityMotor::update(), iCubArmVelocityMotor::update(), and iCubTorsoVelocityMotor::update().
The documentation for this class was generated from the following files:
- experiments/include/icubmotors.h
- experiments/src/icubmotors.cpp