The base class for iCub motors that are controlled by target posture and move the robot with velocity commands. More...

Inheritance diagram for iCubPosToVelMotor:

Public Member Functions

 iCubPosToVelMotor (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~iCubPosToVelMotor ()
 Destructor.
 
real getK () const
 Returns the value of the gain (k) used by the proportional controller.
 
real getMaxVelocity () const
 Returns the maximum velocity used by the proportional controller.
 
const ProportionalControllerproportionalController () const
 Returns a const reference to the proportional controller.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Saves the parameters of the sensor into the ConfigurationParameters object.
 
void setK (real k)
 Sets the value of the gain (k) used by the proportional controller.
 
void setMaxVelocity (real maxVelocity)
 Sets the maximum velocity used by the proportional controller.
 
- Public Member Functions inherited from iCubMotor
 iCubMotor (ConfigurationParameters &params, QString prefix)
 Constructor.
 
virtual ~iCubMotor ()
 Destructor.
 
- Public Member Functions inherited from Motor
 Motor (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 
 ~Motor ()
 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 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)
 
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 iCubMotor
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)
 

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
 
- Protected Member Functions inherited from iCubMotor
virtual void resourceChanged (QString resourceName, ResourceChangeType changeType)
 The function called when a resource used here is changed.
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 
- Protected Attributes inherited from iCubMotor
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.
 

Detailed Description

The base class for iCub motors that are controlled by target posture and move the robot with velocity commands.

This class defines some parameters that are common to all iCub motors that get absolute postures and send velocity commands.

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

  • k: the gain for the proportional controller converting position displacement (desired position minus current position) to a velocity to apply to the joints. The default is 0.3
  • maxVelocity: the absolute value of the maximum velocity for joints (i.e. the velocity applied to joints are always in the range [+maxvel, -maxvel]). The default is 20

The resources required by this Motor are the same as those of the parent class

Definition at line 426 of file icubmotors.h.

Constructor & Destructor Documentation

iCubPosToVelMotor ( ConfigurationParameters params,
QString  prefix 
)

Constructor.

This also reads configuration parameters

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

Definition at line 771 of file icubmotors.cpp.

~iCubPosToVelMotor ( )
virtual

Destructor.

Definition at line 777 of file icubmotors.cpp.

Member Function Documentation

real getK ( ) const
inline

Returns the value of the gain (k) used by the proportional controller.

Returns
the value of the gain used by the proportional controller

Definition at line 481 of file icubmotors.h.

References ProportionalController::getK().

Referenced by iCubPosToVelMotor::save().

real getMaxVelocity ( ) const
inline

Returns the maximum velocity used by the proportional controller.

Returns
the maximum velocity used by the proportional controller

Definition at line 503 of file icubmotors.h.

Referenced by iCubPosToVelMotor::save().

const ProportionalController& proportionalController ( ) const
inline

Returns a const reference to the proportional controller.

The returned object is the one that converts displacements to velocities to apply to joints

Returns
the proportional controller

Definition at line 470 of file icubmotors.h.

Referenced by iCubArmPosToVelMotor::update(), iCubTorsoPosToVelMotor::update(), iCubHeadPosToVelMotor::update(), and iCubConfigurableHandPosToVelMotor::update().

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual
void setK ( real  k)
inline

Sets the value of the gain (k) used by the proportional controller.

Parameters
kthe value of the gain used by the proportional controller

Definition at line 492 of file icubmotors.h.

void setMaxVelocity ( real  maxVelocity)
inline

Sets the maximum velocity used by the proportional controller.

Parameters
maxvelocitythe maximum velocity used by the proportional controller

Definition at line 514 of file icubmotors.h.


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